num=float(raw_input('Enter a number: '))
if num <0:
print "-"
elif num>0:
print "+"
else:
print "0"
this is a simple example from one book. It works fine, but I have a question, how to make that this program would see that I'm entering a letter instead of a number? It works just fine if I'm using numbers, but if I'm entering a letter, the program crashes. I understand that when a program gets a raw input, it needs to check if it is a number or another symbol, but I just don't know what the simplest solution would be?