temperature conversion program

> a=input( ' To convert from Celsius to Fahrenheit, please press 1/n to convert Fahrenheit to Celsius, please press 2/n ' )
To convert Celsius to Fahrenheit, please press 1 /n to convert Fahrenheit to Celsius, please press 2/n1/ n
 >>> celsius= float (input( ' Please enter the Celsius temperature ' ))
Please enter a temperature of 89 in Celsius
fahrenheit =(celsius* 9 / 5 )+ 32 
>>> print( ' { {:.2f} Celsius to Fahrenheit {:.2f} ' .format(celsius, fahrenheit))
 print( ' {:.2f} Celsius to Fahrenheit {:.2f} ' .format(celsius, fahrenheit))
{:.2f} Celsius to Fahrenheit 89.00

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324743326&siteId=291194637