Introduction
Welcome friends, we will learn how to draw Olympic logo using Python Turtle. This article is going to be very simple and interesting. The new beginners can also easily grasp this kind of article. We have made this more simple by putting comments for the lines of code wherever it is required.
This code is easily understandable, as the logic required is the same for drawing all the circles. The only changes are made in the x and y coordinates for each circle and the color.
You can visit our website for more articles related to python turtle and its projects. You can visit our website’s search bar or you can also visit our homepage. For the detailed code, you can move to the bottom of the page and copy the code for your reference.
Let’s start
1. Importing Turtle
import turtle
Import function to import the turtle package and to use its methods and functionalities.
2. Creating the first ring of the Olympic symbol
turtle.pensize(8) turtle.color('blue') turtle.penup() turtle.goto(-110,-25) turtle.pendown() turtle.circle(50)
In this piece of code we have made the pensize of the turtle to 8. set the color of the first ring to blue and set the x and y coordinates to -110 and -25 respectively. The radius of the circle is 50.
2. Creating the second ring of the Olympic symbol
turtle.color('black') turtle.penup() turtle.goto(0,-25) turtle.pendown() turtle.circle(50)
Here we change the ring color to black and set the x and y coordinates to 0 and 25 respectively. This is done to change the position of the circle.
3.Creating the third ring of Olympic symbol
turtle.color(‘red’)
turtle.penup()
turtle.goto(110,-25)
turtle.pendown()
turtle.circle(50)
Here again, we changed the circle color to red. The ring is drawn from x coordinate 110 and y coordinate to-25.
4. Creating the fourth ring of Olympic symbol
turtle.color(‘yellow’)
turtle.penup()
turtle.goto(-55,-75)
turtle.pendown()
turtle.circle(50)
In this code line, the ring color is yellow. The circular ring has moved downward cutting the two upper rings, hence we have applied the coordinates as -55 and -75 accordingly.
5. Creating the fifth ring of the Olympic symbol
turtle.color('green') turtle.penup() turtle.goto(55,-75) turtle.pendown() turtle.circle(50) turtle.done()
In this part the ring color is green. The circular ring has moved downward right direction cutting the two rings and has applied the coordinates as 55 and -75 accordingly.
Complete Code to draw Olympic logo using Python Turtle
#Importing Turtle import turtle #set the pensize to 8 turtle.pensize(8) #first ring turtle.color('blue') turtle.penup() #set the x and y coordinates to -110 and -25 turtle.goto(-110,-25) turtle.pendown() #set radius of circle to 50 turtle.circle(50) #second ring turtle.color('black') turtle.penup() turtle.goto(0,-25) turtle.pendown() turtle.circle(50) #Third ring turtle.color('red') turtle.penup() turtle.goto(110,-25) turtle.pendown() turtle.circle(50) #fourth ring turtle.color('yellow') turtle.penup() turtle.goto(-55,-75) turtle.pendown() turtle.circle(50) #fifth ring turtle.color('green') turtle.penup() turtle.goto(55,-75) turtle.pendown() turtle.circle(50) turtle.done()
Output
So you can see the output that we have got after running this simple code.
Thank you for reading this article.
Also Read:
- Create your own ChatGPT with Python
- Bakery Management System in Python | Class 12 Project
- SQLite | CRUD Operations in Python
- Event Management System Project in Python
- Ticket Booking and Management in Python
- Radha Krishna using Python Turtle
- Hostel Management System Project in Python
- Sales Management System Project in Python
- Bank Management System Project in C++
- Python Download File from URL | 4 Methods
- Python Programming Examples | Fundamental Programs in Python
- Drawing letter A using Python Turtle
- Spell Checker in Python
- Portfolio Management System in Python
- Stickman Game in Python
- Contact Book project in Python
- Loan Management System Project in Python
- Cab Booking System in Python
- Brick Breaker Game in Python
- Wishing Happy New Year 2023 in Python Turtle
- Tank game in Python
- GUI Piano in Python
- Ludo Game in Python
- Rock Paper Scissors Game in Python
- Snake and Ladder Game in Python
- Puzzle Game in Python
- Draw Goku in Python Turtle
- Medical Store Management System Project in Python
- Draw Mickey Mouse in Python Turtle
- Creating Dino Game in Python