/
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. 17.10.2022 at 12:31 pm / AI Art Is Real Art
  2. 31.07.2022 at 10:08 pm / Hades And (Non-Ending) Desk Jobs
  3. 30.04.2022 at 10:36 am / Masters of A Fraction of A Dot
  4. 29.01.2020 at 10:48 am / Code & Shame
  5. 05.03.2016 at 12:00 am / Rather Be (Alexa Goddard's Version)
  6. 11.08.2015 at 12:00 am / Proper Denials and Bare Denials
  7. 14.06.2015 at 12:00 am / Just the Two of Us (6-Bar Guitar/Sax Copy)
  8. 08.06.2015 at 12:00 am / Knowledge Trees
  9. 10.12.2013 at 12:00 am / Yellow Rails
  10. 21.07.2012 at 12:00 am / Hunted By GLaDoS
© Wan Zafran. See disclaimer.