Solution for rprog-004 Programming Assignment 2 Part I: Lexical Scoping