Can't convert a number to a float
问题 I'm trying to solve a homework problem as an extreme novice to python, and I don't understand what I'm doing wrong. I have the code and error message below, hoping that someone can tell me where I went wrong. The miles input tries 10, 50, then 100. Which works. Mpg is 20.0. Also works. gp input is 3.1599, which gives me this error. Not sure why. miles = float(input()) mpg = float(input()) gp = float(input()) price = (miles*1.0/mpg)*gp print(price) Traceback (most recent call last): File "main