/
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. 26.12.2022 at 08:20 pm / Lusa to Overmorrow, Kelmarin to Ereyesterday
  2. 03.07.2022 at 05:15 pm / The Unpreparedness Apology
  3. 11.06.2022 at 11:30 am / Salted Correspondences
  4. 11.06.2022 at 07:24 am / Vampiric Pathology
  5. 03.07.2021 at 10:31 am / Learning Forever
  6. 29.01.2020 at 10:48 am / Code & Shame
  7. 21.08.2018 at 10:59 am / Roses as Time
  8. 19.07.2015 at 12:00 am / Deadened Demonyms
  9. 17.03.2012 at 12:00 am / Upper and Lower Hengsha
  10. 14.08.2010 at 12:00 am / 豹変
© Wan Zafran. See disclaimer.