/
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. 31.07.2022 at 10:08 pm / Hades And (Non-Ending) Desk Jobs
  2. 10.07.2021 at 01:46 pm / Plants Are Maths
  3. 03.07.2021 at 10:31 am / Learning Forever
  4. 29.08.2020 at 09:22 pm / Magnum Norvig
  5. 31.12.2018 at 06:23 pm / Why Plain Text
  6. 15.12.2017 at 12:00 am / The Python Paradox
  7. 08.02.2016 at 12:00 am / Eye to Eye (Jonathan Young's Version)
  8. 16.10.2015 at 12:00 am / Don Ted E. Bear Waltz - Guitar Arrangement (Sam & Max)
  9. 10.12.2013 at 12:00 am / Yellow Rails
© Wan Zafran. See disclaimer.