/
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. 04.07.2024 at 08:43 am / Chronic Key Switching
  2. 03.07.2022 at 05:15 pm / The Unpreparedness Apology
  3. 11.02.2021 at 12:56 am / 46 Simple Python Exercises/#01
  4. 25.08.2020 at 08:42 am / Triple Buffered Painters
  5. 05.02.2020 at 10:26 pm / Nostalgic Raging Streets
  6. 07.10.2019 at 11:22 am / 3D & 2D - The Demarcation
  7. 12.12.2017 at 12:00 am / Innocent Until Proven Guilty
  8. 05.03.2016 at 12:00 am / Rather Be (Alexa Goddard's Version)
  9. 11.08.2015 at 12:00 am / Proper Denials and Bare Denials
  10. 26.03.2012 at 12:00 am / Apricot Orange Sunsets
© Wan Zafran. See disclaimer.