You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fahrenheit = int(input("Please type in a temperature (F): "))
celsius = (fahrenheit - 32)*(5/9)
if celsius >= 0:
print(f"{fahrenheit} degrees Fahrenheit equals {celsius} degrees Celsius")
if celsius < 0:
print(f"{fahrenheit} degrees Fahrenheit equals {celsius} degrees Celsius")
print("Brr! it's cold in here!")
And it works perfectly fine for positive and negative numbers including zero!
So what's the problem with the test button? Because when i press it, it gives me this:
Your program did not print out message 'Brr! It's cold in here!' in a case where the temperature is below zero. Make sure that this print out happens with input -34
Which is clearly wrong cause when i put an input : -34
my code runs well as it's shown below:
Please type in a temperature (F): -34
-34 degrees Fahrenheit equals -36.66666666666667 degrees Celsius
Brr! it's cold in here!
Please fix it! Thank you!
The text was updated successfully, but these errors were encountered:
Hello!
I wrote the following program!
fahrenheit = int(input("Please type in a temperature (F): "))
celsius = (fahrenheit - 32)*(5/9)
if celsius >= 0:
print(f"{fahrenheit} degrees Fahrenheit equals {celsius} degrees Celsius")
if celsius < 0:
print(f"{fahrenheit} degrees Fahrenheit equals {celsius} degrees Celsius")
print("Brr! it's cold in here!")
And it works perfectly fine for positive and negative numbers including zero!
So what's the problem with the test button? Because when i press it, it gives me this:
Your program did not print out message 'Brr! It's cold in here!' in a case where the temperature is below zero. Make sure that this print out happens with input -34
Which is clearly wrong cause when i put an input : -34
my code runs well as it's shown below:
Please type in a temperature (F): -34
-34 degrees Fahrenheit equals -36.66666666666667 degrees Celsius
Brr! it's cold in here!
Please fix it! Thank you!
The text was updated successfully, but these errors were encountered: