رسم مربع با turtle

برای رسم مربع با turtle یا لاکپشت می توانید از کد زیر استفاده کنید:

ابتدا کتابخانه ی turtle را ایمپورت کنید

import turtle
t = turtle.Pen()
t.forward(90)
t.left(90)
t.forward(90)
t.left(90)
t.forward(90)
t.left(90)
t.forward(90)
t.left(90)

 5


دیدگاهتان را بنویسید

We are glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our comment policy.