Izmantojot doto kodu, sastādi algoritmu, kas uzzīmē piramīdu no 15 trijstūriem, kur 1. rindā ir 4 trijstūri un katrā nākamajā par vienu mazāk.
Aizpildi dotās funkcijas ar nepieciešamajām koda rindām!
import turtle
tommy = turtle.Turtle()
tommy.shape("turtle")
tommy.speed(500)
triangles_to_draw = 15
counter = 0
def draw_single_triangle():
...
def go_to_next_row():
...
while (counter < triangles_to_draw):
draw_single_triangle()
counter = counter + 1