csc-python-solutions/15/b/1 - Forty Below In The Winter.py

7 lines
150 B
Python
Raw Normal View History

2021-02-17 09:36:18 +00:00
temp = input()
2021-02-17 10:45:48 +00:00
temp_num = float (temp[:-1])
if "C" == temp[-1]:
print(temp_num*9/5+32, "F", sep="")
2021-02-17 09:36:18 +00:00
else:
2021-02-17 10:45:48 +00:00
print((temp_num-32)*5/9, "C", sep="")