Coding basics · 2 of 20
Biggest of three numbers
Return the largest of the three numbers a, b and c, without using max().
What you need
if runs its indented lines only when the condition is true. A variable can be changed later: keep the biggest so far and replace it when you find a bigger one.
biggest = a
if b > biggest:
biggest = bExamples
Input a = 1, b = 5, c = 3
Output 5
Input a = -5, b = -2, c = -9
Output -2