Practice programming solutions for Test 2