Weekly Assignment Solutions in Python along with the Sample Inputs