197k views
5 votes
Create a turtle and assign it to a variable. When you print its type, what do you get

User Aleko
by
4.3k points

2 Answers

4 votes

When you assign a turtle to a variable and print its type, you get:

<class 'turtle.Turtle'>

You can easily check this with the following code.

t = turtle.Turtle() #< this creates a turtle

print(type(t)) #< this prints the turtle's type.

Of course you'll have to import the turtle module.

User SitWolf
by
5.4k points
4 votes

Answer: I think it is a trick question, a variable would be not be used as code. It must be coded before it will do anything.

Say "nothing" as ur answer.

User SeanOB
by
5.3k points