As you can tell, I am a fairly novice Python coder. As of current I am just making some little test programs and trying to ensure all my indentation and whatever is done properly before trying any large programs. So I am trying to ensure that if an input is not an integer, then the program outputs a message saying an integer must be inputted. However, with the current code I have (which I think should be correct) regardless of the answer the "please input an integer" message is outputted. What have I done wrong? Here is the code:
a = input("What is your age?")
b = 7
c = ((a-2) * 4) +25
if a == int:
print "Your age in a small dog's years is:", ((a-2) * 4)+28
print "Your age in a medium sized dog's years is:", ((a-2) * 6)+27
print "Your age in a big dog's years is:", ((a-2) * 9)+22
print "Your age in cat years is:", c
print "Your age in guinea pig years is:", a * 15
print "Your age in hamster years is:", a * 20
print "Your age in pig years is:", ((a-1) * 4)+18
print "Your age in goldfish years is:", ((a-1) * 8)+188
print "Your age in cow years is:", ((a-1) * 4)+14
print "Your age in horse years is:", a * 3
print "Your age in goat years is:", ((a-1) * 6)+18
print "Your age in rabbit years is:", ((a-1) * 8)+20
print "Your age in chinchilla years is:", ((a-1) * 7)+17
elif a != int:
print "You must enter an integer!"
It works otherwise, it's just this little end two lines that seem to ruin it. Thanks.