The code snippets have been added in pdf format