SCU:BA, Summer 2023
Your laptop
In summer 2023, our laptop computers are the following make
and model: Dell Inspiron 15
3520. The service
manual is here.
Books
Think Python by Allen
B. Downey is an introduction to Python programming for
beginners. The full text of the book is available free online.
Miscellaneous Resources
Aliens, bunnies, basketballs, etc.
McDonald's prices
Tic-Tac-Toe components
basketball code from class
Flappy Bird
Monday, June 26: Python Basics
What we did today:
- Set up computers
- Learned about string and int variable types
- Learned about print function
- Learned about arithmetic operators
- Learned about input function
Tuesday, June 27: Functions
What we did today:
- Review of basic inputs/outputs
- Learned about functions
- Created addition, subtraction, and multiplication functions
- Stadium Sellout Exercise
Wednesday, June 28: Conditionals
What we did today:
- Refactored the stadium-sellout exercise
- Relational operators: equals ==, not equals !=, less than, greater than, etc.
- Briefly touched on boolean operators (and, or)
- Conditionals: if, else, elif
- Demonstration: weather reaction based on temperature
- Guessing Game Activity (secret number)
Thursday, June 29: CSS, HTML, and multiple pages
What we did today:
- Learned about booleans
- Learned about while loops
- Learned about for loops
- Created ASCII art (squares, rectangles, triangles)
Friday, June 30: Introduction to Pygame Zero
What we did today:
- Installed Pygame Zero
- Learned how to import pygamezero
- Learned how to upload images as actors
- Learned how to create and draw actors
- Learned how to set height and width of screen
- Learned how to use draw and update functions
- Learned set background color
- Learned how to set coordinates of actors in programming grid
- Learned how to move actors using keyboard
Monday, July 3: Pygame Zero (cont...)
What we did today:
- Added more features to Coin-Catching Alien Game
- Added Ghost Actor
- Added Coin Actor
- Added methods to move Ghost and Coin
- Added methods to handle collisions
- Added variables to keep track of score and health points
- Added Game Over screen
Wednesday, July 5: Lists
What we did today:
- Added more features to Coin-Catching Alien Game
- Increased ghost speed each time alien catches a coin
- Increased ghost size each time ghost catches a coin
- Learned how to initialize lists
- Learned how to append items to a list
- Learned how to remove items from a list
- Learned how to loop through lists
- Learned how to print lists
- Built an interactive shopping cart program
Thursday, July 6: Tuples
What we did today:
- Added more features to Coin-Catching Alien Game
- Using lists, added variable number of coins to catch
- Made alien and ghost face the direction of movement
- Learned how to initialize and create tuples
- Learned how to access elements of a tuple
- Learned to represent and use coordinates with tuples
- Wrote inches-to-feet and feet-to-inches height conversion programs
Friday, July 7: Strings
What we did today:
- Constructed rgb tuple from three integers
- Learned builtin string functions upper, lower, replace, find
- Learned string indexing rules, strings as lists of characters
- Wrote find_word function to find index of a word in a sentence
- Wrote number_analyzer to perform arithmatic on a list of numbers
Monday, July 10: Intro to GUIs
What we did today:
- Learned basic graphical user interface construction
- Learned about App, Text, TextBox, Slider, PushButton functions
- Wrote rgb_color_picker gui to make a color from three integers
- Wrote height_conversion functions to add an interface to code from Day 8
- Added gui to number_guesser from Day 3
Tuesday, July 11: More GUIs and Strings
What we did today:
- Learned about gui Box function, when_key_pressed command
- Learned how to connect program actions to individual keys
- Wrote interactive to-do list gui with add, remove, done capabilities
- Learned split, join string methods, how to use format strings
- Learned string comparison functions and ASCII orderings
Wednesday, July 12: Enumerate, GUIs (cont...)
What we did today:
- Learned about python enumerate function and how to use it when comparing lists
- Wrote example lists for enumerate, discussed variable naming conventions in for loops
- Wrote an animal guesser gui to guess a secret animal, provide feedback when incorrect
- Added additional features to animal guesser (previous guesses, capitalization, hints)
- Wrote our own guis or followed example guis for vending machine or calculator
Thursday, July 13: Classes, Objects, and Methods
What we did today:
- Learned about python classes and their corresponding properties
- Created Card class with rank and suit fields
- Added is_face, higher_rank, same_rank, lower_rank, same_suit methods to the class
- Used Card constructor to generate a deck of cards
- Created Vegetable class with corresponding fields and methods
Friday, July 14: More Classes: Cards, Players
What we did today:
- Continued learning about python classes and their corresponding properties
- Created Hand class with cards field to represent a hand of cards
- Added is_flush, is_pair, is_three_of_a_kind, is_royal_flush methods to the class
- Created Player, Weapon, Food classes for an adventure game
- Created add_weapon, attack methods for Player class
Monday, July 17: Animations and Sounds
What we did today:
- Further expanded upon Player, Weapon, Food classes for adventure game
- Created bunny Actor for minimal bunner game
- Made bunny actor face multiple directions as controlled by WASD keys
- Made bunny actor jump in direction of choice
- Gave bunny actor turbo jump capabilities to go 5X as far as a normal jump
- Added sound effects to jumping bunny
Tuesday, July 18: Dictionaries
What we did today:
- Learned the concept of the dictionary structure in python
- Learned about keys and values
- Learned about indexing through dictionary keys and values
- Made catalog dictionary with crime, horror, comedy, scifi keys
- Made random recommender to recommend an item from given genre
Wednesday, July 19: Dictionaries, Moving Sprites with Mouse, Basketball
What we did today:
- Wrote Wacky Name Generator with dictionary of nouns, adverbs, adjectives
- Learned about moving sprites with on_mouse_down and on_mouse_up functions
- Made Bunny class as a subclass of Actor with added "dragged" field
- Made a bunny actor draggable across a screen
- Made Basketball class as a subclass of Actor with "falling_speed" field
- Learned about the physics of falling objects through demo
- Made a basketball actor fall at constant speed through the window
Thursday, July 20: Realistic Basketball, McDonald's Simulator
What we did today:
- Learned about reversing direction of movement of a basketball sprite for bouncing
- Learned about reducing speed of basketball to simulate effects of friction
- Made multiple basketballs drop and bounce from different heights
- Made McDonald's price checker using dictionary of items and prices
- Created cart box, wrote add_item function to add items to the cart
Friday, July 21: McDonald's Simulator, Spinning Basketball, Tic Tac Toe
What we did today:
- Finished add_items, wrote calculate_total function to find total price of cart
- Learned about physics of spinning basketballs, added spinning bool to Basketball class
- Modified spinning speed, made basketball stop spinning at bottom of screen
- Created rudimentary Tic Tac Toe game with movable X and O Pieces
Monday, July 24: Tic Tac Toe, Flappy Bird
What we did today:
- Finished rudimentary Tic Tac Toe game with movable X and O Pieces
- Created dragged, initial_position fields and pick_up, put_down methods
- Made Pieces move when dragged with mouse, changed images when picked up
- Began writing code for Flappy Bird game
Tuesday, July 25: Intro to Independent Projects
What we did today:
- Demonstrated 3 project examples: Asteroids, BlackJack, Episode Story Game
- Split into three project groups, began work on independent projects
Wednesday, July 26: Independent Project Work (cont...)
What we did today:
- Day 2 of work on independent projects
Thursday, July 27: Independent Project Work (cont...)
What we did today:
- Day 3 of work on independent projects
Friday, July 28: Independent Project Work (cont...)
What we did today:
- Day 4 of work on independent projects
Monday, July 31: Independent Project Work (cont...)
What we did today:
- Day 5 of work on independent projects
Tuesday, August 1: Independent Project Work (cont...)
What we did today:
- Day 6 of work on independent projects
Wednesday, August 2: Independent Project Work (cont...)
What we did today:
- Day 7 of work on independent projects
Thursday, August 3: Last Day of Class
What we did today:
- Finished work on independent projects
- Prepared for final showcase