Any hints towards sorting my problem would be much appreciated. however I do not want an exact answer or code to sort the problem as I must be able to do this myself.
The first for loop was written by my teacher, so any explanations on how I could use that code again for my own for loop would be a great help as well.
Thanks in advance.