def main(): # Compute the fine if driving over the speed limit print() try: speed=float(input("Please enter the speed of the vehicle [mph]: ")) speedLimit=float(input("Please enter the speed limit, in mph: ")) fine=0 if (speed>speedLimit): fine=(speed-speedLimit)*5 + 50 if (speed>90): fine=fine+200 print("The fine is ${}.".format(fine)) else: print("There is no fine since the speed did not exceed the speed limit.") except ValueError: print("You must enter a number for the speed and speed limit.") print("Please run the program again, entering a number for speed and speed limit") except: print("Something sent wrong") fine=0 ## if (speed>speedLimit): ## fine=(speed-speedLimit)*5 + 50 ## if (speed>90): ## fine=fine+200 ## print("The fine is ${}.".format(fine)) ## else: ## print("There is no fine since the speed did not exceed the speed limit.") main()