from turtle import *

setup(1000, 1000)
hideturtle()
speed(100)
#  base of pendulum
forward(200)
right(90)
forward(50)
right(90)
forward(400)
right(90)
forward(50)
right(90)
forward(370)

#rods of pendulum
#outer layer
left(90)
forward(200)
circle(20, 90)
forward(300)
circle(20, 90)
forward(200)
# Inner layer
left(90)
forward(320)
left(90)
forward(190)
circle(10, 90)
forward(280)
circle(10, 90)
forward(190)
# drawing the first ball
showturtle()
penup()
goto(100, 50)
right(90)
pendown()
circle(15)
right(100)
forward(152)
left(100)
forward(50)
left(99)
forward(151)
# drawing the seoncd ball
penup()
goto(30, 50)
pendown()
right(100)
circle(15)
right(100)
forward(153)
left(100)
forward(50)
left(100)
forward(155)
# drawing the thrid ball
penup()
goto(-40, 50)
pendown()
right(100)
circle(15)
right(100)
forward(153)
left(100)
forward(50)
left(100)
forward(155)
# drawing the fourth ball
penup()
goto(-100, 50)
pendown()
right(100)
circle(15)
right(100)
forward(153)
left(100)
forward(50)
left(100)
forward(155)
done()