1.輸入攝氏轉華氏
2.輸入華氏轉攝氏
公式為:
華氏 = 9/5*攝氏+32
攝氏 = (華氏-32)* 5/9

參考:
print("請輸入攝氏C")
c=float(input())
f= 9/5 * c + 32 #華氏 =9/5*攝氏+32
print("華氏 = ",f,"度F")
print("==============================")
print("請輸入華氏C")
f=float(input())
C = (f- 32) * 5/9 #攝氏=(華氏-30)*5/9
print("攝氏 = ",C,"度C")

Yiru@Studio - 關於我 - 意如