37.1k views
5 votes
Write a program that takes two decimal numbers as input and print the largest. If the numbers are equal, print one of them.

User Kkurni
by
5.5k points

1 Answer

2 votes

print(max(float(input("Enter a decimal number: ")),float(input("Enter a decimal number: "))))

This would be the simplest way to do it. Best of luck.

User Benjamin Barenblat
by
5.7k points