Python Turtle Beginners projects
If you want to be good at python turtle ,you should try out these cool projects for practice. These involve simple basic python with turtle module.
1. A CAR :
import turtle
windows = turtle.Screen()
windows.title("CAR")
car = turtle.Turtle()
car.width(9)
car.speed(5)
d = turtle.Turtle()
d.width(9)
d.color("red")
d.forward(100)
d.setpos(200,0)
d.left(90)
d.forward(105)
d.hideturtle()
for i in range(2):
car.begin_fill()
car.color("green")
car.forward(400)
car.right(90)
car.forward(70)
car.right(90)
car.end_fill()
car.begin_fill()
car.color("red")
car.forward(50)
car.left(45)
car.forward(150)
car.right(45)
car.forward(100)
car.right(45)
car.forward(150)
car.left(45)
car.forward(40)
car.penup()
car.setpos(70,-120)
car.pendown()
car.begin_fill()
car.color("black")
car.circle(30)
car.end_fill()
car.penup()
car.setpos(310, -120)
car.pendown()
car.begin_fill()
car.color("black")
car.circle(30)
car.end_fill()
2. A CHESSBOARD:
import turtle
sc=turtle.Screen()
sc.title("chessboard")
bor=turtle.Turtle()
bor.speed(10)
sc.setup(600,600)
bor.penup()
bor.setpos(100,-100)
bor.pendown()
bor.write("THIS IS A CHESS BOARD")
def sqaure():
for i in range(4):
bor.forward(50)
bor.right(90)
bor.forward(50)
for k in range(8):
bor.penup()
bor.setpos(0, 50*k)
bor.pendown()
for j in range(8):
if (k + j) % 2 == 0:
color = ("black")
else :
color = ("white")
bor.fillcolor(color)
bor.begin_fill()
sqaure()
bor.end_fill()
sc=turtle.Screen()
sc.title("chessboard")
bor=turtle.Turtle()
bor.speed(10)
sc.setup(600,600)
bor.penup()
bor.setpos(100,-100)
bor.pendown()
bor.write("THIS IS A CHESS BOARD")
def sqaure():
for i in range(4):
bor.forward(50)
bor.right(90)
bor.forward(50)
for k in range(8):
bor.penup()
bor.setpos(0, 50*k)
bor.pendown()
for j in range(8):
if (k + j) % 2 == 0:
color = ("black")
else :
color = ("white")
bor.fillcolor(color)
bor.begin_fill()
sqaure()
bor.end_fill()
3. CIRCLE RING :
import turtle
window=turtle.Screen()
an=turtle.Turtle()
window.bgcolor("black")
an.speed(0)
an.width(1)
colors=["red","yellow","blue","orange","pink","green","purple"]
an.penup()
an.setpos(100,100)
an.pendown()
def cir():
for j in range(150):
an.forward(150)
an.right(111)
for i in range(30):
an.color(colors[i % 7])
cir()
an.penup()
an.forward(161)
an.left(30)
an.pendown()
4. CLOCK :
import turtle
window=turtle.Screen()
clock=turtle.Turtle()
def clocki():
clock.left(90)
for i in range(1,13):
clock.penup()
clock.right(30)
clock.forward(100)
clock.pendown()
clock.width(1)
clock.color("red")
clock.write(i,font="bold")
clock.penup()
clock.back(100)
clock.pendown()
def cir():
clock.penup()
clock.setpos(120, 0)
clock.pendown()
clock.begin_fill()
clock.color("lightblue")
clock.circle(110)
clock.end_fill()
def fullclock():
clock.speed(0)
cir()
clock.penup()
clock.setpos(120,100)
clocki()
fullclock()
for i in range(100):
clock.width(5)
clock.speed(5)
clock.color("red")
clock.right(2)
clock.forward(90)
clock.color("lightblue")
clock.back(90)
clock.hideturtle()
5. GEEKSFORGEEKS LOGO :
import turtle
win = turtle.Screen()
win.title("geeks for geeks logo")
g = turtle.Turtle()
g.shapesize(2)
g.color("green")
g.speed(10)
g.width(10)
g.left(90)
g.forward(10)
g.left(90)
g.circle(150, -170)
g.left(80)
g.forward(100)
g.left(90)
g.forward(20)
g.back(300)
g.forward(20)
g.right(90)
g.right(180)
g.forward(100)
g.left(90)
g.circle(150,-170)
g.right(20)
6. COLORFUL SPRING :
import turtle
window=turtle.Screen()
an=turtle.Turtle()
window.bgcolor("black")
an.speed(0)
an.width(5)
colors=["red", "blue", "pink", "yellow", "orange"]
for i in range(100):
an.color(colors[i % 5])
an.right(45)
an.circle(2*i, -70)
an.circle(20, 70)
7.
import turtle
win=turtle.Screen()
win.title("spring")
s=turtle.Turtle()
s.speed(0)
colors=["red","green","blue","pink","yellow","brown"]
win.bgcolor("black")
s.width(1)
for i in range(100):
s.pencolor(colors[i % 6])
s.forward(i)
s.right(59)
PLEASE DO SHARE THIS BLOG POST WITH YOUR FRIENDS AND ALSO IF YOU LIKE THIS POST DO COMMENT, ALSO VEIW OUR RECENT POSTS REGRING TURTLE GRAPHICS.
Comments
Post a Comment