Loading Events

« All Events

  • This event has passed.

7 PM – Intro to Python – Isaac

October 6 @ 7:00 pm - 8:00 pm
Today, we
  1. Learned basic Python turtle functions
    1. turtle.bgcolor(color) to set background color
    2. turtle.color(color) to set pen color
    3. turtle.penup(), turtle.pendown() to stop and start drawing
    4. turtle.goto(x, y) to go to a location
    5. turtle.begin_fill(), turtle.end_fill() to fill in a shape
  2. Made a draw_square function and draw_triangle function with turtle.goto()
  3. Made a draw_triangle function with turtle.forward() and turtle.right()
    1. turtle.forward(steps) to go forward
    2. turtle.left(degrees), turtle.right(degrees) to turn left and right
Homework
  1. Create a new file “Oct_6_turtle_shapes_hw.py”
  2. Create a new function “draw_rectangle”. One parameter: pen_color. Inside the function, draw a rectangle shape using turtle module. Call the function and pass any color to the function.
  3. Create a new function “draw_square”. One parameter: pen_color. Inside the function, draw a square shape using turtle module. Call the function and pass any color to the function.
  4. Create a new function “draw_octagon”. One parameter: pen_color. Inside the function, draw an octagon shape using turtle module. Call the function and pass any color to the function.
  5. Create a new function “draw_triangle”. One parameter: pen_color. Inside the function, draw a triangle shape using turtle module. Call the function and pass any color to the function.
  6. Look at this image for your coordinates guidance

If you have any questions, feel free to email me at isaac@ayclogic.com.

Details

  • Date: October 6
  • Time:
    7:00 pm - 8:00 pm