temp = input("Please select 1 (Celsius) or 2 (Fahrenheit): ")
temp2 = float(input("Please input the temperature: "))
if temp == "1":
# 攝氏轉華氏
temp3 = round(temp2 * 9/5 + 32, 2)
print("Celsius", temp2, "degree = Fahrenheit", temp3, "degree")
elif temp == "2":
# 華氏轉攝氏
temp3 = round((temp2 - 32) * 5/9, 2)
print("Fahrenheit", temp2, "degree = Celsius", temp3, "degree")
else:
print("Invalid selection! Please enter 1 or 2.")