Advertisement
MrsMcLead

ECS Starburst

Nov 22nd, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. from turtle import *
  2. import random
  3.  
  4. pen = Pen()
  5. pen.speed('fastest')
  6.  
  7. # Finish this program to make a sunburst pattern using the Pen. Your
  8. # sunburst should consist of 180 separate lines, each two degrees apart.
  9.  
  10. #2 move this line so that every line in the sunburst is a different random color
  11. pen.color(random.random(), random.random(), random.random())
  12.  
  13. #1 finish the for loop below to make the 180 lines
  14. for i in range (0,50):
  15.     # This code will make one line and turn 2 degrees to the right
  16.     pen.forward(220)
  17.     pen.backward(220)
  18.     pen.right(2)
  19.  
  20. #3 Make your own cool pattern.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement