TurtleAcademy learn programming for freeYour browser is not supporting canvasWe recomand you to use Chrome or Firefox browsers
Program total score is: 10
Output image

Basic Commands

  • ج(x), جلو(x)

    Moves the turtle x points

  • عقب (x) , ع (x)

    The turtle back x points

  • چپ(x) , چ (x)

    Rotate the turtle left x degrees

  • راست(x) , ر(x)

    Rotate the turtle left x degrees

  • پاک, پاک

    Will clear the screen and return the turtle home

Controlling the Pen

  • بردار, بردار

    Turtle stops leaving a trail

  • بگذار, بگذار

    The turtle will leave a trail

  • setwaittime(x), swt (x)

    Will set the waiting time to x milliseconds

  • صبر

    Will cause the turtle to wait before executing the command

  • setwidth(x)

    Will set the pen width to X

  • پنهان, پنهان

    Hide the turtle

  • پیدا, پیدا

    Show the turtle

  • خانه

    Moves the turtle to center, pointing upwards

  • طول.باشد(num), عرض.باشد(num)

    Move turtle to the specified location

  • طوع.باشد (num1,num2)

    Move turtle to the specified location

  • جهت.باشد(x), جهت.باشد (x)

    Rotate the turtle to the specified heading

  • arc (ANGLE, RADIUS)

    Will create an arc distance RADIUS covering ANGLE angle

  • ellipse (Width , Height)

    Will craete an ellipse width Width and height Height

  • مکان, طول, عرض

    Outputs the current turtle position as [ x y ], x or y respectively

  • جهت

    Outputs the current turtle heading

  • بطرف

    Outputs the heading towards the specified [ x y ] coordinates

Loops and procedure

  • repeat x [ statements ... ]

    Repeat statements x times

  • شمارنده

    Outputs the current iteration number of the current repeat or forever

  • for controllist [ statements ...]

    Typical for loop. The controllist specifies three or four members: the local varname, start value, limit value, and optional step size

  • to PROCNAME inputs ... statements ... end

    Define a new named procedure with optional inputs

  • make varname expr

    Update a variable or define a new global variable. The variable name must be quoted, e.g. make 'foo 5


    access the content of VARNAME


  • list thing1 thing2 ...

    Create a new list from the inputs

  • اولین listname

    Outputs the first item from the list

  • مگراولی listname , مگراولی listname

    Outputs all the items of listname except for the first item

  • آخرین listname

    Outputs the last item from the list

  • مگرآخری listname

    Outputs all the items of listname except for the last item

  • item index list

    Outputs the indexlist item of the list or array

  • جداکن listname

    Outputs one item from a list, at random


  • setcolor(x)

    Will set the turtle color accroding to the following table

    0: سیاه 1: آبی 2: سبز
    3: فیروزه‌ای 4: قرمز 5: ارغوانی
    6: زرد 7: سفید 8: قهوه‌ای
    9: تانژانت 10: سبز 11: aqua
    12: نارنجی-صورتی 13: بنفش 14: نارنجی
    15: خاکستری

  • setcolor [r,g,b]

    Will set the turtle color accroding to the amount of red , green and blue for example setcolor [50 100 50]

  • پر

    Does a paint bucket flood fill at the turtle's position

  • توپر fillcolor [ statements ... ]

    Execute statements without drawing but keeping track of turtle movements. When complete, fill the region traced by the turtle with fillcolor and outline the region with the current pen style


  • sum x y

    sum x y

  • minus x y

    return the distance between x and y

  • تصادفی(x)

    Will choose a random number between 0 - (x-1)

  • modulo expr expr

    Outputs the remainder (modulus). For remainder and % the result has the same sign as the first input; for modulo the result has the same sign as a the second input.