Program Assignment 2 (lexical scoping) for rprog007 class