Skip to content

Commit 4f012fa

Browse files
committed
Draw a Square with Turtle
1 parent 009d12b commit 4f012fa

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

python_turtol_graphics/__init__.py

Whitespace-only changes.

python_turtol_graphics/mindstroms.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import turtle
2+
3+
def drw_square():
4+
window = turtle.Screen()
5+
window.bgcolor("red")
6+
7+
brad = turtle.Turtle()
8+
brad.shape("turtle")
9+
brad.color("yellow")
10+
brad.speed(2)
11+
12+
brad.forward(100)
13+
brad.right(90)
14+
brad.forward(100)
15+
brad.right(90)
16+
brad.forward(100)
17+
brad.right(90)
18+
brad.forward(100)
19+
20+
window.exitonclick()
21+
22+
drw_square()

0 commit comments

Comments
 (0)