Updated problem 4 to comply with PEP8.