Python turtle shape

Python turtle shape … here is a solution to the problem.

Python turtle shape

I’m drawing something with python turtle, I’m using shape functions, but the shapes overdraw the other shapes before them (I can see the shapes moving) and I only get the last shape :

`up()
goto(-200,-200)
down()
shape("circle")
shapesize(2,1,1)
fillcolor("black")
up()
goto(-300,-100)
down()
shape("circle")
shapesize(4,4,1)
fillcolor("black")
up()
goto(-100,-100)
down()
shape("circle")
shapesize(4,4,1)
fillcolor("black")`

Looking forward to your answer, thank you!!

Solution

turtle.shape changes the shape of the turtle as it draws. To actually draw the shape, you need >turtle.stamp().

up()
goto(-200,-200)
down()
shape("circle")
shapesize(2,1,1)
fillcolor("black")
stamp()
up()
goto(-300,-100)
down()
shape("circle")
shapesize(4,4,1)
fillcolor("black")
stamp()
up()
goto(-100,-100)
down()
shape("circle")
shapesize(4,4,1)
fillcolor("black")
stamp()

Related Problems and Solutions