completed question2.py
add Test sets for question 2