@christinaSmith/

Convert_temp_py

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.12095989885978686","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"ZGVmIGNvbnZlcnQgKCk6CiAgICBjb252ZXJ0X3VuaXQgPSBpbnB1dCgiV291bGQgeW91IGxpa2UgdG8gY29udmVydCB0byBGYWhyZW5oZWl0IG9yIENlbHNpdXM/IFBsZWFzZSB1c2UgRiBvciBDOiAiKQogICAgY29udmVydF9udW1iZXIgPSBpbnQoaW5wdXQoIldoYXQgbnVtYmVyIHdvdWxkIHlvdSBsaWtlIHRvIGNvbnZlcnQ/OiAiKSkKICAgIGlmIGNvbnZlcnRfdW5pdCA9PSAiRiIgb3IgImYiOgogICAgICAgIGZfdGVtcCA9KGNvbnZlcnRfbnVtYmVyICogOS81KSArIDMyCiAgICAgICAgcHJpbnQgKHN0cihjb252ZXJ0X251bWJlcikgKyAiIENlbHNpdXMgY29udmVydHMgdG8gIiArIHN0cihmX3RlbXApICsiIEZhaHJlbmhlaXQiKQogICAgZWxpZiBjb252ZXJ0X3VuaXQgPT0gIkMiIG9yICJjIjoKICAgICAgICBjX3RlbXAgPSAoY29udmVydF9udW1iZXIgLSAzMikgKiA1LzkgCiAgICAgICAgcHJpbnQgKHN0cihjb252ZXJ0X251bWJlcikgKyAiRmFocmVuaGVpdCBjb252ZXJ0cyB0byAiICsgc3RyKGZfdGVtcCkgKyIgQ2Vsc2l1cyIpCiAgICBlbHNlOgogICAgICAgIHByaW50KCJJbnZhbGlkIGVudHJ5IikKICAgICAgICAKY29udmVydCgp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
def convert ():
    convert_unit = input("Would you like to convert to Fahrenheit or Celsius? Please use F or C: ")
    convert_number = int(input("What number would you like to convert?: "))
    if convert_unit == "F" or "f":
        f_temp =(convert_number * 9/5) + 32
        print (str(convert_number) + " Celsius converts to " + str(f_temp) +" Fahrenheit")
    elif convert_unit == "C" or "c":
        c_temp = (convert_number - 32) * 5/9 
        print (str(convert_number) + "Fahrenheit converts to " + str(f_temp) +" Celsius")
    else:
        print("Invalid entry")
        
convert()