- This event has passed.
6pm – Intro to Python – Joshua Widjanarko
January 2 @ 8:00 am - 5:00 pm
Today We Did:
- Reviewed Faces, and talked about how to experiment with shapes
- Created a Triangle function
- Talked about experimenting with setheading() and set turtle.right() and turtle.left()
Homework:
In one new file, “Turtle_complicated_house.py”, do the following:
- Copy and paste your face function (or mine in newyearturtle.py)
- make your eyebrows slanted, and adjust the coordinates to make it work
- Hint: experiment with turltle.setheading before creating the eyebrow (remember to set it back to 0 with set heading later
- Create the function house with two paramaters (x,y)
- Make a triangle roof
- make a rectangle room
- 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