SHARE
TWEET

Untitled

a guest Aug 12th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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!"
RAW Paste Data
Top