0% found this document useful (0 votes)
69 views3 pages

Import Turtle G

The document uses the turtle module in Python to draw geometric shapes and letters. It sets the turtle shape and background color, then defines functions to draw the letters "G" and "E" in different colors. It continues drawing additional shapes such as lines, boxes, and a spiral using various colors and turtle movements.

Uploaded by

api-327712792
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views3 pages

Import Turtle G

The document uses the turtle module in Python to draw geometric shapes and letters. It sets the turtle shape and background color, then defines functions to draw the letters "G" and "E" in different colors. It continues drawing additional shapes such as lines, boxes, and a spiral using various colors and turtle movements.

Uploaded by

api-327712792
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

import turtle

turtle.shape("turtle")
turtle.bgcolor("#5c5c8a")
turtle.penup()
turtle.left(180)
turtle.forward(300)
turtle.pendown()
turtle.right(180)
turtle.speed(0)

def drawG():
turtle.color("aqua")
turtle.width(15)
turtle.forward(90)
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(120)
turtle.right(90)
turtle.forward(190)
turtle.right(90)
turtle.forward(120)
turtle.penup()
turtle.forward(100)
turtle.right(90)
turtle.pendown()
drawG()

def drawE():
turtle.color("red")
turtle.forward(190)
turtle.left(90)
turtle.forward(100)
turtle.penup()
turtle.left(180)
turtle.forward(100)
turtle.right(90)
turtle.forward(190)
turtle.right(90)
turtle.pendown()
turtle.forward(100)
turtle.left(180)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(180)
turtle.forward(100)
turtle.left(90)
turtle.forward(90)
turtle.left(90)
turtle.forward(100)
turtle.penup()
turtle.forward(100)
turtle.pendown()
drawE()

turtle.color("orange")
turtle.left(90)
turtle.forward(190)
turtle.right(150)
turtle.forward(207)
turtle.left(150)
turtle.forward(190)

turtle.color("blue")
turtle.penup()
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.pendown()
turtle.forward(190)

turtle.color("pink")
turtle.penup()
turtle.left(90)
turtle.forward(100)
turtle.pendown()
turtle.left(90)
turtle.forward(190)

turtle.right(90)
turtle.forward(100)
turtle.penup()
turtle.right(180)
turtle.forward(100)
turtle.left(90)
turtle.forward(190)
turtle.left(90)
turtle.pendown()
turtle.forward(100)
turtle.right(180)
turtle.forward(100)
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(100)

turtle.right(90)
turtle.penup()
turtle.forward(180)
turtle.right(90)
turtle.forward(550)
turtle.width(6)
turtle.pendown()

turtle.color("#00cc44")
turtle.left(90)
turtle.forward(80)

turtle.penup()
turtle.left(90)
turtle.forward(40)
turtle.pendown()
turtle.left(90)
turtle.forward(80)
turtle.right(90)
turtle.forward(60)
turtle.right(90)
turtle.forward(80)
turtle.right(90)
turtle.forward(60)
turtle.right(180)

turtle.penup()
turtle.forward(100)
turtle.pendown()
turtle.left(90)
turtle.forward(80)
turtle.right(90)
turtle.forward(60)
turtle.right(90)
turtle.forward(80)
turtle.right(90)
turtle.forward(60)
turtle.right(180)
turtle.penup()
turtle.forward(100)
turtle.pendown()

turtle.left(90)
turtle.pendown()
turtle.forward(80)
turtle.left(150)
turtle.forward(60)
turtle.left(120)
turtle.forward(80)

turtle.penup()
turtle.forward(60)
turtle.pendown()
turtle.color("#f96390")
turtle.begin_fill()
while True:
turtle.forward(200)
turtle.left(170)
turtle.end_fill()
turtle.done()
turtle.done()

You might also like