7-TrafficLights-solution.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:EduKit1 作者: CamJam-EduKit 项目源码 文件源码
def startwalking():
    # Make the buzzer buzz on and off, half a second of
    # sound followed by half a second of silence
    print("Start walking")
    count = 1
    while count <= 4:
        print("Beep")
        buzzer.on()
        time.sleep(0.5)
        buzzer.off()
        time.sleep(0.5)
        count += 1


# Turn the buzzer off and wait for 2 seconds
# (If you have a second green 'pedestrian' LED, make it flash on and
# off for the two seconds)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号