← Back to Community
hi im trying to find all the shapes i can get.
Profile icon
kannibalistic

To be specific, how many shapes are there?
Names please!

Answered by CyberPy [earned 5 cycles]
View Answer
Voters
Profile icon
rickysong
Profile icon
mechtank
Profile icon
kannibalistic
Comments
hotnewtop
Profile icon
CyberPy

If you want to do this, you need to do this:

print(turtle.Screen().getshapes())

Then it will print out the list of shapes, and you cant do this:

print(turtle.Turtle().getshapes())

because it will return this:

Traceback (most recent call last): File "main.py", line 5, in <module> print(turtle.Turtle().getshapes()) AttributeError: 'Turtle' object has no attribute 'getshapes'

Because getshapes is an attribute for the Screen() class, not the Turtle() class.

And if you wanted a list of the names, here you go:

['arrow', 'blank', 'circle', 'classic', 'square', 'triangle', 'turtle']
Profile icon
kannibalistic

I'm using python, so any thing that fits into
r6.shape("") will work!