/
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. 02.04.2023 at 01:03 pm / Witching May Die, But Not Litigation
  2. 20.08.2020 at 08:59 pm / A Case for Legalese (Or Not)
  3. 14.03.2020 at 09:18 pm / Sheets for People
  4. 30.12.2018 at 10:06 pm / Castles and Air
  5. 23.08.2018 at 01:33 am / Darwin's Details
  6. 11.07.2016 at 12:00 am / SublimeREPL's Slow Printing/Freezing - A Solution
  7. 06.10.2015 at 08:02 am / Subservient/Servile Written Malay
  8. 08.06.2015 at 12:00 am / Knowledge Trees
  9. 08.12.2013 at 12:00 am / Alien Blue Entrances
  10. 15.03.2012 at 12:00 am / Cel-Shaded Arena
© Wan Zafran. See disclaimer.