/
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. 20.06.2022 at 01:56 pm / Cultists of Science
  2. 04.06.2020 at 09:43 am / A Traveling Minstrel's Piano
  3. 13.02.2020 at 10:29 am / The Code Language Lawyers
  4. 06.10.2015 at 08:02 am / Subservient/Servile Written Malay
  5. 20.06.2015 at 12:00 am / Mike Tyson on (His) Lawyers
  6. 12.06.2015 at 12:00 am / He Conquers Who Endures
  7. 11.11.2013 at 12:00 am / 下戸 - Lower House
  8. 04.07.2012 at 12:00 am / When To Not Use Data Structures/Algorithms
  9. 25.09.2010 at 12:00 am / 汗牛充棟
  10. 14.08.2010 at 12:00 am / 百花繚乱
© Wan Zafran. See disclaimer.