Ask coding questions

← Back to all posts
hi im trying to find all the shapes i can get.
kannibalistic (104)

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

Answered by CodingEssence (126) [earned 5 cycles]
View Answer
CodingEssence (126)

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


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


because it will return this:

Traceback (most recent call last):
  File "", line 5, in <module>
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']
kannibalistic (104)

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