problem 1c.py