Python program for drawing savage goggles
Makie savage goggles with python turtle
Things you need to know:
1.Turtle module
2. FOR LOOP
3.Basic python commands
Here is the source code👇👇
from turtle import *
scre=Screen()
scre.bgcolor("red")
d=Turtle()
d.penup()
d.setposition(100,0)
d.pendown()
d.speed(3)
d.begin_fill()
d.color("black")
d.left(170)
d.forward(600)
d.left(90)
d.forward(40)
for j in range(7):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.left(90)
d.forward(150)
for k in range(7):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.forward(50)
for t in range(7):
d.right(90)
d.forward(10)
d.left(90)
d.forward(10)
d.forward(150)
for l in range(7):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.left(90)
d.forward(40)
d.left(90)
d.forward(40)
d.end_fill()
d.speed(5)
d.penup()
d.setposition(30,-90)
d.pendown()
d.begin_fill()
d.color("white")
for a in range(3):
d.right(90)
d.forward(10)
d.left(90)
d.forward(10)
d.left(90)
d.forward(10)
for q in range(2):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.end_fill()
d.speed(3)
d.right(90)
d.forward(10)
d.begin_fill()
d.color("white")
for a1 in range(3):
d.right(90)
d.forward(10)
d.left(90)
d.forward(10)
d.left(90)
d.forward(10)
for q1 in range(2):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.end_fill()
d.penup()
d.setposition(-310,-35)
d.pendown()
d.begin_fill()
d.right(180)
d.forward(10)
for a3 in range(2):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.left(90)
d.forward(10)
d.left(90)
d.forward(10)
for q3 in range(2):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.end_fill()
d.right(90)
d.forward(10)
d.color("white")
d.begin_fill()
for a3 in range(3):
d.right(90)
d.forward(10)
d.left(90)
d.forward(10)
d.left(90)
d.forward(10)
for e3 in range(2):
d.left(90)
d.forward(10)
d.right(90)
d.forward(10)
d.end_fill()
d.hideturtle()
Please do share this post with everyone
Also out domain has been changed from helpufit.online to helpfit.blogspot.com
Comments
Post a Comment