Page 20 - 2501_KVS_C-6
P. 20
1.5.1 Drawing a Triangle
Aryan: Look, Gowri! I wrote pen.forward(100) to move the pen 100 points in the forward direction.
Then I turned it to the left by 120 degrees, moved forward again by 100 points, turned left once
more by 120 degrees, and moved forward 100 points again.
I was able to draw a triangle in one go! Wow, I’m so happy—I’ve made my first complete figure… a
triangle!
Gowri: Great job, Aryan! That looks cool!
Aryan: Thanks, Gowri, for introducing me to coding. You’re my very own Turtle Code Jr. Teacher!
1.5.2 Drawing a Square
Aryan: I can draw a simple square also by using these commands , please let me continue.
Gowri: I think you are becoming quite the expert, Aryan! I’m really happy for you.
Yes, you’re absolutely right—we just need to change the direction by 90 degrees and move 100
pixels forward, repeating it as many times as the number of sides in a square. Since all sides of
a square are equal, the forward movement remains the same each time. Great going!
Aryan: I could actually see the turtle (pen) start, move in the given directions, and then
complete the square. It was so much fun!
18 KVS DELHI REGION 2025

