Finished system.py. Giving correct output, checked against CSU code