dennoh

degreeToFahrenheit

Jan 21st, 2021
639
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def degreeToFahrenheit(degree_celcius):
  2.     return (degree_celcius * 5/9) + 32
  3.  
  4.  
  5. if __name__ == "__main__":
  6.     try:
  7.         degree_celcius = float(input("Enter Temperature in Degree celcius: "))
  8.         print(f'Temperature in Fahrenheit: {round(degreeToFahrenheit(degree_celcius), 2)}')
  9.     except ValueError:
  10.         print("Enter a valid")
  11.  
  12.  
  13.  
RAW Paste Data