/
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. 04.07.2021 at 09:08 am / Learning D3 with P5/Processing
  2. 29.09.2020 at 12:24 pm / Rays of Circumstance
  3. 19.02.2020 at 10:25 am / STEM, STEAM and Art
  4. 02.01.2020 at 11:48 am / Theory and Theatre
  5. 22.08.2018 at 02:13 pm / Heinrich Schliemann's Learning Method
  6. 16.10.2015 at 12:00 am / Statements Without Data
  7. 17.01.2015 at 12:00 am / Grandma - Guitar Arrangement (NieR Gestalt)
  8. 19.03.2012 at 12:00 am / Lush Exoplanets
  9. 28.08.2010 at 12:00 am / 身から出た錆
  10. 14.08.2010 at 12:00 am / Basic Kanji Learning Principles
© Wan Zafran. See disclaimer.