Commit 1716868f by BellCodeEditor

auto save

parent cc428167
Showing with 29 additions and 16 deletions
"""
使用turtle模块画图
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
"""
import turtle import turtle
pen=turtle.Pen()
screen=turtle.Screen()
pen = turtle.Pen() screen.bgcolor("red")
screen = turtle.Screen() a=["yellow","orenge","green","red"]
for i in range(1,300):
# 请创造师在下面接着创作 pen.pencolor(a[i%4])
distance=1 pen.forward(i)
for i in pen.right(91)
pen.hideturtle()
turtle.done() turtle.done()
\ No newline at end of file
-- "a/\345\272\237\350\202\235bianjiq"
import turtle
import turtle
pen1=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("pink")
pen=turtle.Pen()
pen1.penup()
pen1.goto(-100,100)
pen1.pensize(10)
pen.pencolor("red")
pen1.write("你好呀\n",font=("Times",30,"normal"))
pen.left(45)
pen.forward(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(100)
turtle.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