In [5]:
def main():
    question = input("f or c ==>")
#1. Asks if you want to convert the temp from Fahrenheit to Celsius, or Celsius to Fahrenheit.
    if question == "f":
        Fahrenheit2C()
    if question == "c":
        Celsius2F()
#2. Accepts as input the temperature you enter.


def Fahrenheit2C():
    temp = int(input("put temperature ==>"))
    acttemp = (temp - 32 )*(5/9)
    print("Fahrenheit converted to C {}".format(acttemp))
    restart = input("Would you like to run this program again?")
    if restart == "y":
        main()
    elif restart =="n":
        print ("cya soon")
    
def Celsius2F():
    temp = int(input("put temperature ==>"))
    acttemp = (temp * 9/5) + 32
    print ("Celsius converted to F {}".format(acttemp))
    restart = input("Would you like to run this program again?")
    if restart == "y":
        main()
    elif restart =="n":
        print ("cya soon")
#3. Converts it to your choice.
#4. Prints out the answer, using the .format() method in a complete statement.
#5. Asks if you want to go again.        
main()
f or c ==>f
put temperature ==>109
Fahrenheit converted to C 42.77777777777778
Would you like to run this program again?n
cya soon
In [ ]: