import sys def checkNum(number): try: number = float(number) except ValueError: print("That is not a float.") sys.exit() return number