home

Scientific Computing (Psychology 9040a)

Fall, 2021

Temperature Converter


Write a script to convert temperature values from Celsius to Farenheit according to the equation:

\[\begin{equation} F = \frac{9}{5}C + 32 \end{equation}\]

The program should ask the user to input the temperature in Celsius, and then print out a sentence giving the temperature in Fahrenheit, using one decimal place of precision, like this:

enter the temperature in Celsius: 22.0
22.0 degrees Celsius is 71.6 degrees Fahrenheit

sample solution