/
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.
Table of Contents

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. 18.10.2022 at 09:36 am / The Airplane Test of Fluency
  3. 06.06.2022 at 12:26 pm / To Teach or To Paint
  4. 22.08.2018 at 02:13 pm / Heinrich Schliemann's Learning Method
  5. 02.01.2018 at 12:00 am / Genuinely Technical Modesty
  6. 03.01.2016 at 12:00 am / Creators And Their Gems (Polished or Otherwise)
  7. 16.10.2015 at 12:00 am / Don Ted E. Bear Waltz - Guitar Arrangement (Sam & Max)
  8. 13.06.2015 at 12:00 am / Sexism Against Modern Men
  9. 16.03.2012 at 12:00 am / Sentient Vocal Directives
  10. 16.08.2010 at 12:00 am / You Have Reason
© Wan Zafran. See disclaimer.