用户:大聪明v7dT查看:0 回复:1 评论:0 创建时间:2021-12-09T20:16:11
【作品展示】

【作品介绍】
弹球
【作品源代码】
import pgzrun
y = 100
speed_y = 100
x = 100
speed_x = 100
def draw():
screen.fill('white')
screen.draw.filled_circle((x,y),30,'green')
def update():
global y,speed_y,x,speed_x
y = y+speed_y
if y >= 570 or y <= 30:
speed_y = -speed_y
x = x+speed_x
if x >= 770 or x <= 30:
speed_x = -speed_x
pgzrun.go()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn