hw29

complete & texted (albeit with a limited number of test cases, but it
is time for other homework)