Computer Science, asked by shreya02jaiswal, 3 months ago

Write a program
to
print the following
pattern
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

Answers

Answered by anindyaadhikari13
6

Question:-

Write a program to print the following pattern

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

Program:-

This is written in Python.

for i in range(1,6):

for j in range(1,i+1):

print(j, end=" ")

print()

Answered by atrs7391
1

"""

Project Type: Brainly Answer

Date Created: 21-02-2021

Date Edited Last Time: ---NIL---

Question Link: https://brainly.in/question/28328121

Question: Write a python program to print the following pattern.

Output:

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

Program Created By: atrs7391

Programming Language: Python

Language version (When program created or last edited): Python 3.9.1

"""

for i in range(6):

   for j in range(1, i+1):

       print(j, end=" ")

   print()

Similar questions