Tuesday, 6 February 2024

Class 11 CS Practical - 07

 

7. Write a program in Python to generate the following pattern using nested loops:

11111

22222

33333

44444

55555

for i in range(1,6):

    for j in range(1,6):

        print(i,end='')

    print()

Output:

11111

22222

33333

44444

55555

No comments:

Post a Comment