Python小白|分享一点代码,想提高效率
#!/user/desktop/py# -*- coding: utf-8 -*-
# Filename : degree.py
# created by : Harry He
# transfer degrees
import easygui as gui
while(1):
set
choices = gui.choicebox(msg="What do you want to convert?", title="Degrees Converter", choices=("F to C","C to F"))
if choices == "F2C":
f = float(gui.enterbox(msg="What is the degrees in Fahrenheit degrees?", title="Degrees Converter"))
c = (f-32)/1.8
gui.msgbox(msg=int(c), title="Degrees Converter")
else:
c = float(gui.enterbox(msg="What is the degrees in Centigrade degrees?", title="Degrees Converter"))
f = c*1.8+32
gui.msgbox(msg=int(f), title="Degrees Converter")
#contents:
#emial : harryhe2022@
#phonenumber : 15911185189
'''copyright JUST KIDDING'''
'''TAKE IT AND USE IT FOR YOURSELF'''