/
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. 30.04.2022 at 10:36 am / Masters of A Fraction of A Dot
  2. 07.12.2017 at 12:00 am / A Reputation Without Oil
  3. 24.10.2015 at 12:00 am / Salomon v Salomon is Antiquated
  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. 05.07.2014 at 12:00 am / Jack Hamm on (Artistic) Practice
  8. 11.12.2013 at 12:00 am / Lighting Wizardry
  9. 29.11.2013 at 12:01 am / 美しい - Beautifully Woolly
  10. 17.03.2012 at 12:00 am / Upper and Lower Hengsha
© Wan Zafran. See disclaimer.