Advertisement
cardel

G75 Tortuga

Jun 10th, 2021
974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. import turtle
  2.  
  3. #Instanciar
  4. tortuga = turtle
  5. tortuga.setup(800,600,0,0)
  6. tortuga.screensize(800,600)
  7. tortuga.title("Espacio de trabajo")
  8. tortuga.showturtle()
  9. tortuga.color("red")
  10. tortuga.forward(200)
  11. tortuga.lt(120)
  12. tortuga.forward(100)
  13. tortuga.color("blue")
  14. tortuga.lt(40)
  15. tortuga.backward(200)
  16. tortuga.color("green")
  17. tortuga.circle(100)
  18. tortuga.home()
  19. color = ["red","orange","blue","red","yellow"]
  20. for i in range(0,18):
  21.     sel = i%5
  22.     tortuga.color(color[sel])
  23.     tortuga.lt(20)
  24.     tortuga.forward(50)
  25.     tortuga.lt(30)
  26.     tortuga.forward(40)
  27.     tortuga.rt(30)
  28.     tortuga.backward(40)
  29.     tortuga.circle(5)
  30.  
  31. tortuga.color("black")
  32. tortuga.rt(60)
  33. for i in range(0,5):
  34.     tortuga.penup()
  35.     x = tortuga.xcor()
  36.     y = tortuga.ycor()
  37.     tortuga.forward(50)
  38.     tortuga.pendown()
  39.     tortuga.goto(x+10,y)
  40.    
  41.    
  42.  
  43.    
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement