Given the following four patterns,
Pattern A   

Loading

Choose the correct option.

Given the following four patterns,
Pattern A        Pattern B        Pattern C        Pattern D
1                1 2 3 4 5 6                1      1 2 3 4 5 6
1 2              1 2 3 4 5                2 1        1 2 3 4 5
1 2 3            1 2 3 4                3 2 1          1 2 3 4
1 2 3 4          1 2 3                4 3 2 1            1 2 3
1 2 3 4 5        1 2                5 4 3 2 1              1 2
1 2 3 4 5 6      1                6 5 4 3 2 1                1
Which of the pattern is produced by the following code?
for i in range(16 + 1):
    for j in range(6, 0, 1):
       print(j if j <= i else” “, end = ” “)
    print()

A. Pattern A
B. Pattern B
C. Pattern C
D. Pattern D

Leave a Comment