/
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. 21.07.2021 at 07:46 am / Basis for Base64
  2. 02.07.2021 at 09:51 am / The Problem With New Tools
  3. 22.08.2020 at 05:49 pm / Decoding Code Specimens
  4. 04.06.2020 at 09:43 am / A Traveling Minstrel's Piano
  5. 23.06.2019 at 10:59 am / Mood-Clustered Compositions
  6. 31.12.2018 at 06:23 pm / Why Plain Text
  7. 14.06.2015 at 12:00 am / Just the Two of Us (6-Bar Guitar/Sax Copy)
  8. 12.06.2015 at 12:00 am / He Conquers Who Endures
  9. 16.08.2010 at 12:00 am / Lost Nuances in 'Ivan the Terrible'
  10. 15.08.2010 at 12:00 am / 海老
© Wan Zafran. See disclaimer.