Commit 8f47bb50 by BellCodeEditor

save project

parent 65917df6
Showing with 30 additions and 4 deletions
......@@ -4,6 +4,7 @@ s=turtle.Screen()
p.pencolor("light yellow")
s.bgcolor("red")
p.write("你干嘛~\n嗨嗨哟!",font=("Times",20,"normal"))
m=print("输入你想要的大小(输入输字)")
p.penup()
p.goto(100,100)
p.pendown()
......@@ -12,10 +13,10 @@ p.pencolor("yellow")
p.fillcolor("light yellow")
p.begin_fill()
p.left(45)
p.forward(100)
p.circle(50,180)
p.forward(m)
p.circle(m/2,180)
p.right(90)
p.circle(50,180)
p.forward(100)
p.circle(m/2,180)
p.forward(m))
p.end_fill()
turtle.done()
\ No newline at end of file
import turtle
import random
m=random.randint(50,200)
p=turtle.Pen()
s=turtle.Screen()
p.pencolor("light yellow")
s.bgcolor("red")
p.write("你干嘛~\n嗨嗨哟!",font=("Times",20,"normal"))
p.penup()
p.goto(100,100)
p.pendown()
p.pensize(5)
p.pencolor("yellow")
p.fillcolor("light yellow")
p.begin_fill()
p.left(45)
p.forward(m)
p.circle(m/2,180)
p.right(90)
p.circle(m/2,180)
p.forward(m)
p.end_fill()
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