摘要: # -*- coding:utf-8 -*- import sys # 导入sys模块 import pygame # 导入pygame模块 pygame.init() # 初始化pygame size = width, height = 640,480 # 设置窗口 screen = pygame 阅读全文
posted @ 2022-12-14 19:08 Listened* 阅读(108) 评论(0) 推荐(0)
摘要: #七段数码管绘制import turtle as timport time as Tdef drawGap(): #绘制数码管的间隔 t.penup() t.fd(5)def drawLine(draw): #绘制单段数码管,draw为True时,则实画 drawGap(); t.pendown() 阅读全文
posted @ 2022-12-08 17:47 Listened* 阅读(377) 评论(0) 推荐(0)
摘要: Python 7段数码管绘制 #七段数码管绘制import turtle as timport time as Tdef drawGap(): #绘制数码管的间隔 t.penup() t.fd(5)def drawLine(draw): #绘制单段数码管,draw为True时,则实画 drawGap(); t.pendown() 阅读全文
posted @ 2022-12-08 17:39 Listened* 阅读(149) 评论(1) 推荐(0)
摘要: Python第十三章小球移动游戏 # -*- coding:utf-8 -*-import sys # 导入sys模块import pygame # 导入pygame模块 pygame.init() # 初始化pygamesize = width, height = 640,480 # 设置窗口screen = pygame.dis 阅读全文
posted @ 2022-12-01 22:49 Listened* 阅读(98) 评论(0) 推荐(0)
摘要: 实例1 height = 1.70 print("你的身高:" +str(height)) weight =48.5 print("你的体重:" +str(weight)) bmi=weight/(height*height) print("您的BMI指数为:"+str(bmi)) #判断身材是否合 阅读全文
posted @ 2022-09-15 09:40 Listened* 阅读(40) 评论(0) 推荐(0)