Here we Have just use simple graphical programming for make some fun, There are many ways to write graphics programs in Python. A simple way to start graphics programming is to use Python’s built-in turtlemodule. Later in the book, we will introduce Tkinterfor developing comprehensive graphical user interface applications.
1 import turtle
2
3 turtle.color("blue")
4 turtle.penup()
5 turtle.goto(-110, -25)
6 turtle.pendown()
7 turtle.circle(45)
8
9 turtle.color("black")
10 turtle.penup()
11 turtle.goto(0, -25)
12 turtle.pendown()
13 turtle.circle(45)
14
15 turtle.color("red")
16 turtle.penup()
17 turtle.goto(110, -25)
18 turtle.pendown()
19 turtle.circle(45)
20
21 turtle.color("yellow")
22 turtle.penup()
23 turtle.goto(-55, -75)
24 turtle.pendown()
25 turtle.circle(45)
26
27 turtle.color("green")
28 turtle.penup()
29 turtle.goto(55, -75)
30 turtle.pendown()
31 turtle.circle(45)
32
33 turtle.done()
1 import turtle
2
3 turtle.color("blue")
4 turtle.penup()
5 turtle.goto(-110, -25)
6 turtle.pendown()
7 turtle.circle(45)
8
9 turtle.color("black")
10 turtle.penup()
11 turtle.goto(0, -25)
12 turtle.pendown()
13 turtle.circle(45)
14
15 turtle.color("red")
16 turtle.penup()
17 turtle.goto(110, -25)
18 turtle.pendown()
19 turtle.circle(45)
20
21 turtle.color("yellow")
22 turtle.penup()
23 turtle.goto(-55, -75)
24 turtle.pendown()
25 turtle.circle(45)
26
27 turtle.color("green")
28 turtle.penup()
29 turtle.goto(55, -75)
30 turtle.pendown()
31 turtle.circle(45)
32
33 turtle.done()