Work on your own (i.e., not with other classmates).
Use only the Python expressions and statements we had described in class at the time of lab 4.
Download the starter file.
Write all your code in the file hw4.py
.
Replace (YOUR NAME)
with your name in the
comment near the top of the file.
In the section of the file marked remaining LAB 4
exercises
, include all the lab exercises that you worked on
after lab time. (You and your lab partner should have already
submitted to me a version of your lab that you worked on during lab. The
homework portion of the lab represents your work on the remaining lab
exercises.)
Solve as many of the additional homework problems (spelled out
for you in hw4.py
) as you can.
(Slightly different from previous homework): Choose two of the exercises from lab 4, #4, #10, or #12 and A-D of the additional problems that you wish to focus my attention on.
Test your work as you go!
Before submitting, fill out the remainder of the ...
comments near the top of the file according to what is
requested.
Replace ... status ...
with a brief comment as to
how much of the assignment you completed. (For example, “I completed all
of the assigned problems and I am confident they work correctly.” or “I
struggled on many of the problems and have left 6, D and F blank. There
is an error in C so I commented it out.”)
Submit your work by uploading your hw4.py
file via
MySLC
(Submit only your hw4.py
file - and make sure it
is named hw4.py
. Do not submit an entire folder.)
As with lab4, there is a runnable
solution module called hw4x.py
.
You can use it to see the result of executing the solution version of
any of the hw4
problems. To use it, place
hw4x.py
in the same folder as the other file(s) you are
working with, then in the IDLE shell, you can import hw4x
and access the solution versions in the IDLE shell as follows:
>>> import hw4x
>>> hw4x.has_in_range('whatever', 't', 4, 7)
False