Advertisement
Week045

For Diana :)-

Oct 5th, 2022
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.88 KB | None | 0 0
  1. import turtle
  2. import time
  3.  
  4. bg = turtle.Screen()
  5. bg.bgcolor("light blue")
  6.  
  7. my_turtle = turtle.Turtle()
  8. my_turtle.shape("turtle")
  9. my_turtle.speed(1)
  10.  
  11. my_turtle.color("yellow")
  12. my_turtle.pensize(3)
  13. my_turtle.penup()
  14. my_turtle.setposition(150, 150)
  15. my_turtle.begin_fill()
  16. my_turtle.pendown()
  17. my_turtle.circle(50)
  18. my_turtle.end_fill()
  19.  
  20. my_turtle.penup()
  21. my_turtle.goto(150, 140)
  22. my_turtle.pendown()
  23. my_turtle.goto(150, 130)
  24.  
  25. my_turtle.penup()
  26. my_turtle.goto(150, 260)
  27. my_turtle.pendown()
  28. my_turtle.goto(150, 270)
  29.  
  30. my_turtle.penup()
  31. my_turtle.goto(210, 200)
  32. my_turtle.pendown()
  33. my_turtle.goto(220, 200)
  34.  
  35. my_turtle.penup()
  36. my_turtle.goto(90, 200)
  37. my_turtle.pendown()
  38. my_turtle.goto(80, 200)
  39.  
  40. my_turtle.penup()
  41. my_turtle.goto(185+7, 165-7)
  42. my_turtle.pendown()
  43. my_turtle.goto(185+14, 165-14)
  44.  
  45. my_turtle.penup()
  46. my_turtle.goto(185+7, 235+7)
  47. my_turtle.pendown()
  48. my_turtle.goto(185+14, 235+14)
  49.  
  50. my_turtle.penup()
  51. my_turtle.goto(115-7, 235+7)
  52. my_turtle.pendown()
  53. my_turtle.goto(115-14, 235+14)
  54.  
  55. my_turtle.penup()
  56. my_turtle.goto(115-7, 165-7)
  57. my_turtle.pendown()
  58. my_turtle.goto(115-14, 165-14)
  59.  
  60. shift = 90
  61. my_turtle.penup()
  62. my_turtle.goto(-190, -180-shift)
  63. my_turtle.color("yellow")
  64. my_turtle.pensize(6)
  65. my_turtle.pendown()
  66. my_turtle.goto(190, -180-shift)
  67.  
  68. my_turtle.penup()
  69. my_turtle.goto(-160, -150-shift)
  70. my_turtle.color("purple")
  71. my_turtle.pensize(6)
  72. my_turtle.pendown()
  73. my_turtle.goto(160, -150-shift)
  74.  
  75. my_turtle.penup()
  76. my_turtle.goto(-130, -120-shift)
  77. my_turtle.color("teal")
  78. my_turtle.pensize(6)
  79. my_turtle.pendown()
  80. my_turtle.goto(130, -120-shift)
  81.  
  82. my_turtle.penup()
  83. my_turtle.goto(-74, -110-shift)
  84. my_turtle.pendown()
  85. my_turtle.color("white")
  86. my_turtle.goto(50, -110-shift)
  87. my_turtle.left(90)
  88. my_turtle.forward(60)
  89. my_turtle.left(90)
  90. my_turtle.forward(125)
  91. my_turtle.left(90)
  92. my_turtle.forward(60)
  93.  
  94. # draw candles
  95. my_turtle.penup()
  96. my_turtle.goto(-60, -40-shift)
  97. my_turtle.color("aquamarine")
  98. my_turtle.pendown()
  99. my_turtle.pensize(3)
  100. my_turtle.goto(-60, -20-shift)
  101.  
  102. my_turtle.penup()
  103. my_turtle.goto(-40, -40-shift)
  104. my_turtle.color("yellow")
  105. my_turtle.pendown()
  106. my_turtle.pensize(3)
  107. my_turtle.goto(-40, -20-shift)
  108.  
  109. my_turtle.penup()
  110. my_turtle.goto(-20, -40-shift)
  111. my_turtle.color("green")
  112. my_turtle.pendown()
  113. my_turtle.pensize(3)
  114. my_turtle.goto(-20, -20-shift)
  115.  
  116. my_turtle.penup()
  117. my_turtle.goto(0, -40-shift)
  118. my_turtle.color("pink")
  119. my_turtle.pendown()
  120. my_turtle.pensize(3)
  121. my_turtle.goto(0, -20-shift)
  122.  
  123. my_turtle.penup()
  124. my_turtle.goto(20, -40-shift)
  125. my_turtle.color("blue")
  126. my_turtle.pendown()
  127. my_turtle.pensize(3)
  128. my_turtle.goto(20, -20-shift)
  129.  
  130. my_turtle.penup()
  131. my_turtle.goto(-300, 70-shift)
  132. my_turtle.color("grey")
  133. my_turtle.pendown()
  134. my_turtle.write(
  135.     "С днём рождения, Диана!", move=False,
  136.     font=("Helvetica", 24, "bold"))
  137. my_turtle.penup()
  138. my_turtle.goto(-250, 250)
  139. time.sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement