completed prob74.py