-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathclock_dial.py
41 lines (38 loc) · 1.02 KB
/
clock_dial.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
38
39
40
41
# A clock dial
import turtle
screen=turtle.Screen()
trtl=turtle.Turtle()
screen.setup(620,620)
screen.title('A Clock dial made by Saksham Aggarwal')
screen.bgcolor('black')
clr=['red','green','blue','yellow','purple']
trtl.pensize(4)
trtl.shape('turtle')
trtl.penup()
trtl.pencolor('red')
m=0
for i in range(12):
m=m+1
trtl.penup()
trtl.setheading(-30*i+60)
trtl.forward(150)
trtl.pendown()
trtl.forward(25)
trtl.penup()
trtl.forward(20)
trtl.write(str(m),align="center",font=("Arial", 12, "normal"))
if m==12:
m=0
trtl.home()
trtl.home()
trtl.setpos(0,-250)
trtl.pendown()
trtl.pensize(10)
trtl.pencolor('blue')
trtl.circle(250)
trtl.penup()
trtl.setpos(150,-270)
trtl.pendown()
trtl.pencolor('olive')
trtl.write(' If Your Action Inspire Others \n To Dream more \n To Learn more \n Than You Are a Leader \n "Saksham Aggarwal"',font=("Arial", 12, "normal"))
trtl.ht()