Your Task

When I was school, PE teachers often allocated us to teams by standing us in a line, and then moving along saying things like "1, 2, 3, 4, 1, 2, 3, 4...". Your task this week is to use your knowledge of numerical techniques to write a program that does the same thing using a list of teams and a list of people.

Your program should:

  1. contain two lists - one of people and one of teams. It doesn't matter how many items are in each list, but:
    1. there must be more than two teams
    2. there should be more people than teams
  2. allocate each person to a team such that the teams are as evenly-sized as possible
  3. display a list of the people and which team they are in