Given the following four patterns,
Pattern A   

Loading

Practice for loop Questions – 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()

What will be displayed by the following code?

Loading

Practice Polymorphism Questions – What will be displayed by the following code?
class A:
    def __str__(self):
        return“A”
class B(A):
    def __init__(self):
        super().__init__()
class C(B):
    def __init__(self):
        super().__init__()
def main():
    b = B()
    a = A()
    c = C()
    print(a, b, c)
main()

What will be displayed by the following code?

Loading

Practice Polymorphism Questions – What will be displayed by the following code?
class A:
    def __str__(self):
        return“A”
class B(A):
    def __init__(self):
        super().__init__()
class C(B):
    def __init__(self):
        super().__init__()
def main():
    b = B()
    a = A()
    c = C()
    print(a, b, c)
main()