Things of interest.

 
 
February 11, 2021

46 Simple Python Exercises/#02


Define a function max_of_three() that takes three numbers as arguments and returns the largest of them.

The problem:

Define a function max_of_three() that takes three numbers as arguments and returns the largest of them.

Solution:

    def max_of_three(a, b, c):
        return max(a, b, c)


    print(max_of_three(1, 13, 6))

 

 
- Areas: Code / Music / Gaming
- Lang: Japanese / French / English
- Hume: Law / Work / Learning / People
- All: Tags / Posts
 
© 1997 - 2021 / Info