Lecture Slides
The slides from lecture are provided as .pdf files,
convenient for printing.
Some of them are accompanied by the example Python programs we
write in class.
To put the example Python programs onto your computer
(at least in Windows), right-click on the link for the program
and select "Save target as.." or "Save as..".
-
Fri 9/25 slides. Read pages 1-11 in the textbook.
If you get to page 14, there is a typo: "raw input()" should be "raw_input()".
-
Mon 9/28 slides. Read pages 18-35 in the textbook.
-
Wds 9/30 slides. Read pages 35-37 and 40-50 in the textbook.
formLetter.py
-
Fri 10/2 slides. Read pages 51-61 in the textbook.
nickname.py
-
Mon 10/5 slides. Read pages 79-81 and 43-45.
bmi.py
-
Wds 10/7 slides. Read pages 65-72.
eir.py
-
Fri 10/9 slides.
guessWeight.py. This program will not
run properly unless it is in the same folder as the file
conversionCheck.py, which contains the
functions to check if a string can be safely converted to an integer or
float.
-
Mon 10/12 slides. Rock, paper, scissors.
rps.py
-
Wds 10/14 slides. Review for midterm.
- Fri 10/16. Midterm 1.
-
Mon 10/19 slides. Lists and for loops. Read pages 89-106.
-
Wds 10/21 slides. Go back to 37-40 to read about string methods.
myUCbudget.py
-
Fri 10/23 slides. The range function, more for loops, using string methods.
counter.py, fossilStory.py
-
Mon 10/26 slides. Files and dictionaries.
StatePopulations.txt, readPopulations.py
-
Wds 10/28 slides. Break, continue, and
introduction to dictionaries.
statePopDictionary.py
-
Fri 10/30 slides. Dictionary of lists, strip method.
carDictionary.py,
EnergySources.csv,
energyData.py
-
Mon 11/2 slides. Concatenation on a list. Try-except construction.
findSentences.py,
dede.txt,
corzine.txt
-
Wds 11/4 slides. For loop on a dictionary.
statePopDumpDictionary.py
-
Fri 11/6 slides. Sort method, another for loop on a dictionary.
statePopFileWrite.py
-
Mon 11/9 slides. How do dictionaries actually work?
reversePhoneBook.py
-
Fri 11/13 slides. Midterm review.
-
Mon 11/16. Midterm.
-
Wds 11/18 slides. Graphics module.
ecs10graphics.py contains the module,
and pentagon.py uses it.
-
Fri 11/20 slides. Introduction to functions.
Functions in a module and functions in a program.
myConversionCheck.py, tested by
testModule.py.
-
Mon 11/23 slides. When functions are run.
Global and local variables in functions.
snowflake.py
-
Mon 11/30 slides. How to change global variables.
Avoiding two variables with the same name.
month.py
-
Wds 12/2 slides. Using objects, and making classes.
firstGui.py,snowflakeModule.py