Pythondex
Turtle Python Programs

Draw Apple Logo Using Python

Last updated July 3, 2023 by Jarvis Silva

Today we will create a python program to draw apple logo, Apple is one of the most popular brand in the world famous for its mobiles and OS so today I have decided to create a tutorial on drawing its logo using python.

We will use the turtle module to draw the Apple logo in python. Turtle is a GUI library with the help of this library you can draw anything in python. 

Python Code To Draw Apple Logo


import turtle as t

t.begin_fill()
t.bgcolor('yellow')
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()

Above is the python code for drawing the Apple logo. Now to run this program you need to have python installed on your computer, If you don’t have then follow this guide: Install and setup python on your computer or you can use an online python compiler.

Now you have the code, but there is one last thing you need to do as I have said I have used the turtle library for this program so you might need to install it if you get any errors like turtle module not found.

Turtle comes pre-installed with python setup, but if you get any errors you can install it using the below command.


pip install turtle

So now you have everything setup and you are ready to run the program, so to run this program open a command prompt at your program folder location and paste the below command.


python filename.py

The above command will run the program and it will open a new window and it will start drawing the Apple Logo and below is the finished drawing of the logo.

Apple logo drawing

As you can see, we successfully drew the Apple logo using python turtle. I hope you were able to run this program successfully. 

Want more amazing turtle tutorials like this check out this: Awesome Python Turtle Codes.

Here are some more python drawing tutorials for you:

I hope you found what you were looking for from this tutorial, and if you want more python guides and tutorials like this, do join our Telegram channel for future updates.

Thanks for reading, have a nice day 🙂