Added a simulation similar to the programming assignment for week2.