Jun-04-2021, 02:05 AM
(This post was last modified: Jun-04-2021, 09:43 AM by Gribouillis.)
Found it.
My option was a str and not an int. changed the first input to an int, and she works. Thanks anyways guys, i'm sure i'll be back again!
My option was a str and not an int. changed the first input to an int, and she works. Thanks anyways guys, i'm sure i'll be back again!
print("Option 1: Convert Fahrenheit to Celsius") print("Option 2: Convert Celsius to Fahrenheit") choice = int(input("Which do you want to do? Option ")) if choice == 1: fahrenheit = int(input("Enter the temp in Fahrenheit: ")) f_to_c = (fahrenheit - 32)*(5/9) print("The Celsius equivalent is: %4.3f" %(f_to_c)) if choice == 2: celsius = int(input("Enter the temp in Celcius: ")) c_to_f = (celsius*9/5)+32 print("The Celsius equivalent is: %4.3f" %(c_to_f))
Gribouillis write Jun-04-2021, 09:43 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I fixed for you this time. Please use code tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I fixed for you this time. Please use code tags on future posts.