99.3k views
0 votes
Write a program in Python to compare between two numbers and print a message a greater than b.

User Talisin
by
7.7k points

1 Answer

3 votes

Answer:

a = input("Enter the first number: ") b = input("Enter the second number: ") # if a is b: - Compares id's, and can cause inconsistencies. Use == instead. if a == b: print "Both inputs are equal" else: print "Your input is not equal."

User Hans Meyer
by
7.3k points