Answer to Question #98098 in Python for Drew

Question #98098
Edhesive Code Practice 2.8:
Write a program that takes three numbers as input and prints the largest.

Enter a number: 20
Enter a number: 50
Enter a number: 5
Largest: 50
1
Expert's answer
2019-11-08T08:09:18-0500

num1 = raw_input("Enter a number:")

num2 = raw_input("Enter a number:")

num3 = raw_input("Enter a number:")

if (num1 >= num2) and (num1 >= num3):

largest = num1

elif (num2 >= num1)and (num2 >= num3):

largest = num2

else:

largest = num3

print "Largest: {}".format(largest)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS