/
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. 18.10.2022 at 09:36 am / The Airplane Test of Fluency
  2. 27.04.2020 at 07:11 pm / How Science Should Be
  3. 19.02.2020 at 10:25 am / STEM, STEAM and Art
  4. 24.01.2016 at 12:00 am / Prayers Like Magic
  5. 21.12.2015 at 12:00 am / Emails and English Weather
  6. 24.10.2015 at 12:00 am / Salomon v Salomon is Antiquated
  7. 16.10.2015 at 12:00 am / Don Ted E. Bear Waltz - Guitar Arrangement (Sam & Max)
  8. 12.07.2015 at 12:00 am / José Mujica's Humility
  9. 29.11.2013 at 12:00 am / 勉強 - Straining Studious Strength
  10. 26.03.2012 at 12:00 am / Apricot Orange Sunsets
© Wan Zafran. See disclaimer.