I am wondering what I'm doing wrong. I want the following if/else statement to print "The number is 4." when 4 is entered in the input. But after entering 4, it always says "Number is not 4." It is in python. Thanks in advance
if sample_number == 4:
print("The number is 4")
else:
print("Number is not 4.")
sample_numberis the string4and not the number 4. Try like this: int(sample_number).