会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
duandodo
博客园
首页
新随笔
联系
订阅
管理
2021年2月20日
python——判定某年是不是闰年
摘要: import calendarprint("本程序可判定某年是不是闰年")nf=input("请输入您要判定的年份:")nf=int(nf)#("{}年".format(calendar.isleap(nf)))if nf/100!=0 and nf/4=0 or nf/100==0 and nf/
阅读全文
posted @ 2021-02-20 14:40 段昱辰
阅读(451)
评论(0)
推荐(0)
2021年2月19日
python——时钟(作者本人已测试,可运行,无bug)
摘要: import tkinterimport threading import datetimeimport timeapp=tkinter.Tk()app.overrideredirect(True)app.attributes('-alpha',0.9)app.attributes('-topmos
阅读全文
posted @ 2021-02-19 21:50 段昱辰
阅读(406)
评论(0)
推荐(0)
python——贪吃蛇(本人已测试,无bug,可运行)(要先下载pygame,具体见我的文章——”如何下载/打开pygame”)
摘要: import pygame from sys import exitimport randomclass Point(): row = 0 clo = 0 def __init__(self, row, clo): self.row = row self.clo = clo def copy(sel
阅读全文
posted @ 2021-02-19 21:42 段昱辰
阅读(330)
评论(0)
推荐(0)
2021年2月7日
如何下载/打开pygame
摘要: 下载步骤 1·在“开始”’中的“搜索程序和文件”上写“cmd”,找到程序“cmd.exe” 2·右键“cmd.exe”,点击“以管理员身份运行” 3·在记事本中写“pip install pygame”,复制这句话 4·在“cmd.exe”的"Microsoft Windows [版本 6.1.76
阅读全文
posted @ 2021-02-07 14:08 段昱辰
阅读(2187)
评论(0)
推荐(0)
SZZD——1~max
摘要: import randomi = 0minx=1maxx=100 #若要更改游戏范围,请改maxx的值!!print("欢迎来到1—%d猜数字游戏"%maxx)num = random.randint(1,maxx)while 1 : i += 1 x = int(input("请输入你猜的数字:"
阅读全文
posted @ 2021-02-07 13:10 段昱辰
阅读(193)
评论(0)
推荐(0)
公告