id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

maxOfTwo


Write an maxOfTwo() function that has two parameters called num1 and num2. This function returns maximum of the two. Don't use Python's built in max() function.
additiveInverse(1) -> -1 additiveInverse(-0.9999) -> 0.9999 additiveInverse(-2) -> 2


maxOfTwo(1, 2) → 2
maxOfTwo(4, 3) → 4
maxOfTwo(0, 0) → 0

...Save, Compile, Run (ctrl-enter)

def maxOfTwo(num1, num2):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 101 Post-solution available

Copyright Nick Parlante 2017 - privacy