import turtle ad=turtle.Turtle() ad.shape("turtle") ad.pensize(10) ad.speed(0) bax=["blue","green","red","yellow"] for i in bax: ad.color(i) ad.forward(50) ad.left(90) ad.up() ad.goto(-25,-25) ad.down() for i in bax: ad.color(i) ad.forward(100) ad.left(90) ad.up() ad.goto(-45,-45) ad.down() for i in bax: ad.color(i) ad.forward(150) ad.left(90) ad.up() ad.goto(-60,-60) ad.down() for i in bax: ad.color(i) ad.forward(200) ad.left(90) ad.up() ad.goto(-90,-90) ad.down() for i in bax: ad.color(i) ad.forward(250) ad.left(90) ad.up() ad.goto(-105,-105) ad.down() for i in bax: ad.color(i) ad.forward(300) ad.left(90) ad.up() ad.goto(-120,-120) ad.down() for i in bax: ad.color(i) ad.forward(350) ad.left(90) ad.up() ad.goto(-140,-140) ad.down() for i in bax: ad.color(i) ad.forward(400) ad.left(90) ad.up() ad.goto(-160,-160) ad.down() for i in bax: ad.color(i) ad.forward(450) ad.left(90) ad.up() ad.goto(-190,-190) ad.down() for i in bax: ad.color(i) ad.forward(500) ad.left(90) ad.up() ad.goto(-210,-210) ad.down() for i in bax: ad.color(i) ad.forward(550) ad.left(90) ad.up() ad.goto(-230,-230) ad.down() for i in bax: ad.color(i) ad.forward(600) ad.left(90) ad.up() ad.goto(-250,-250) ad.down() for i in bax: ad.color(i) ad.forward(650) ad.left(90) ad.up() ad.goto(-280,-280) ad.down() for i in bax: ad.color(i) ad.forward(700) ad.left(90) ad.up() ad.goto(-300,-300) ad.down() for i in bax: ad.color(i) ad.forward(750) ad.left(90) ad.up() ad.goto(-320,-320) ad.down() ad.color("black") ad.write("amin rezaee") ad.up() ad.goto(25,25) for i in range(10): ad.color("yellow") ad.color("blue") ad.color("black") ad.color("green") ad.color("red")
اجرا کن
پاک کن