Hello there,
I’ve a problem with IDLE and the same with VisualCodeStudio.
Why the code don’t work?
“5 degrees” is not a valid number, float
doesn’t extract the number from a string, it just converts a valid float from a string to a float
Yes, but the teacher in the course, change the string in float or int using float(…) or int(…)
I don’t understand why don’t work the exemple on my IDLE or VCS.
What I wrong?
python will not convert “5 degree” to a float. It can convert "5"
, or "5.0"
or " 5.0 "
tho
1 Like
thanks! now I understand
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.