2. Write a python program generate a function to find the maximum number among three numbers.
The output is:
numbers = (49, 66, -25)
Expected Answer:
The maximum number among three numbers: 66
Sample Answer:
def max_of_2n(a, b): if a > b: return a return b def max_of_3n(a, b, c): return max_of_2n(a, max_of_2n(b, c)) print("The maximum number among three numbers:", max_of_3n(49, 66, -25))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)