Fixed student's version of sim.py.

- Now is interfaced via a function call rather than CLI.
- Returns a dict instead of printing out.
- Added license.