Skip to content

Instantly share code, notes, and snippets.

@Irvingutierrez
Created May 6, 2015 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Irvingutierrez/6b3f4a34ec5f95a642cf to your computer and use it in GitHub Desktop.
Save Irvingutierrez/6b3f4a34ec5f95a642cf to your computer and use it in GitHub Desktop.
WSQ05
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")
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