Homework
for the python tutorial, Chapter 2
60
points
Work
through the
following sections of Chapter 2 in the Hands-on Python Tutorial.
- Object
Orientation 2.1.1
- <intervening
sections optional>
- Appending
to a List 2.2.1
- <intervening
sections optional>
- Graphics,
2.4, except for 2.4.3 (.pyw), 2.4.4 (events), and
2.4.9 (Entry objects), which are optional
- Files,
2.5
Remember
you can check
for methods in Zelle's and my extra graphics documentation.
Here
is the list of
files you need make sure are included when you turn in your Chapter 2
work. If
you saved this work under some other name, please rename as I
specify below.
- underscores.py
(Exercise 2.1.6.1) (4 points)
- acronym.py
(Exercise 2.1.6.2) (4 points)
- locations.py
(Exercise 2.3.3.1) (4 points)
- You
may
SKIP scene.py (Exercise 2.4.5.1); however, you will need to
know how to create a scene for the next exercise.
- changeScene.py
(Exercise 2.4.5.2) (6 points)
- backAndForth4.py
(Exercise 2.4.8.1) (6 points)
- faces.py
(Exercise 2.4.8.2) (7 points)
- move2Faces.py
(Exercise 2.4.8.3) (7 points)
- ranges.py
(Exercise 2.4.12.1) (6 points)
- An
Extra Credit Problem:
texttriangle.py (Exercise 2.4.12.2) (3 points)
- fileUpper.py,
copyFileUpper.py (Exercise 2.5.2.1b,c) (5 points each) (You do not
need to turn in printUpper.py from part a, though that is a
good initial program to write.)
- madlib3.py,
myMadlib.txt (Exercise 2.5.2.2) This exercise uses code
from the sections we skipped, but you only need to use the tellStory
code, not modify it. You just need to change the very bottom
of the code where tellStory is called, so you pass in the the format
string taken from the requested file. Then tellStory finds the
cue strings without you needing to explicitly list them separately
as in the original version. (6 points with both files)
Submission
is the same as for Homework #1.