/
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. 11.06.2022 at 11:30 am / Salted Correspondences
  2. 19.08.2018 at 02:13 pm / Saunter Not
  3. 12.12.2017 at 12:00 am / Innocent Until Proven Guilty
  4. 09.07.2016 at 12:00 am / The Lawgiving Coder
  5. 05.03.2016 at 12:00 am / Rather Be (Alexa Goddard's Version)
  6. 21.12.2015 at 12:00 am / Emails and English Weather
  7. 16.02.2014 at 12:00 am / Don't Care Too Much About Gear
  8. 30.11.2013 at 12:00 am / Particle Oranges
  9. 29.11.2013 at 12:01 am / 美しい - Beautifully Woolly
  10. 22.08.2010 at 12:00 am / 柿が赤くなると医者が青くなる
© Wan Zafran. See disclaimer.