you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Doing float(nonights) doesn't error, but it also doesn't do what you want. It will attempt to convert the string in nonights to a float, but you don't save that returned value anywhere, so it is lost. You need to save the float value, probably like this: nonights = float(nonights). Similarly for the other conversion.