python打地鼠

2020年6月7日 09:18来自:jchen2

需要编程掌机,直接把代码搬过来了:
from meawbit import *
............
screen.loadBmp("bg.bmp")
sleep(2)
n = randint(1,4)
if n == 1:
screen.loadBUM("down.bmp")
p "down"
............
if n == 2:
screen.loadBmp("down.bmp")
p = "down"
............
if n == 2:
screen.loadBmp("right.bmp")
p = "right"
............
sleep(3)
if sensor.btnValue(p) == 1:
buzzer.melody(CORRECT)
if sensor.btnValue(p) == 0:
buzzer.melody(ERROR)

删除话题

[[::s.username]] 写于 [[::s.updatestr]][[::s.douname]]赢取[[s.dou]]围豆 [[::s.dou]]围豆 [[::s.dou]]围豆[[$index + 1]]楼 删除
已经删除,撤销 | 关闭