Count Character
Write a function called count_character() that accept two strings and return the following string:
"{string_1}" has size {length of string_1} and "{string_2}" has size {length of string_2}.
To check if its working, uncomment the print part in the code.
Less, More, or Equal
Write a function called compare_character() that accept two strings and return the following string:
The length of the string "{string_1}" is {less than, more than, equal to} the length of the string "{string_2}".
To check if its working, write the following:
Comparing Two Strings
Write a function called comparing_char() that accept three arguments: two strings and one Boolean value (default True). If the boolean value is True, print the final string of no.1 and if False, print the final string of no.2.
Pythagorean triple
Three numbers a, b, c, are called Pythagorean triple if a2 + b2 = c2 . Make a lambda function called is_pythagorean_triple that accept three arguments. It returns the value True if it is a pythagorean triple. Otherwise, it is False. By using that function and the provided list, print the following:
(20, 99, 101) is a triple Pythagoras.
(60, 91, 109) is a triple Pythagoras.
(16, 112, 113) is not a triple Pythagoras.
(44, 117, 125) is a triple Pythagoras.
Hint: To get the first element in the first triple, you can write num_list[0][0]