American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6pm – Intro to Python – Joshua Widjanarko

January 2 @ 8:00 am - 5:00 pm

Today We Did:

    1. Reviewed Faces, and talked about how to experiment with shapes
    2. Created a Triangle function
    3. Talked about experimenting with setheading() and set turtle.right() and turtle.left()

Homework:

In one new file, “Turtle_complicated_house.py”, do the following:

  1. Copy and paste your face function (or mine in newyearturtle.py)
    1. make your eyebrows slanted, and adjust the coordinates to make it work
    2. Hint: experiment with turltle.setheading before creating the eyebrow (remember to set it back to 0 with set heading later
  2. Create the function house with two paramaters (x,y)
    1. Make a triangle roof
    2. make a rectangle room
    3. add a square room

pseduocode (note numbers may not be exact)

def house(x,y)

# build the roof by calling the rectangle

triangle(color,<insert x coordinate_value>,<insert y coordinate+value>,<insert size>)

#build the body of the house

rectangle(color,<insert x coordinate+value>,<insert y coordinate+value>,<length>,<width>)

#build a window

rectangle(color,<insert x coordinate+value>,<insert y coordinate + value>,<length>,<width>)

email jwidjanarko@ayclogic.com for questions

Details

Date:
January 2
Time:
8:00 am - 5:00 pm
Verified by MonsterInsights