/
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. 25.08.2020 at 08:42 am / Triple Buffered Painters
  2. 31.12.2019 at 09:03 pm / Reflections - 43 Things I Learned or Did In 2019
  3. 30.12.2018 at 10:06 pm / Castles and Air
  4. 12.03.2016 at 12:00 am / Transcript of Tifa Funk - Interlude Solo (Tifa's Theme by Tetrimino)
  5. 05.03.2016 at 12:00 am / Rather Be (Alexa Goddard's Version)
  6. 08.02.2016 at 12:00 am / Eye to Eye (Jonathan Young's Version)
  7. 12.07.2015 at 12:00 am / José Mujica's Humility
  8. 13.06.2015 at 12:00 am / Sexism Against Modern Men
  9. 17.01.2015 at 12:00 am / Grandma - Guitar Arrangement (NieR Gestalt)
  10. 02.12.2013 at 12:00 am / Coloured Plasmids
© Wan Zafran. See disclaimer.