| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1601 人关注过本帖
标题:Python小白|分享一点代码,想提高效率
只看楼主 加入收藏
harryhe2022
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2018-9-1
收藏
 问题点数:0 回复次数:1 
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'''
搜索更多相关主题的帖子: Python 分享 效率 gui title 
2018-09-01 11:58
harryhe2022
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2018-9-1
收藏
得分:0 
附上函数模组
2018-09-01 11:58
快速回复:Python小白|分享一点代码,想提高效率
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017707 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved