/
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. 16.12.2017 at 12:00 am / Sketch, Draft, Craft
  2. 05.03.2016 at 12:00 am / Rather Be (Alexa Goddard's Version)
  3. 16.10.2015 at 12:00 am / Don Ted E. Bear Waltz - Guitar Arrangement (Sam & Max)
  4. 18.06.2015 at 12:00 am / Crisp Tweets
  5. 08.12.2013 at 12:00 am / Alien Blue Entrances
  6. 02.12.2013 at 12:00 am / Coloured Plasmids
  7. 14.04.2012 at 12:00 am / Ghostly Portal
  8. 15.08.2010 at 12:00 am / 海老
© Wan Zafran. See disclaimer.