Introduction to Programming in Python
Yu's Elite Education
This class will introduce computer programming using Python.
- Sept 8: Introduction [slides]
- Download and install Python 3.4.3 on your computer. Create a simple program (.py file) that uses variables and print statements, and email it to me at firstname.lastname@example.org. Also email me to let me know which day you would be able to attend a rescheduled October 20th class: October 21st (Wed), 23rd (Fri) or 26th (Mon).
- Sept 15: Functions and Modules [slides]
- Write two functions that compute the area and perimeter of a rectangle given its two side lengths. Prompt the user to input the side lengths, then print the area and perimeter. Also email me to let me know which day you would be able to attend a rescheduled October 20th class: October 21st (Wed), 23rd (Fri) or 26th (Mon). Extra credit: install a new module and use a function from it (See PyPI for some possibilities: NameThatColor, Cheetah, FridayThe13th)
- Sept 22: Making decisions [slides]
- The value of a blackjack hand is the sum of the card values, where 2-10 are worth their number; J, Q, K worth 10; A worth 11 or 1. We want the value to be as close to 21 without going over (Bust). Write a program to read in three card values (as strings) and return the value of the hand, or Bust. The code we started in class is here.
- Sept 29: Looping [slides]
- Oct 6: Lists and Strings [slides]
- Oct 13: Programming Practice
- Oct 21 Wednesday class: Binary numbers [slides]
- Oct 27: Mid-class review [slides]
- Square root - compute square root of a number by iterating equation.
- Nov 3: Random numbers and Files [slides]
- Nov 10: Classes and pygame part 1 [slides]
- Nov 17: Pygame part 2: Our Game!
- Dec 1: Programming in the real world [slides]
- Dec 8: ACSL contest topics [slides]
- Dec 15: Final quizzes and wrapup
- Jan 5: Dictionaries and Sets [slides]
- Jan 12: Prefix/Postfix and LISP [slides]