Created
October 12, 2017 06:40
-
-
Save Tricky1975/e2108f067a050e2e728c230cb00aba24 to your computer and use it in GitHub Desktop.
Simple script to convert Celcius to Temperatoera and vice vera (Phantasar Chronicles)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
print "1 = Celcius >> Temperatoera" | |
print "2 = Temperatoera >> Celcius" | |
a = None | |
while (a!="1" and a!="2"): a = raw_input("Enter calculation value: ") | |
t = raw_input("Temperature: ") | |
if a=="1": | |
celcius = float(t) | |
temperatoera = (celcius/37)*100 | |
elif a=="2": | |
temperatoera = float(t) | |
celcius = (temperatoera/100)*37 | |
else: | |
print "Sorry, unknown calculation request" | |
quit() | |
print "Celcius: %i"%celcius | |
print "Temperatoera: %i"%temperatoera |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A few notes: