Commit d2408262 by BellCodeEditor

save project

parent 07858a54
Showing with 127 additions and 0 deletions
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
pen=turtle.Pen()
pen.shape("turtle")
c=("red")
r=screen.textinput("What size","r=??")
x=-50
y=20
pen.color(c)
pen.fillcolor(c)
pen.begin_fill()
pen.penup()
pen.goto(x,y)
pen.down()
pen.left(45)
pen.forward(2*int(r))
pen.circle(int(r),180)
pen.right(90)
pen.circle(int(r),180)
pen.forward(2*int(r))
pen.left(45)
pen.end_fill()
pen.begin_fill()
pen.penup()
pen.goto(x+150,y-50)
pen.down()
pen.left(45)
pen.forward(2*(int(r)-5))
pen.circle((int(r)-5),180)
pen.right(90)
pen.circle((int(r)-5),180)
pen.forward(2*(int(r)-5))
pen.left(45)
pen.end_fill()
pen.begin_fill()
pen.penup()
pen.goto(x-100,y-50)
pen.down()
pen.left(45)
pen.forward(2*(int(r)-20))
pen.circle((int(r)-20),180)
pen.right(90)
pen.circle((int(r)-20),180)
pen.forward(2*(int(r)-20))
pen.end_fill()
turtle.done()
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