152k views
3 votes
Write a program that will input two numbers and print the larger number on the screen.

User Fbede
by
4.5k points

1 Answer

4 votes

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

if num1 > num2:

print(num1)

else:

print(num2)

I hope this helps!

User Carlos Chourio
by
4.5k points