Food for thought question?

There are only four teams. We are not told how many people there are, only that we are number 27.

27 % 4  ==  3

Player number 27 is on team 3. End of story.

i get your line of thought where the counting should be 1 to 6 then teams are created in line with numbers. thats fine. what if that was not the case and the teams were needed to have the same number of people?

The key is that there are four teams, numbered 0 thru 3. Whichever is the smallest team will dictate the size of the others. We should not be speculating or reading information in this problem that is not stated. Our only task is to determine which team will play number 27 be on?

Thank you for the clarification. We should never think of any other information that is not otherwise given to us.

1 Like

Yeah, excelent and elegant code!
And reading the Syntax material this could be:

person = 0

while(person < 28):
person += 1
print("Person ", str(person), "= Team ", str(person % 4))