print "Tere Tulemast kraaditeisendusprogrammi" print "---------------------------------------------" q = 0 while q == 0: print "Kumba pidi sa tahad teisendada?" print "1 - Fahrenheitist Celsiuseks" print "2 - Celsiusest Fahrenheitiks" print "3 - Celsiusest Kelviniks" print "4 - Kelvinist Celsiuseks" print "5 - Fahrenheitist Kelviniks" print "6 - Kelvinist Fahrenheitiks" x = int(raw_input()) if x == 1: try: f = int(raw_input("Sisesta temperatuur, mida soovid teisendada: ")) f = (f - 32) / 9.0 * 5 print f q = 1 except ValueError: print "Pole number" elif x == 2: try: c = int(raw_input("Sisesta temperatuur, mida soovid teisendada: ")) c = (c * 9.0 / 5) + 32 print c q = 2 except ValueError: print "Pole number" elif x == 3: try: s = int(raw_input("Sisesta temperatuur, mida soovid teisendada: ")) s = s + 273.15 print s q = 3 except ValueError: print "Pole number" elif x == 4: try: w = int(raw_input("Sisesta temperatuur, mida soovid teisendada: ")) if w > 273.14: w = w - 273.15 print w q = 4 else: print "number liiga väike" except ValueError: print "Pole number" elif x == 5: try: g = int(raw_input("Sisesta temperatuur, mida soovid teisendada: ")) g = (g - 32) / 9.0 * 5 + 273.15 print g q = 5 except ValueError: print "Pole number" elif x == 6: try: h = int(raw_input("Sisesta temperatuur, mida soovid teisendada: ")) if h > 273.14: h = h -273.15 h = (h * 9.0 / 5) + 32 print h q = 6 else: print "number liiga väike" except ValueError: print "Pole number" else: print "Sisesta numbreid ühest kuueni"