mark= eval(raw_input(\"What is your mark?\")) try: int(mark) except ValueError: try: float(mark) except ValueError: print \"This is not a
remove eval and your code is correct:
mark = raw_input("What is your mark?") try: int(mark) except ValueError: try: float(mark) except ValueError: print "This is not a number"
Just checking for a float will work fine:
try: float(mark) except ValueError: print "This is not a number"