7-TrafficLights-solution.py 文件源码

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

项目:EduKit1 作者: CamJam-EduKit 项目源码 文件源码
def flashingambergreen():
    print("Flashing amber and green")
    red.off()
    green.off()

    iCount = 1
    while iCount <= 6:
        yellow.on()
        time.sleep(0.5)
        yellow.off()
        time.sleep(0.5)
        iCount += 1
    green.on()


# Flash the amber for one more second
# (Turn the green 'pedestrian' LED off and the red on)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号