12 lines
348 B
Python
12 lines
348 B
Python
>>> while True:
|
|
k = float(input('K ? '))
|
|
print("%g Kelvin = %g Celsius = %g Fahrenheit = %g Rankine degrees."
|
|
% (k, k - 273.15, k * 1.8 - 459.67, k * 1.8))
|
|
|
|
|
|
K ? 21.0
|
|
21 Kelvin = -252.15 Celsius = -421.87 Fahrenheit = 37.8 Rankine degrees.
|
|
K ? 222.2
|
|
222.2 Kelvin = -50.95 Celsius = -59.71 Fahrenheit = 399.96 Rankine degrees.
|
|
K ?
|