Commit 9eae9b3b by BellCodeEditor

auto save

parent 4cac003e
Showing with 15 additions and 3 deletions
neme=input("输入名字")
print(neme+"你好啊")
\ No newline at end of file
import turtle
c=["red","green","blue","yellow","orange"] #存储颜色
s=turtle.Screen() #定义背景
s.bgcolor("pink") #设置背景颜色为pink
p=turtle.Pen() #定义画笔
p.speed(200) #设置画笔速度为200
for i in range(1,300): #利用for循环画图形
p.pencolor(c[i%5]) #每次循环的图形边的颜色
p.forward(i) #每次循环图形的边都加1
p.right(144) #每次循环图形旋转的角度
p.hideturtle()
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment