as the title, i need to replace the dupilcated codes with loops!
help me please!

from time import sleep
timeDelay = .1
turtle.move(100,0)
turtle.rotate(-7)
Doraemon.move(60,0)
Doraemon.rotate(-7)
Panda.move(80,0)
Panda.rotate(-7)
Sun.rotate(2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(-2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(-2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(-2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(-2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(2)
sleep(timeDelay)
turtle.move(100,0)
turtle.rotate(1)
Doraemon.move(60,0)
Doraemon.rotate(1)
Panda.move(80,0)
Panda.rotate(1)
Sun.rotate(2)
text4.move(-200,0)
sleep(timeDelay)

nvm!, i've figured it out
but, now im trying to create an image of a checkerboard with pieces placed in their intial configuration with red and black colors.
how should i do it?

Edited 5 Years Ago by needsHelp!: n/a

This article has been dead for over six months. Start a new discussion instead.