""" 立4彩正方形.py """ import turtle cs = ['red','orange','yellow','green'] turtle.pensize(5) turtle.bgcolor('black') for c in cs: turtle.color('magenta',c) turtle.begin_fill() for _ in range(2): turtle.fd(100) turtle.left(90) turtle.end_fill() turtle.left(90)
发表评论