Though each instance does use the turtle class, this is not the best answer.
The same turtle that is used in each drawing your programs make.
Each instance that is made using the turtle class is unique. Remember how you can have multiple βturtlesβ in a single drawing? Each of those are different turtles but they are all instances of the turtle class.
A unique βturtleβ that you can use to draw.
Yes, an instance of the turtle class represents a unique turtle. The turtle class is like a stencil or mold that can be used to make as many turtles as you would like.
Methods can change the value that is associated with an attribute.
Return values.
Methods can return values.
Create new attributes of an instance and set their values.
Attributes do not need to be pre-declared; any code can add a new attribute to an instance just by assigning a value to it.
Delete object instances.
You do not explicitly delete object instances; when there are no variables or other references to them, so that they canβt be accessed, they are automatically deleted.
None of the above.
Methods can do at least one of the above. Take another look.
What are the names of the instances in the following code? Please put one instance per blank space and enter them in the order that the computer would read them.
Write a program that uses the turtle module to draw something. It doesnβt have to be complicated, but draw something different than we have done in the past. (Hint: if you are drawing something complicated, it could get tedious to watch it draw over and over. Try setting .speed(10) for the turtle to draw fast, or .speed(0) for it to draw super fast with no animation.)
Consider the above screenshot of the CodeLens animation. This code is supposed to calculate the mean (average) of the 3 numbers but there is a semantic error on which line number?