American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

5 PM – Indo – Intro to Python – Joel

April 10, 2023 @ 5:00 pm - 6:00 pm

Today We Did
  1. We went over the April3_TurtleBasic Homework.
  2. We went over how to create a square function to reduce code duplication
Homework
  1. Create 3 new files:
    1. April1_TurtleRectangleFunction.py
      1. Copy the rectangle codes from March25_TurtleBasic.py and create a function draw_rectangle(x,y, color) function.
      2. Call the function 5 times with different coordinates and different colors.
    2. April1_TurtleTriangleFunction.py
      1. Copy the rectangle codes from March25_TurtleBasic.py and create a function draw_triangle(x,y, color) function.
      2. Call the function 5 times with different coordinates and different colors.
    3. April1_TurtleOctagonFunction.py
      1. Copy the octagon codes from March25_TurtleBasic.py and create a function draw_octagon(x,y, color) function.
      2. Call the function 5 times with different coordinates and different colors.
  2. Above homework is very similar to how we did the draw_square function in the class. Hint: before creating the function, you first have to change the coordinate to start drawing from (0,0). You can also look for the coordinates in the previous homework if you want to find the length of the shape too.

Details

Date:
April 10, 2023
Time:
5:00 pm - 6:00 pm
Verified by MonsterInsights