-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path57_turtle_library.py
More file actions
26 lines (24 loc) · 850 Bytes
/
57_turtle_library.py
File metadata and controls
26 lines (24 loc) · 850 Bytes
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
import turtle
bob=turtle.Turtle()
# bob.forward(100) #will move the arrow forward till 100 pixels
# #in the above line the 100 represents the pixel amount
# bob.left(45)#will make an angle of 45 degree to the left
# bob.forward(100)#will move forward that 45 degree to hundred pixel
# bob.right(90)#90 degree to the right
# bob.forward(100)
#COLOR
#name of the site for the color shade-->https://www.colorspire.com/rgb-color-wheel/
#bob.color('green') #will color the border as pink
bob.color('#FD8A07','pink') #need to write '#' before the '#value'
#in the above line first color is border and second color is for fill color
#DRAWING A SQUARE
bob.begin_fill()
bob.forward(200)
bob.left(90)
bob.forward(200)
bob.left(90)
bob.forward(200)
bob.left(90)
bob.forward(200)
bob.end_fill()
turtle.done()