Finished Question 5

Finished Question 5, autograder updated. I'm not a fan of how Q5 is
implemented. Either we should find a way to not use while loops or at
least create a helper function seeing as the while loops are the same