or

ask mattrab Visit www.askmattrab.com for more academic resources.

BASIC PYTHON PROGRAM: WAP to find the Greatest Number among 3

a= float(input("Enter a number "))
b= float(input("Enter a number "))
c= float(input("Enter a number "))
if (a>b) and (a>c):
gnum= a
elif (b>a) and (b>c):
gnum=b
else:
gnum=c
print("The largest number among",a,",",b,"and",c,"is: ",gnum)