How could one short program print a label for every seat at a GAA match?
At a GAA match, the first seat label is row one, seat one. The next is row one, seat two. How could your program label every seat, moving to the next row and starting again at seat one?
You already know how a counter changes in a loop. Here, the loop does the counting for you. In Python, range from one to four stops before four, so the print line runs once for seat one, once for seat two and once for seat three.
Watch the seat numbers in row one: one, two, three. Only when that row is finished do you move to row two. You start at seat one again, then visit seat two and seat three. Each row gets a full run through the seats.
You've just printed row one, seat three. That's the last seat in row one, and there's one more row to go. Which label should the program print next? Pick one.
In pseudocode, put a row loop around the seat loop. The outer loop visits rows one and two. For each row, the inner loop visits seats one to three. For each seat, join the letters and numbers into one label, then print it.
Start with zero labels. For row one, print seats one, two and three. That adds three labels. Switch to row two and start at seat one again. Print seats one, two and three for this row. That's three more labels, so the print line runs six times.
Now the block has three rows with four seats in each row. The program still prints one label each time it visits a seat. How many times does the print line run? Pick your answer.
You might see two rows and three seats per row and add them to get five. But the row loop doesn't print a label on its own. It triggers a full set of three prints. With two sets of three, you get six.
The function takes the row count and seats per row. The outer loop picks a row, the inner loop visits its seats, and print uses both numbers. The call supplies two rows of three. State the output, with one label per line. Then run the code to check your trace.