-
Notifications
You must be signed in to change notification settings - Fork 0
/
3. PinkScreen.py
37 lines (26 loc) · 813 Bytes
/
3. PinkScreen.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#Sanjidah Abdullah
#sabdull002@citymail.cuny.edu
import turtle
wn = turtle.Screen() # Set up the window and its attributes
wn.bgcolor("pink")
tess = turtle.Turtle() # create tess and set some attributes
tess.color("blue")
tess.pensize(5)
alex = turtle.Turtle() # create alex
tess.forward(80) # Let tess draw a square
tess.left(90)
tess.forward(80)
tess.left(90)
tess.forward(80)
tess.left(90)
tess.forward(80)
tess.left(90)
tess.right(180) # turn tess around
tess.forward(80) # move her away from the origin
alex.forward(50) # make alex draw an equilateral triangle
alex.left(120)
alex.forward(50)
alex.left(120)
alex.forward(50)
alex.left(120) # complete the triangle
wn.exitonclick()