American Young Coder (AYC)

• This event has passed.

# 6 PM – Intro To Python – Darin

## Today We Do

1. Learnt how to make a grocery system, where our computer keeps track of what items we bought and we imitated a simple text based game.
2. Reviewed the final projects

## Homework

FINISH UP your final project! This means you want to finish all of the criteria shown in the final project guidelines: https://www.ayclogic.com/intro-to-python-final-project-criteria/

Send your code for the final project into the google drive preferably before Sunday so I can look over it!

ASK me in email if you have any questions or need help!

YOU MUST HAVE THIS DONE BY NEXT WEEK!!

For Eden, your homework is to edit the crystal shaped figure to make it smaller, and put it inside of your final project that you have already. Make it spawn infinitely at random locations while changing its color each time!

## Notes:

If you have any questions, email me at ddjapri@ayclogic.com

## EXTRA TIPS:

Here is the code for how to make a triangle

I started with this:

——————————————————————
t.right(60)
t.forward(60)
t.right(120)
t.forward(60)
t.right(120)
t.forward(60)
——————————————————————

and then changed it into a function like this:

——————————————————————
def makeTriangle(x, y, color, length):
t.penup()
t.goto(x, y)
t.pendown()

t.color(color)

t.begin_fill()
# everything else below here draws the triangle
t.right(60)
t.forward(length)

for i in range(2):
t.right(120)
t.forward(length)
# to set the mouse in the original direction
t.right(60)

t.end_fill()

——————————————————————

You may have noticed that the triangle has equal length and is made from the top, but if you want to angle your triangle, you can add a heading parameter:

——————————————————————
def makeTriangle(x, y, color, length, heading=0):
t.penup()
t.goto(x, y)
t.pendown()

t.color(color)

t.begin_fill()
# everything else below here draws the triangle
t.right(60)
t.forward(length)

for i in range(2):
t.right(120)
t.forward(length)
# to set the mouse in the original direction
t.right(60)

t.end_fill()
——————————————————————

You can call the function like this and see what happens:

makeTriangle(100, 100, “pink”, 100, 30)

## Details

Date:
March 26
Time:
6:00 pm - 7:00 pm
Event Categories:
,