/
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. 17.10.2022 at 12:31 pm / AI Art Is Real Art
  2. 18.06.2022 at 06:52 pm / Strangling Deeds
  3. 16.09.2019 at 10:32 am / Legal Practice & Taking From Software Best Practices
  4. 02.01.2018 at 12:00 am / Genuinely Technical Modesty
  5. 21.12.2015 at 12:00 am / Emails and English Weather
  6. 10.12.2013 at 12:00 am / Yellow Rails
  7. 08.11.2013 at 12:00 am / Red Riding Hood's Examination-in-Chief
  8. 03.07.2013 at 12:00 am / Craft Versus Discipline
  9. 21.07.2012 at 12:00 am / Hunted By GLaDoS
  10. 17.03.2012 at 12:00 am / Upper and Lower Hengsha
© Wan Zafran. See disclaimer.