Commit 6544dedc by BellCodeEditor

auto save

parent 1fd967e0
import turtle
len=60
p=turtle.Pen()
turtle.bgcolor("pink")
s=turtle.Screen()
len=int(s.textinput("提示","东大12"))
p.penup()
p.goto(100,-100)
p.write("\nhello\n",font=("Times",20,"normal"))
p1=turtle.Pen()
p1.fillcolor("red")
p1.begin_fill()
p1.left(45)
p1.forward(len*2)
p1.circle(len,180)
p1.right(90)
p1.circle(len,180)
p1.forward(len*2)
p1.end_fill()
turtle.done()
\ No newline at end of file
import turtle as tt
import turtle as tt
from random import randint
tt.TurtleScreen._RUNNING = True
tt.speed(0) # 绘图速度为最快
tt.bgcolor("black") # 背景色为黑色
tt.setpos(-25, 25) # 改变初始位置,这可以让图案居中
tt.colormode(255) # 颜色模式为真彩色
cnt = 0
while cnt < 500:
r = randint(0, 255)
g = randint(0, 255)
b = randint(0, 255)
tt.pencolor(r, g, b) # 画笔颜色每次随机
tt.forward(50 + cnt)
tt.right(91)
cnt += 1
tt.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