Advertisement
Shiyan12

Untitled

Jun 23rd, 2021
627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. # Import the turtle library for
  2. # drawing the required curve
  3. import turtle as tt
  4.  
  5. # Set the background color as black,
  6. # pensize as 2 and speed of drawing
  7. # curve as 10(relative)
  8. tt.bgcolor('black')
  9. tt.pensize(2)
  10. tt.speed(10)
  11.  
  12. # Iterate six times in total
  13. for i in range(6):
  14.    
  15.       # Choose your color combination
  16.     for color in ('red', 'magenta', 'blue',
  17.                   'cyan', 'green', 'white',
  18.                   'yellow'):
  19.         tt.color(color)
  20.          
  21.         # Draw a circle of choosen size, 100 here
  22.         tt.circle(100)
  23.          
  24.         # Move 10 pixels left to draw another circle
  25.         tt.left(10)
  26.      
  27.     # Hide the cursor(or turtle) which drew the circle
  28.     tt.hideturtle()
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement