In [4]:
def main():
    temperature_type = input("Whould you like to convert Fahrenheit or Celsius:(f)(c) ")
    print(temperature_type)
    
    if temperature_type == 'c':
        Fahrenheit = float(input("Enter the temperture in Fahrenheit "))
        Celsius = (Fahrenheit - 32) * (5/9)
        print("The temperature in Fahrenheit is:{}".format(Celsius))
    
    elif temperature_type == 'f':
        Celsius = float(input("Enter your temperture in Fahrenheit > "))
        Fahrenheit = (Celsius * 9/5) + 32
        print("The Temperature in Celsius is:{}".format(Fahrenheit))
        
        
    reset = input("whould you like to go agian Y/N > ")
        
    if (reset == "Y"):
            main()
        
        
    if (reset == "N"):
            
            
        print("cya next time")
                
main()
Whould you like to convert Fahrenheit or Celsius:(f)(c) f
f
Enter your temperture in Fahrenheit > 100
The Temperature in Celsius is:212.0
whould you like to go agian Y/N > N
cya next time
In [ ]:
 
In [ ]:
 
Home