updated ps4.py and psuedo code for problem 4