- This event has passed.
5 PM – Intro To Python – Shawn
June 13, 2023 @ 5:00 pm - 6:00 pm
Gamas Sub
Today We Did
- We learned how life without functions would be miserable because there will be a lot of code duplications and your entire codes would be very long.
- We created draw_left_arm(x,y) function.
- We learned how to draw filled circle.
- We learned how to draw shape like below using 2 circles and one rectangle
Homework
- Change codes inside June6_RobotBuilder.py
- change draw_left_arm(x,y) to have one more parameter/argument: color
- Add a new method draw_right_arm(x,y, color). This is very similar to draw_left_arm(x,y, color) that we did in the class. Change your existing codes that drew the right arms to use this new function.
- Create a new file June13_DrawFaceHW.py
- Copy the draw_rectangle and draw_circle functions from June13_draw_circles.py file.
- Create a new function draw_face1(x,y) . When user call this function a face is drawn like below:
- Next week, Shawn will teach you how to convert above face drawing into something like below
- If you have question, feel free to email gamas@ayclogic.com or szhuang@ayclogic.com