Prompt the User
Now coming back to the error again, it says that you are doing something with a
str and an
int. Maybe you know a little bit about the
input() function, and you already know why this error now occurs.
And now when you run the module again and add
72 for the Fahrenheit and
37 for the Celsius, then the result is as expected. That’s good news. So with the
float() function call, you convert the input, which comes in as a
str, into a
float, and then all your calculations work.
Become a Member to join the conversation.