Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # Your code here...
  2. def ctof(celcius):
  3. return celcius * 1.8 + 32
  4. def ftoc(fahrenheit):
  5. return (fahrenheit -32) / 1.8
  6. try:
  7. print ctof(float(input("Enter a number to convert to fahrenheit from celcius: ")))
  8. print ftoc(float(input("Enter a number to convert to celcius from fahrenheit: ")))
  9. except ValueError:
  10. print "Sorry! You need to enter a NUMBER!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement