I need to have an input where the user writes the temperature in either celsius or fahrenheit, and it will convert it to the opposite one. I cant figure out why it's not working (there is no output at all)
this is my code: (forgive me for bad naming)
the_print = input ("Insert the temperature you would like to convert:")
the_slice = the_print [-1 : :]
the_number = the_print [ : -1 ]
if the_slice == "f" or the_slice == "F" :
print = (float(the_number) - 32) / 1.8
elif the_slice == "c" or the_slice == "C" :
print = (float(the_number) *1.8 + 32)