Created
May 6, 2015 23:23
-
-
Save Irvingutierrez/6b3f4a34ec5f95a642cf to your computer and use it in GitHub Desktop.
WSQ05
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
print("Temperature converter") | |
print() | |
t=str(input("Will you introduce the temperature in Farenheit or Celsius ")) | |
if len(t)> 7: | |
F=int(input("What is the temperature in farenheit ")) | |
c=5*((F-32)/9) | |
if c >= 100: | |
print("The temperature in Celsius is ", c, "º and the water is boiling") | |
else: | |
print("The temperature in Celsius is ", c, "º and the water is not boiling") | |
else: | |
C=int(input("What is the temperature in celsius ")) | |
f=((C*(9/5))+32) | |
if f >= 212: | |
print("The temperature in Farenheit is ", f, "º and the water is boiling") | |
else: | |
print("The temperature in Farenheit is ", f, "º and the water is not boiling") |
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
print("Temperature converter, Irving Gutierrez") | |
print() | |
print("You want to convert the temperature from farenheit or from celsius") | |
t=str(input()) | |
print() | |
if t== "farenheit" or t=="FARENHEIT" or t=="Farenheit": | |
print("What is the temperature in farenheit ") | |
F=int(input()) | |
c=5*((F-32)/9) | |
print() | |
if c >= 100: | |
print("The temperature in Celsius is ", c, "º") | |
print("The water is boiling!!") | |
else: | |
print("The temperature in Celsius is ", c, "º") | |
print("The water is not boiling") | |
elif t== "celsius" or t== "CELSIUS" or t== "Celsius": | |
print("What is the temperature in celsius ") | |
C=int(input()) | |
f=((C*(9/5))+32) | |
print() | |
if f >= 212: | |
print("The temperature in Farenheit is ", f, "º") | |
print("The water is boiling!!") | |
else: | |
print("The temperature in Farenheit is ", f, "º") | |
print("The water is not boiling") | |
else: | |
print("That is an invalid measure") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment