Skip to content
Sign upLog in
← Back to Community

How do you get two turtles in python.

Profile icon
VINCENTKALISKY

We are trying to add two turtles into are code. How do we do it.

Answered by ThisUserTaken [earned 5 cycles]
View Answer
Voters
Profile icon
Kyleroboclub
Profile icon
VINCENTKALISKY
Comments
hotnewtop
Profile icon
ThisUserTaken

pretty simple

import turtle Bob = turtle.Turtle() Jeff = turtle.Turtle()
Profile icon
JBloves27

exactly!

@ThisUserTaken

Profile icon
OlauPla

@ThisUserTaken
That is correct, go with that!

Profile icon
ThisUserTaken

@JBYT27
just askin, are you workin on anything. I'm working on this: https://repl.it/talk/share/Noob-Simulator-Survival-Mode-v10/77228

Profile icon
JBloves27

I have some projects and a collab.

@ThisUserTaken

Profile icon
RYANTADIPARTHI

You can do that, by initializing two turtle, and using them with the same commands, or different

import turtle example1 = turtle.Turtle() # or Screen() example2 = turtle.Turtle() example1.forward(100) example2.left(90)

That will work

Profile icon
Coder100

you can initialize more than one turtle.

import turtle turtle1 = turtle.Turtle() turtle2 = turtle.Turtle() turtle1.forward(15) turtle2.backward(15)