Ask coding questions

← Back to all posts
Turtle command enquires
donovantan (0)

May I ask what is the meaning or the difference between these 2 commands if I add "bob_turtle =" in front of the forward and right?

1) bob_turtle.forward(100)
bob_turtle.right(90)

vs

2) bob_turtle = turtle.forward(100)
bob_turtle = turtle.right(90)

Comments
hotnewtop
Coder100 (18187)

The second one is wrong, bob_turtle is a variable to the turtle you can't just reassign it to a command to move the turtle, then you can't use bob_turtle anymore!