You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales.
Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.
Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.
Formula to convert from Kelvin K to Celsius C is C = K - 273.
Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively.
The input contains the temperature (a number) and the unit of the temperature scale (C, F, K) without any space.
The output contains temperature in Celsius, Fahrenheit and Kelvin scales
The first line of output should contain the Celsius value and the unit of the Celsius without any space.For example, if the given temperature Value is 25C then Celsius value is 25.0C, Fahrenheit value is 77.0F, and Kelvin value is 298.0K.
Sample Input 1
25C
Sample Output 1
25.0C
77.0F
298.0K
Sample Input 2
37.5F
Sample Output 2
3.06C
37.5F
276.06K
# Create displayList
displayList = []
# Loop through the prices in levelsList.
# During each loop:
# - Create a variable called priceLevelLabel consisting of the text 'Price Level: ' followed
# by the price.
# - Add priceLevelLabel and the price as two separate items to a new list (the sub-List).
# - Append the sub-List to displayList.
for price in self.levelsList:
...
# Loop through the prices in levelsList.
# During each loop:
# - Create a variable called priceLevelLabel consisting of the text 'Price Level: ' followed
# by the price.
# - Add priceLevelLabel and the price as two separate items to a new list (the sub-List).
# - Append the sub-List to displayList.
for price in self.levelsList:
...
# Create a variable called previousPriceLabel consisting of the text 'Previous Price: ' followed
# by previousPrice.
# Add previousPriceLabel and previousPrice as two separate items to a new list (the sub-List).
# Append the sub-List to displayList.
...
# Create a variable called currentPriceLabel consisting of the text 'Current Price: ' followed
# by currentPrice.
# Add currentPriceLabel and currentPrice as two separate items to a new list (the sub-List).
# Append the sub-List to displayList.
...