making for practice a temp converter. i got the basic program to convert C to F. heres that part:
C = input("what temperature (celius) do you need converted? ")
print "%s degrees celsius is equal to %s degrees Farenheit" % (C, 32+(212-32) / 100.0 * C
now im trying to add an input to have the user choose if they want to convert from C to F or from F to C. keeps saying "name 'c' is not defined" cant seem to fig it out. heres the code:
sel = input("select C for c to f, or F for f to c ? ")
print "%s degrees farenheit is equal to %s degrees celcius" % ((F-32) * 100.0 / (212-32))
F = input("what temp (farenheit) do you need converted? ")
C = input("what temperature (celius) do you need converted? ")
print "%s degrees celsius is equal to %s degrees Farenheit" % (C, 32+(212-32) / 100.0 * C)
any help would be much appreciated as i am teaching myself and this is my 1st and only language so far so its tough. ty in advance. :)