American Young Coder

2 PM – Python Object Oriented Programming – Sebastian
2023-07-08 14:00 - 15:00 (America/Los_Angeles)
Today We Did

Added object oriented programming to grocery shopping cart with GroceryItem class
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework JUN8_OOP_hw, please submit by next Friday.
Homework: Page 167 – TRY IT YOURSELF

3 PM - Adv Python Game Dev - Gamas
2023-07-08 15:00 - 16:00
Today We Did

We setup SAT-3PM-TOD project.
We created gitlab project and clone them and checkout individual branches.
Added background and Enemy class.

Homework

Inside Enemy class, resize the image according to the size parameter. figure out the size your self so it will fit the road in the background image. When you resize, make sure the height is bigger than the width.
Display the Enemy on the screen on the bottom side of the road.
Animate the enemy sprite so it will load from 2_enemies_1_RUN_000.png to 2_enemies_1_RUN_009.png. Use for loop in range to produce the right filename suffix and load all the images.

3 PM – Python Object Oriented Programming– Sebastian
2023-07-08 15:00 - 16:00
Today We Did

First day of class, learned about dictionaries!
How do the following in dictionaries:
create, get key’s value, add key/value pair to dictionary, update key’s value, delete item from dictionary, get dictionary length, loop through each key/value/item
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework JUN8_dictionary_hw, please submit by next Friday.
Homework: From the book do the following
a) Page 92 to 97.
b) Page 99 TRY IT YOURSELF. 6-1 and 6-2

3:00 PM - Intro to Python - Juan
2023-07-10 15:00 - 17:00
Today We Did

Reviewed the homework due today about: for loop with list and with range
Reviewed for loops:

with lists and in range.

Learned about while loops:

Forever loops and breaking from a loop.

Briefly learned about functions:

Defining a function, calling a function, parameters

View what we covered today at https://drive.google.com/drive/u/1/folders/19Kl2Yg3yOu6YAXIjkh3fsztpv3OxsmvA

Homework

Name your file July12_while_loop_HW.py and do:

Copy code from pages 118-121

Name your file July12_functions_intro_HW.py and do:

Copy code from pages 130-131

Upload the two files to your google drive folder.
Questions? Email me at juan@ayclogic.com.

7 PM – Python Game Development – Sebastian
2023-07-10 19:00 - 20:00
Today We Did

Setting up Gitlab and PyCharm
Learned about how to load images
Learned how to blit images
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework JUL10_blit_hw, please submit by next Sunday.
Homework:
a. Load image bird01_A.png and save into attribute called self.bird1
b. Blit self.bird1 to screen at coordinates (50, 50)
c. Commit and push your changes to your branch

7:00 PM - Intro to Python - Juan
2023-07-10 19:00 - 20:30
Today We Did

Reviewed homework for project proposals

If I gave you critiques, make sure to modify your project proposal

Finished reviewing complex shapes and circles.
Finished Kaleido Spiral

Homework

Make significant progress on your project.

Submit your file Jul13_Final_Project_HW1.py

Project criteria:
https://www.ayclogic.com/intro-to-python-final-project-criteria/
Questions? Email me at juan@ayclogic.com

5:00 PM – Python Object Oriented Programming – Sebastian
2023-07-11 17:00 - 18:00
Today We Did

Finished Monster System
Finally understood why we have unique classes for monsters like Dragon and Troll (so they can handle magic attacks differently)
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework however you’d like (you can just resubmit the original file from class), please submit by next Monday.
Homework: Inside play_adventure method, add logic to remove monsters from the monster dictionary, or end the game for the player
a. After you perform the magic or sword attach (outside of their if statements!), check if the monster’s health is below 0. If it is, then remove it and tell the player the monster exploded or something 😛
b. Right after the above code, check if the player health is below 0. If it is, we should let the user know that they ran out of health and the game is over. If you want to exit out of the entire program, you can use exit()

3:00 PM - Intro to Python - Juan
2023-07-12 15:00 - 17:00
Today We Did

Reviewed the homework due today about: while loop and functions
Functions:

Without return values
With return values

Random module:

random.randint(start, end), random.choice(list)
Magic8Ball

View what we covered today at https://drive.google.com/drive/u/1/folders/19Kl2Yg3yOu6YAXIjkh3fsztpv3OxsmvA

Homework

Name your file July17_Functions_HW.py and do problems 4 – 7:

https://www.ayclogic.com/list-inputs-if-and-else-loops-and-function/

Upload the file to your google drive folder.
Questions? Email me at juan@ayclogic.com.

6:30 PM - Intro to Python - Juan
2023-07-12 18:30 - 19:30
Today We Did

Reviewed fixing bugs HW, part 1 and part 2.
Reviewed errors and fixing bugs.
Reviewed quiz 2 practice problems:

https://www.ayclogic.com/intro-to-python-exercises-for-quiz-2/

View what we covered at https://drive.google.com/drive/u/1/folders/1ZUAbuGWWGPRXxcEKHRhFdGLyFc7N5Jva

Homework

Study for Quiz 2

Previous quiz 1 problems, random module, fixing errors, functions, etc.

Questions? Contact me @ juan@ayclogic.com
No class on July 5th

6 PM - Intro to Python - Darin
2023-07-13 18:00 - 19:00
Today We Did:

Understanding the difference between del/pop, and append/insert
How to find length of a list
Introduction to For Loops for lists

Homework:

Create new python file named July13_ListHomework2.py
2nd edition: TRY IT YOURSELF from page 42: 3-4, 3-5, 3-6
3rd edition: TRY IT YOURSELF from page 41-42: 3-4, 3-5, 3-6
DO NOT DO 3-7
Submit into Google Drive
If you have any questions, email me at ddjapri@ayclogic.com

7:00 PM - Intro to Python - Juan
2023-07-13 19:00 - 20:30
Today We Did

Finished Grocery System program
Started working on Robux Balance program
View what we covered today at https://drive.google.com/drive/u/1/folders/15Guajo6GvNi_09_rLw7QNwPyAcz1sBNA

Homework

Make more progress on your project.

Submit your file Jul17_Project_2.py

Entire project is due July 24th.
Project criteria:
https://www.ayclogic.com/intro-to-python-final-project-criteria/
Questions? Email me at juan@ayclogic.com

2 PM – Python Object Oriented Programming – Sebastian
2023-07-15 14:00 - 15:00
Today We Did

Review of dictionaries and OOP
Began SchoolSystem program
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Create a new folder in our Google Drive called “SchoolSystem” which you can submit all project files into each time you turn in homework.
Homework: Create the list_students_list() and list_students_list() as we discussed in class. Outline:

def list_students_list(self):
“””
Tell user what you’re doing
Loop through each student in student attribute list
Print information about each student (name, age, grade)
“””
pass
def list_students_dict(self):
“””
Same as list_students_list, but with dictionary
Should we use .keys(), values(), or .items() for the dictionary?
“””
pass

SAT - 3 PM - Adv Python Game Dev - Gamas
2023-07-15 15:00 - 16:00
Today We Did

We learned on how to load images using for in range for loop.
We created config,py
We learned about the enemy movement regions.

Homework

Our next class is going to be Thursday July 20 at 6 PM. No class on July 22nd.
find the coordinates of all turning points for all regions. Below is the image of all the regions.

3 PM – Python Object Oriented Programming – Sebastian
2023-07-15 15:00 - 16:00
Today We Did

Reviewed dictionaries and how they’re much faster than lists
Began grocery system v2
Understand how we use the dictionary; we make the selection point to the name and the price!
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework JUL15_phonebook_hw, please submit by next Friday.
Homework: Follow the instructions in the following link: https://www.ayclogic.com/phone-book-system/

3:00 PM - Intro to Python - Juan
2023-07-17 15:00 - 17:00
Today We Did

Reviewed functions homework
Reviewed fixing bugs and errors
Finished fixing bugs problem 1 in class:

https://www.ayclogic.com/fixing-python-bugs/

Went over practice problems for review:

https://www.ayclogic.com/intro-to-python-exercises-for-quiz-2/

View what we covered today at https://drive.google.com/drive/u/1/folders/19Kl2Yg3yOu6YAXIjkh3fsztpv3OxsmvA

Homework

Name your file July19_FixingBugs_HW.py

https://www.ayclogic.com/fix-python-bugs-2/

Take the Quiz at home:

https://docs.google.com/forms/d/e/1FAIpQLSfQmiaJKXSWsCO-Mik32rodvT1DgTVKs2ce4jeySuMlkSIsHQ/viewform?usp=sf_link
Open book, open notes.

Questions? Email me at juan@ayclogic.com.

7 PM – Python Game Development – Sebastian
2023-07-17 19:00 - 20:00
Today We Did

Reviewed how to use Gitlab & went over homework
Learned how to change the size of an image by scaling
Learned how to change the position of an image with attributes
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Remember to create good commit messages when you push your homework by next Sunday.
Homework:a) The same way we created our birds 1-3, make a fourth bird using the fourth bird image
b) For this bird, give it a variable x and y but this time it should start on the bottom right of the screen
c) Change the x and y attributes for our new bird4 so that it flies from the bottom right to the top left

Code from class:
import pygame
class Birdie():
WIDTH = 1000
HEIGHT = 750
FPS = 40
def __init__(self):
pygame.init()
self.screen = pygame.display.set_mode((Birdie.WIDTH, Birdie.HEIGHT))
self.project_name = “Birdie”
pygame.display.set_caption(self.project_name)
# Loop until the user clicks the close button.
self.running = True
# Used to manage how fast the screen updates
self.clock = pygame.time.Clock()
self.background_image = pygame.image.load(“assets/background_img.png”)
self.bird1 = pygame.image.load(“assets/bird01_A.png”)
self.bird1 = pygame.transform.scale(self.bird1, (70, 50))
self.bird2 = pygame.image.load(“assets/bird02_A.png”)
self.bird2 = pygame.transform.scale(self.bird2, (140, 100))
self.bird3 = pygame.image.load(“assets/bird03_A.png”)
self.bird3 = pygame.transform.scale(self.bird3, (70, 40))
self.bird1_x = 50
self.bird1_y = 50
self.bird2_y = 200
self.bird3_x = 500
def game_loop(self):
# ——– Main Program Loop ———–
while self.running:
# — Main event loop
for event in pygame.event.get():
if event.type == pygame.QUIT:
self.running = False
pygame.display.flip()
self.screen.blit(self.background_image, (0, 0))
self.screen.blit(self.bird1, (self.bird1_x, self.bird1_y))
self.screen.blit(self.bird2, (100, self.bird2_y))
self.screen.blit(self.bird3, (self.bird3_x, 450))
self.bird1_x += 1
self.bird1_y += 1
self.bird2_y += 1
self.bird3_x += 5
self.clock.tick(Birdie.FPS)
current_fps = str(self.clock.get_fps())
pygame.display.set_caption(f'{self.project_name}, fps: {current_fps}’)
# Close the window and quit.
pygame.quit()
if __name__ == ‘__main__’:
sb = Birdie()
sb.game_loop()

7:00 PM - Intro to Python - Juan
2023-07-17 19:00 - 20:30
Today We Did

Finished the Robux Balance System project.
Reviewed final projects and made critiques.

Homework

Make significant progress on your project.
Project due July 24th
Final test July 24th
Project criteria:
https://www.ayclogic.com/intro-to-python-final-project-criteria/
Questions? Email me at juan@ayclogic.com

5 PM – Python Object Oriented Programming – Sebastian
2023-07-18 17:00 - 18:00
Today We Did

Full review of object oriented programming
Went over strategies for how to best take the test
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework JUL18_final_review, please submit by next Monday.
Homework: Try your best to finish the practice exam in 2 hours or less to prepare for the final exam:
https://forms.gle/EbdHSqESbib5siNh8

3:00 PM - Intro to Python - Juan
2023-07-19 15:00 - 17:00
Today We Did

Reviewed Quiz 2 problems
Starting learning about the turtle module
Completely Robot Builder left_arm and right_arm.
View what we covered today at https://drive.google.com/drive/u/1/folders/19Kl2Yg3yOu6YAXIjkh3fsztpv3OxsmvA

Homework

Name your file July24_RobotBuilder_HW.py

Finish the rest of the robot:

Torso, neck, head, eyes, mouth, legs

Questions? Email me at juan@ayclogic.com.

6:30 PM - Intro to Python - Juan
2023-07-19 18:30 - 19:30
Today We Did

Quiz 2

Homework

View your score sent to your email, and review which problems you got wrong

6 PM - Intro to Python - Darin
2023-07-20 18:00 - 19:00
What We Did Today:

Using if statements inside for loops
Understand how indentation works for for loops, how to put code inside a for loop versus outside a for loop

Homework:

https://www.ayclogic.com/animal-list-and-for-loop-exercises/
Create file named ListForLoops-2HW.py for the above homework and submit into google drive
If you have any questions, email me at ddjapri@ayclogic.com

6 PM - Adv Python Game Dev - Gamas
2023-07-20 18:00 - 19:00
Today We Did

We continued on TOD project. We specifically worked on the 3 steps to enable the enemy movements

What direction should the enemy move according to its region.
Move the enemy according to the direction set.
Switch the region according to the enemy coordinate.

Homework

Next 2 classes would be Thursday at 6 PM instead of SAT – 3 PM because I will be unavailable on SAT – 3 PM. So July 27 and Aug 2, will be Thursday classes.
Continue on enemy.py to make the enemy move from region 1 all the way to region 11a or 11b.
When in region 10, you need to randomly decide whether to move to 11a or 11b. Look at Shoot Balloon project to see example how to randomly make bad balloon.

7:00 PM - Intro to Python - Juan
2023-07-20 19:00 - 20:30
Today We Did

Project critiques
Turtle review
Final test review

Homework

Project due July 24th

Due by 8:00 AM

Final test July 24th

7PM – 9PM.
You have two hours to take the final test

Project criteria:
https://www.ayclogic.com/intro-to-python-final-project-criteria/
Questions? Email me at juan@ayclogic.com

6 PM - Python OOP - Shawn
2023-07-21 18:00 - 19:00
Gamas Sub
Today We Did

We reviewed July14_Inheritance.py homework
We continued creating the main.py for MonsterInheritance project.

Homework

Continue with MonsterInheritance main.py and add these 2 features: List All Monsters and Start Adventure.

Welcome to AYC Logic adventure game
1. Add new monster
2. List all monsters
3. Start adventure
Please make your selection. Enter "quit" to exit: 2

LIST ALL MONSTERS
- The Mighty Dragon has 100 health and can do 100 damage
- Troll - 50 health - 75 max damage
- Water Golem - 50 health - 50 max damage

Welcome to AYC Logic adventure game
1. Add new monster
2. List all monsters
3. Start adventure
Please make your selection. Enter "quit" to exit: 3

Enter player's name: Gamas
Enter player's health: 100

Gamas welcome to AYC Logic Adventure game.
You have 100 health remaining

2 PM – Python Object Oriented Programming – Sebastian
2023-07-22 14:00 - 15:00
Today We Did

Continued the School System program
Created all methods for students and teachers
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

In our SchoolSystem folder in our Google Drive, re-upload all files for your SchoolSystem program
Homework: Finish all methods for staff in our SchoolSystem (we’ll finish the classroom methods in class next time).

Add staff
List all staffs using List
List all staffs that is younger than 20
Find staff using list
Find staff using dictionary.

3 PM – Python Object Oriented Programming – Sebastian
2023-07-22 15:00 - 16:00
Today We Did

Introduction to object oriented programming

class: a blueprint for an object made up of methods and attributes

method: a function belonging to a class

attribute: a variable belonging to a class that starts with “self.”

constructor: a method called __init__ which is called when class is instantiated, AND we usually create all attributes here

object: an instance of a class which has unique data (unique attributes)

In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Name your homework JUL22_robux_dictionary_hw, please submit by next Friday.
Homework: Recall our old RobuxShoppingCart program. Change RobuxShoppingCart to use dictionary. This is very similar to ShoppingCart using dictionary.

Old code:
menu = """
What do you want to do:
1. Buy hat 100 Robux
2. Buy hair 150 Robux
3. VIP Server 500 Robux
4. Add more Robux
5. Exit
Enter your selection: """

shopping_cart = []
robux = 300

def handle_transaction(price, item_name):
global robux
if robux < price:
print(f"You only have {robux} robux remaining. Therefore you cannot purchase {item_name} for {price} robux.")
else:
robux -= price
print(f"You purchased a {item_name}. You have {robux} robux remaining.")
shopping_cart.append(item_name)

print(f"Welcome to Robux Bank, you have {robux} robux in the beginning.")

while True:
selection = input(menu)
if selection == "5":
break
elif selection not in("1","2","3","4","5"):
print("invalid selection")
elif selection == "1":
handle_transaction(100, "Hat")
elif selection == "2":
handle_transaction(150, "Hair")
elif selection == "3":
handle_transaction(500, "VIP Server")
elif selection == "4":
credit_card_number = input("Enter your Credit Card number: ")
if credit_card_number == "ABCD1234":
robux += 200
print(f"Thank you for purchasing 200 Robux. You now have {robux} robux remaining.")
else:
print("You have entered an invalid credit card number")

print("
You have purchased the following items:")
count = 1
for item in shopping_cart:
print(f"{count}. {item.title()}")
count += 1

print(f"Your remaining Robux balance is {robux} Robux.")

3:00 PM - Intro to Python - Juan
2023-07-24 15:00 - 17:00
Today We Did

Finished Robot Builder
Complete complex shapes and Face 1.
View what we covered today at https://drive.google.com/drive/u/1/folders/19Kl2Yg3yOu6YAXIjkh3fsztpv3OxsmvA

Homework

Name your file July26_Face2_HW.py

Finish the Face2 function

Questions? Email me at juan@ayclogic.com.

7 PM – Python Game Development – Sebastian
2023-07-24 19:00 - 20:00
Today We Did

Created bird class with constructor and update method
Created sprite group to add instance of bird
Added create_bird() method which creates new bird objects according to our timer
Code from main.py:
Code from bird.py:
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

Be sure to create a good commit message and push your homework by next Sunday
Homework:

Make a class named Cloud in a file called cloud.py similar to the one we made for Bird. Use the cloud1.png image. You don’t need to scale this picture. Make it move to the right.
In main.py, make a new group called self.cloud_group. Make an instance of the new cloud and add it to the group (where should this instance be put? Inside the constructor or the game loop?). Then call update for the cloud group in the game loop.

7:00 PM - Intro to Python - Juan
2023-07-24 19:00 - 21:00
Today We Did

Final test
Submitted final project

5 PM – Python Object Oriented Programming – Sebastian
2023-07-25 17:00 - 18:00
Today We Did

Spent lots of time answering any questions about the practice exam
Reviewed all topics from the class to remember everything we’ve learned so far
Went over good test taking strategies and advice on common mistakes
In case you need anything, feel free to email me at sebastian@ayclogic.com

Homework

No official homework since we already completed the practice exam and the final exam will take place in the next class time
If you want to be extra prepared, you can try to redo the practice exam and look through our old projects (specifically Monster System) to refresh your memory.
