Completed 2nd part of the second exercise for control flows and arrays