Advertisement
arthur393

Rosa de Quadrados

Apr 9th, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import turtle
  2.  
  3. t = turtle.Turtle()
  4. j = turtle.Screen()
  5.  
  6. def espiral(t, lineLen):
  7.     if lineLen < 10000:      
  8.         if(lineLen % 2 == 0):
  9.             t.pencolor("#FFA500")
  10.         else:
  11.             t.pencolor("#00BFFF")          
  12.         t.forward(lineLen)      
  13.         t.left(91)            #inclinação 91 graus à esquerda
  14.         espiral(t,lineLen+3)
  15.  
  16. #inicio
  17. t.screen.bgcolor("black")
  18. t.width(1) #ponta caneta
  19. t.speed(1000)
  20. espiral(t,0)
  21.  
  22. #saida
  23. j.exitonclick()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement