American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Intro To Python – Shawn

June 13, 2023 @ 5:00 pm - 6:00 pm

Gamas Sub

Today We Did
  1. 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.
  2. We created draw_left_arm(x,y) function.
  3. We learned how to draw filled circle.
  4. We learned how to draw shape like below using 2 circles and one rectangle

Homework

  1. Change codes inside June6_RobotBuilder.py
    1. change draw_left_arm(x,y) to have one more parameter/argument: color
    2. 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.
  2. Create a new file June13_DrawFaceHW.py
    1. Copy the draw_rectangle and draw_circle functions from June13_draw_circles.py file.
    2. Create a new function draw_face1(x,y) . When user call this function a face is drawn like below:
    3. Next week, Shawn will teach you how to convert above face drawing into something like below
    4. If you have question, feel free to email gamas@ayclogic.com or szhuang@ayclogic.com

Details

Date:
June 13, 2023
Time:
5:00 pm - 6:00 pm
Event Categories:
,
Verified by MonsterInsights