Python – Temperature Converter

HTML Converter

import sys
MyExit = "Exit"

while MyExit != "X":
    MyTitle = "Temperature Conversion Program"
    MyInstructions = "Enter C if convertion from C to F.\n"
    MyInstructions = MyInstructions + "Enter F if converting from F to C\n"
    MyInstructions = MyInstructions + "Enter X to Exit"
    print ("\n",MyTitle,"\n")
    print (MyInstructions+"\n")
    MyPath=input("Enter C or F: ")
    if MyPath == "C":
        StartTemp=int(input("Enter temperature: "))
        MyOutput = (StartTemp*1.8)+32
        ResultPath="F"
    elif MyPath == "F":
        StartTemp=int(input("Enter temperature: "))
        MyOutput = (StartTemp-32) * (5/9)
        ResultPath="C"
    else:
        sys.exit()
    print(StartTemp, MyPath, "is the same as",MyOutput,ResultPath)