/
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.01.2024 at 08:16 pm / Go Interfaces - By Witcher-Like Metaphors
  2. 29.03.2023 at 10:57 am / Moving Away from Todoist - to Taskwarrior, SSH & Dropbox - Part 2
  3. 20.05.2020 at 01:05 am / A Programmer & His Mechanical Friend
  4. 07.10.2019 at 11:22 am / 3D & 2D - The Demarcation
  5. 16.09.2019 at 10:32 am / Legal Practice & Taking From Software Best Practices
  6. 12.12.2017 at 12:00 am / Innocent Until Proven Guilty
  7. 11.07.2016 at 12:00 am / SublimeREPL's Slow Printing/Freezing - A Solution
  8. 26.12.2013 at 12:00 am / Teal Stares
  9. 16.03.2012 at 12:00 am / Sentient Vocal Directives
  10. 24.08.2010 at 12:00 am / Correspondences With Matt Treyvaud
© Wan Zafran. See disclaimer.