using lists to solve the problems the pdf is the instructions and zip is the test files

Please follow the instrucitons and comment besides the codes, using the zip file to pass tests