Magpie Activity 5

Added some pseudocode comments.