Advertisement
Guest User

Untitled

a guest
Apr 10th, 2020
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import turtle,random
  2.  
  3. n = int(input())
  4.  
  5. colors  = ["red","green","blue","orange","purple","pink","yellow"]
  6.  
  7. for i in range(n):
  8.     color = random.choice(colors)
  9.     turtle.forward(i)
  10.     turtle.right(45)
  11.     turtle.color(color)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement