I have this code:
applesToday = input('Hope you\'re having a nice day! How many apples have you\'ve eaten?')
if applesToday >= str(1) and applesToday< str(2):
print('You\'ve had 1 apple')
elif applesToday < str(1) and applesToday >= str(0):
print('You\'ve had 0 apples')
else:
print('You\'ve had {0} apples,'.format(applesToday))
The problem is that the code accepts non-integer inputs, and successfully compares them.
How can I make it so that the code only takes an integer, and does proper numeric comparisons?