Com a definição da função Python :
def c_to_f(c_temp):
return (9/5) * c_temp + 32
def f_to_c(f_temp):
return (f_temp - 32) * (5/9)
for celcius_temp in range(-55, 220, 10):
print('{} C\t{} F'.format(celcius_temp, c_to_f(celcius_temp)))
Exemplo de saída:
-55 C -23 F
-45 C -13 F
-35 C -3 F
-25 C 7 F
-15 C 17 F
-5 C 27 F
5 C 37 F
15 C 47 F
25 C 57 F
35 C 67 F
45 C 77 F
55 C 87 F
65 C 97 F
75 C 107 F
85 C 117 F
95 C 127 F
105 C 137 F
115 C 147 F
125 C 157 F
135 C 167 F
145 C 177 F
155 C 187 F
165 C 197 F
175 C 207 F
185 C 217 F
195 C 227 F
205 C 237 F
215 C 247 F