Python how to only accept numbers as a input
问题 mark= eval(raw_input("What is your mark?")) try: int(mark) except ValueError: try: float(mark) except ValueError: print "This is not a number" So I need to make a python program that looks at your mark and gives you varying responses depending on what it is. However I also need to add a way to stop random text which isn't numbers from being entered into the program. I thought I had found a solution to this but it won't make it it past the first statement to the failsafe code that is meant to