Posted on

Greater of three numbers in Python


def max(num1, num2, num3):
if num1 >=num2 and num1 >=num3:
return num1
elif num2 >= num1 and num2 >=num3:
return num2
else:
return num3

print (max(7,9,2))










Write a comment