Categorized same code to function - I

displayPath()