Advertisement
Arcot

ch5 ex1

Oct 20th, 2022
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from turtle import *
  2.  
  3. t=Turtle()
  4.  
  5. colors = ["violet","indigo","blue","green","yellow","orange","red"]
  6.  
  7. radius=10
  8. y=0
  9.  
  10. while colors:
  11.   a = colors.pop()
  12.   t.color(a)
  13.   t.circle(radius)
  14.   radius += 10
  15.   y -= 10
  16.   t.penup()
  17.   t.goto(0,y)
  18.   t.pendown()
  19. done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement