Untitled

mail@pastecode.io avatar
unknown
plain_text
18 days ago
458 B
0
Indexable
Never
n1 = float(input("ENTER FIRST NUMBER:"))
n2 = float(input("ENTER SECOND NUMBER:"))
n3 = float(input("ENTER THIRD NUMBER:"))

# Find largest
if (n1 > n2) and (n1 > n3):
   large = n1
elif (n2 > n1) and (n2 > n3):
   large = n2
else:
   large = n3
   
# Find smallest
if (n1 < n2) and (n1 < n3):
   small = n1
elif (n2 < n1) and (n2 < n3):
   small = n2
else:
   small = n3
 
print("The large number is", large, "\n")
print("The small number is", small, "\n")
Leave a Comment