Skip to content

Commit d84e6b7

Browse files
authored
Update and rename task7.py to polka_dots.py
1 parent a22f316 commit d84e6b7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

task7.py renamed to polka_dots.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@
33
from turtle import Screen
44
screen = Screen()
55
screen.setup(width=800,height=600)
6-
6+
#making dots with various different colors on the screen
77
turtle_array = []
88
colors = [ "red", "pink", "violet", "yellow", "light blue", "light green"]
9-
y=-200
9+
#setting x and y coordinates to the bottom of the screen
10+
y=-200
1011
x=-200
12+
#using a nested loop
1113
for dot in range (0,10):
1214
for dot in range (0,10):
1315
dot = turtle.Turtle()
1416
dot.penup()
1517
dot.shape("circle")
1618
dot.color(random.choice(colors))
1719
dot.goto(x, y)
20+
#increasing the y value to shift the dot vertically
1821
y+=50
1922
turtle_array.append(dot)
20-
#dot.circle(radius=10)
23+
#increasing the x value to shift the dot horizontally
24+
#changing the y value back to the bottom of the screen
2125
y=-200
2226
x+=50
2327

2428

25-
turtle.done()
29+
turtle.done()

0 commit comments

Comments
 (0)