Computer Science, asked by samarthgupta927, 28 days ago

2. Write a python program to print the following pattern*

Output:

1
1 2
1 2 3
1 2 3 4

Answers

Answered by anuragshaurya08
1

Answer:

rows = 5  

for row in range(1, rows+1):  

   for column in range(1, row + 1):  

       print(column, end=’ ‘)  

   print(“”)

I hope so that my answer is useful to you. If yes then please mark me the brainliest!!!

Answered by atrs7391
0

"""

Project Type: Brainly Answer

Date Created: 21-02-2021

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

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

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

Output:

1

1 2

1 2 3

1 2 3 4

Program Created By: atrs7391

Programming Language: Python

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

"""

for i in range(5):

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

       print(j, end=" ")

   print()

Similar questions