Skip to main content

How to create Source Code To Apple Logo Using Python turtle

Source Code To Apple Logo Using Python turtle 







import turtle as t


t.begin_fill()
t.Screen().bgcolor('Gray')
t.fillcolor('black')
t.left(134)

for i in range(30):
    t.forward(1)
    t.left(1)

t.right(5)

for i in range(35):
    t.forward(1)
    t.left(1)

t.left(5)
t.forward(30)

for i in range(15):
    t.forward(0.7)
    t.right(3)

t.forward(25)
t.left(5)

for i in range(50):
    t.forward(1)
    t.left(1)

t.right(3)

for i in range(50):
    t.forward(1)
    t.left(1)

t.right(5)

for i in range(45):
    t.forward(2)
    t.left(1)

t.right(5)

for i in range(40):
    t.forward(2)
    t.left(1)

t.left(5)

for i in range(20):
    t.forward(1)
    t.left(2)

t.left(5)
t.forward(15)

for i in range(9):
    t.forward(2)
    t.right(3)

t.forward(1)

for i in range(15):
    t.forward(1)
    t.right(1)

t.right(4)
t.forward(4.5)
t.right(1)

for i in range(27):
    t.forward(1)
    t.left(2)

t.left(8)
t.forward(5)

for i in range(25):
    t.forward(2)
    t.left(1)

t.right(3)
t.forward(10)
t.left(83)

for i in range(75):
    t.forward(1.3)
    t.right(1)

t.right(4)

for i in range(24):
    t.forward(1.3)
    t.right(1)

t.forward(9.66)
t.end_fill()
t.penup()
t.left(132)
t.forward(100)
t.right(96)
t.pendown()
t.begin_fill()
t.fillcolor('black')

for i in range(60):
    t.forward(0.8)
    t.right(1)

t.right(120)

for i in range(60):
    t.forward(0.8)
    t.right(1)

t.hideturtle()
t.end_fill()

t.done()

Comments

Popular posts from this blog

How to access contacts from the address book

                   HTML    How to access contacts from the address book <! DOCTYPE html > < html lang = " en " > < head > < meta charset = " utf-8 " /> < meta name = " viewport " content = " width=device-width, initial-scale=1 " /> < link rel = " icon " href = " data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎉</text></svg> " /> < title > How to access contacts from the address book </ title > </ head > < body > < h1 > How to access contacts from the address book </ h1 > < p > Ship your order as a present to a friend. </ p > < button hidden type = " button " > Open address book </ button > < pre > </ pre > < label > Na...

HOW TO CREATE COPY BUTTON WITH HTML, CSS AND JS LANGUAGE

                                                                                                                                                      STRUCTURE WITH  <HTML> <! DOCTYPE html > < html lang = " en " > < head > < meta charset = " utf-8 " /> < meta name = " viewport " content = " width=device-width, initial-scale=1 " /> < link rel = " icon " href = " data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text...