Task There are two widespread systems of measuring temperature - Celsius and Fahrenheit. First is quite popular in Europe and second is well...
Task
There are two widespread systems of measuring temperature - Celsius and Fahrenheit. First is quite popular in Europe and second is well in use in United States for example.
By Celsius scale water freezes at 0 degrees and boils at 100 degrees. By Fahrenheit water freezes at 32 degrees and boils at 212 degrees. Use these two points for conversion of other temperatures.
You are to write program to convert degrees of Fahrenheit to Celsius.
Input data contains N+1
values, first of them is N
itself (Note that you should not try to convert it).
Answer should contain exactly N
results, rounded to nearest integer and separated by spaces.
Test Data : 37 276 135 360 149 304 190 223 335 97 414 418 108 228 531 565 425 236 210 584 512 164 122 367 302 461 57 101 54 435 482 438 110 586 197 228 290 356
Program
a = '37 276 135 360 149 304 190 223 335 97 414 418 108 228 531 565 425 236 210 584 512 164 122 367 302 461 57 101 54 435 482 438 110 586 197 228 290 356'
ls = a.split(' ') lists = [] for i in ls: lists.append(int(i)) for j in lists[1:]: print(round((j-32)*5/9), end=' ')
COMMENTS