added problem4.py