I am new to python and I do not know how to go about this problem exactly. If I want to compare two integers to see if they are equal, how would I set that up? For example, enter a number for a, enter a number for b and see if they are equal or not?
I am new to python and I do not know how to go about this problem exactly. If I want to compare two integers to see if they are equal, how would I set that up? For example, enter a number for a, enter a number for b and see if they are equal or not?
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."