/
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. 29.11.2023 at 11:04 pm / Of Witchers By Trade
  2. 29.03.2023 at 09:38 am / Moving Away from Todoist - to Taskwarrior, SSH & Dropbox - Part 1
  3. 21.07.2021 at 07:46 am / Basis for Base64
  4. 14.09.2019 at 12:00 am / Narratives Hold
  5. 23.07.2015 at 12:00 am / The Line Between Gifts and Bribes
  6. 19.07.2015 at 12:00 am / Deadened Demonyms
  7. 18.05.2015 at 12:00 am / Indian Judicial Writing
  8. 28.11.2013 at 12:00 am / ケチ - Scroogean Niggardliness
  9. 04.07.2012 at 12:00 am / When To Not Use Data Structures/Algorithms
  10. 28.08.2010 at 12:00 am / 身から出た錆
© Wan Zafran. See disclaimer.