- Joined
- Jan 11, 2023
- Messages
- 2
- Reaction score
- 0
I have created a temperature conversion program. It works fine for the most part. However, I'm receiving an "Assertion Error" message:
I've tried to figure out what could be causing the error message but having difficulty getting to the root of the issue.
I'm currently learning Python and could use some pointers on this. Thanks.
Python:
def convert_to_fahrenheit(degrees_celsius):
f = degrees_celsius * (9 / 5) + 32
print(f)
def convert_to_celsius(degrees_fahrenheit):
c = (degrees_fahrenheit - 32) * (5 / 9)
print(c)
while True:
try:
assert convert_to_celsius(11)
except AssertionError as error:
print("Assertion Error")
break
I've tried to figure out what could be causing the error message but having difficulty getting to the root of the issue.
I'm currently learning Python and could use some pointers on this. Thanks.