少儿编程-王铭麒

2021/7/3 22:21:19

本文主要是介绍少儿编程-王铭麒,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

陀螺

import turtle
lst=['red','blue','green']
turtle.tracer(False)
angle=5
def draw():
    turtle.clear()
    turtle.pensize(15)
    for i in range(3):
        turtle.forward(200)
        turtle.dot(200,lst[i])
        turtle.backward(200)
        turtle.left(120)
    turtle.right(angle)

def process():
    draw()
    turtle.ontimer(process,100)
process()

turtle.done()






这篇关于少儿编程-王铭麒的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程