七彩盘子,学生练习程序

七彩盘子python turtle colorful plates

七彩盘子python turtle colorful plates

"""
   七彩盘子,学生练习程序,请用turtle模块以最快速度画以下图形.
   海龟模块有一个circle命令,它能让海龟画圆,假设海龟为t,那么
   画一个半径为100的圆形的命令为 t.circle(100)。这个命令会让
   海龟向左画一个圆形。请在IDLE中输入以下代码仔细观察画圆的
   整个过程:
   
   >>> from turtle import *
   >>> t = Turtle()
   >>> t.circle(100)
   >>>

   熟知了海龟画圆命令后,你能画出以上图形吗?

"""
from turtle import *

colors = ['red','orange','yellow','green','cyan','blue','purple']
colors.reverse()

screen = Screen()
screen.delay(0)
screen.setup(480,360)
screen.bgcolor('white')
screen.title("turtle画彩色盘子")

t = Turtle()
t.ht()
t.width(22)
t.speed(0) 

You must log in to read the rest of this article. Please log in or register as a user.