def convert_to_fahr(cels):
fahr = cels * 9 / 5 + 32
return fahr
def temp_table(start, end, step):
print("摂氏 華氏\n---------")
for c in range(start, end, step):
f = int(convert_to_fahr(c))
print(f"{c:4d} {f:4d}")
temp_table(-20, 50, 10)
# プログラム7-11(摂氏温度と華氏温度の対応表)