Skip to content
Related Articles

Related Articles

Colored Flower by circles using Turtle in Python

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Hard
  • Last Updated : 01 Aug, 2020

Prerequisite: Turtle Programming Basics

Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc.

To draw Flower :

Following steps are used :

  • Import Turtle
  • Set screen
  • Make Turtle Object
  • Define colors used for drawing
  • Loop to draw circles oriented by angle.

Below is the implementation :


# import turtle package 
import turtle
# screen object
sc = turtle.Screen()   
# turtle object
pen = turtle.Turtle()  
# Driver Code
# colors
col = ['violet', 'indigo', 'blue', 'green'
       'yellow', 'orange', 'red']
# screen size
# screen color
# turtle size
# turtle object
# integer variable 
# for accessing colors
i = 0
# loop to draw 30 circles 
for angle in range(0, 360, 12):
  # color of circle
  if i == 6:           
    i = 0
    i += 1
  # Set the orientation of
  # the turtle to angle
  # circle of radius 80
# hide the turtle

Output :

Coloured flower by circle

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!