Conditional statement, while loop statement: complete temperature conversion program

a = input( ' Convert from Celsius to Fahrenheit please press 1/n to convert Fahrenheit to Celsius please press 2/n ' )
 if a == ' 1 ' :
    celsius =float(input( ' Input Celsius: ' ))
    fahrenheit =(celsius*9/5)+32
     print ( ' {:.2f}Celsius to Fahrenheit{:. 2f} ' .format(celsius,fahrenheit))
 elif a == ' 2 ' :
    fahrenheit =float(input( ' Please enter Fahrenheit: ' ))
    celsius =9/5*(f-32 )
     print ( ' {:.2f}Fahrenheit to Celsius:{:.2f} ' .format(fahrehheit,celsius))
 else :
     break :

 

Guess you like

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