/
11.02.2021 at 01:13 am
Cuttings

46 Simple Python Exercises/#02

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

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))

Filed under:
#
#
Words: 53 words approx.
Time to read: 0.21 mins (at 250 wpm)
Keywords:
, , , , , , , , ,

Other suggested posts

  1. 03.07.2022 at 05:15 pm / The Unpreparedness Apology
  2. 02.01.2018 at 12:00 am / Genuinely Technical Modesty
  3. 28.09.2015 at 12:00 am / Mocking the Law - Excessive Judicial Discretion
  4. 22.07.2015 at 12:00 am / Fair Judges of Fair Play
  5. 18.06.2015 at 12:00 am / Crisp Tweets
  6. 05.07.2014 at 12:00 am / Jack Hamm on (Artistic) Practice
  7. 04.07.2012 at 12:00 am / When To Not Use Data Structures/Algorithms
  8. 20.08.2010 at 12:00 am / 堰かれて募る恋の情
  9. 16.08.2010 at 12:00 am / Lost Nuances in 'Ivan the Terrible'
  10. 16.08.2010 at 12:00 am / You Have Reason
© Wan Zafran. See disclaimer.