Homework
for the python tutorial, Chapter 3
35 points for the first part and 35 points for
the
second part
Work through Chapter 3 of the Hands-on
Python
Tutorial.
Optional
sections:
- 3.1.4.3
strangeFunction exercise
- the
part of 3.3.4 beyond the example bounceWhile.py, so bounce2.py
and bounce3.py are optional.
- 3.3.5,
on example bounce4.py
- 3.4,
on all types being treated as Boolean
- 3.5
further study.
The homework for chapter 3 is due in two parts on two
different
dates. All the exercises in Section 3.1 are due first, and
others
later. You will see two separate assignments to submit on
Sakai. Submission instructions are the same as for Homeworks #1 and
#2.
Here is the list of files you need make sure are included. If
you
saved this work under some
other name, please rename as I specify below.
Part I (Section 3.1)
- graduate.py (Exercise 3.1.4.1) (4 points)
- headstails.py (Exercise 3.1.4.2) (4 point)
- sign.py (Exercise 3.1.5.1) (4 points)
- grade2.py (Exercise 3.1.5.2) (5 points)
- wages2.py (Exercise 3.1.5.3) (5 points)
- even1.py (Exercise 3.1.6.2) (4 points)
- even2.py (Exercise 3.1.6.3) (4 points)
- congress.py (Exercise 3.1.7.1) (5 points)
Part II (Sections 3.2 and 3.3)
- chooseButton3.py (Exercise 3.2.1.1, parts a and b) (6
points for
part a; 6 points for part b)
- Extra credit:
chooseButton4.py (Exercise 3.2.1.1, part d) (3 points extra credit)
- sumAll.py (Exercise 3.3.3.1) (6 points)
- savings.py (Exercise 3.3.3.3) (8 points)
- makePoly2.py (Exercise 3.3.4.1) (9 points)
- Extra credit:
makePath.py (Exercise 3.3.4.2) (5 points extra credit)
- Extra credit:
madLib4.py (Exercise 3.3.4.4) (depends
on the earlier Exercise 2.5.2.2 and understanding string
slices and string methods earlier skipped
in chapter 2) (5 points extra credit)
- Skip Exercise 3.3.4.5 for now -- option for later
project