Create ps4a.py

Solution to Problem Set 4(a)