/
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. 15.06.2022 at 01:04 am / Prepackaged Thought Cassettes
  2. 10.01.2020 at 10:40 am / Learned Lumber
  3. 02.01.2020 at 11:48 am / Theory and Theatre
  4. 21.12.2015 at 12:00 am / Emails and English Weather
  5. 18.05.2015 at 12:00 am / Indian Judicial Writing
  6. 17.01.2015 at 12:00 am / Grandma - Guitar Arrangement (NieR Gestalt)
  7. 02.12.2013 at 12:00 am / Coloured Plasmids
  8. 29.11.2013 at 12:00 am / 勉強 - Straining Studious Strength
  9. 19.03.2012 at 12:00 am / Lush Exoplanets
  10. 24.08.2010 at 12:00 am / Correspondences With Matt Treyvaud
© Wan Zafran. See disclaimer.