Your homework this week is to make a function for the right arm as we did in class for the right leg.
You should complete this function:
def makeRightArm(x, y):
……….drawRectangle(__, __, 100, 20, “black”)
……….drawRectangle(__, __, 20, 70, “red”)
and here you need to figure out the x and the y positions, where the second rectangle’s x and y is relative to the first rectangles.
If I originally had
drawRectangle(-30, -50, 20, 100, “black”)
drawRectangle(-30, -150, 55, 20, “yellow”)
Then my function coordinates would become:
drawRectangle(x, y, 20, 100, “black”)
drawRectangle(x, y-100, 55, 20, “yellow”)
where the second rectangle’s coordinates depend on the difference between the second rectangle and the firs rectangle.
While you’re at it, finish the rest of the robot (left leg and left arm).
You can contact me via ddjapri@ayclogic.com for any questions or concerns.