- This event has passed.
4 PM – Intro To Python – Darin
May 6 @ 4:00 pm - 5:00 pm
What We Did Today:
- Learnt and improved how we connect different shaped together using geometry.
- Learnt how to use a function to combine different shapes together to create an object.
Homework:
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).
Notes:
You can contact me via ddjapri@ayclogic.com for any questions or concerns.