CBSE Class 12 Computer Science
Question 60 of 120
Review of Python Basics — Question 12
Back to all questions1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
5 1
5 2
5 3
5 4
5 5
The code features two nested for loops. The outer loop iterates over values from 1 to 5 (inclusive) and assigns each to x. The inner loop iterates from 1 to the x + 1 value and assigns each to y. The print(x, ' ', y) statement outputs x and y separated by a space during each iteration. This arrangement generates combinations of (x, y) pairs.