Advertisement
7alexv7

Python drool

Nov 28th, 2022 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import turtle
  2.  
  3. t = turtle.Pen()
  4. color = "red"
  5. t.speed(0)
  6.  
  7. def dreptunghi(x, y, lungime, latime, culoare):
  8. t.penup()
  9. t.goto(x, y)
  10. t.color(culoare)
  11. t.pendown()
  12. t.begin_fill()
  13. for i in range(1, 3):
  14. t.forward(lungime)
  15. t.right(90)
  16. t.forward(latime)
  17. t.right(90)
  18. t.end_fill()
  19. t.penup()
  20.  
  21. #Cap
  22. dreptunghi(50, 50, 130, 130, "yellow")
  23.  
  24. #Ochi
  25. dreptunghi(70, 20, 15, 15, "black")
  26. dreptunghi(130, 20, 15, 15, "black")
  27.  
  28. #Fata
  29. dreptunghi(70, 0 , 70, 10, "black")
  30. dreptunghi(70, 0, 10, 40, "black")
  31. dreptunghi(70, -40, 70, 10, "black")
  32. dreptunghi(140, 0, 10, 50, "black")
  33.  
  34. #Saliva
  35. dreptunghi(140, -50, 10, 40, "blue")
  36. dreptunghi(120, -50, 10, 20, "blue")
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement