Guest User

Untitled

a guest
May 19th, 2016
1,332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. # Fahrenheit to Celsius
  2. # enter the value
  3. fahr = raw_input("Enter the value in Fahrenheit, please:")
  4.  
  5. # convert the fahr string to float
  6. fahr = float(fahr)
  7.  
  8. # calculate the cel and print it
  9. cel = (fahr - 32) * 5.0 / 9.0
  10. print str(fahr) + " -> " + str(cel)
Advertisement
Add Comment
Please, Sign In to add comment