Computer Science, asked by smartboy4155, 6 months ago

Write a Python program to print the following pattern.​

Attachments:

Answers

Answered by Anonymous
2

Required python program:

Using nested loop :

row = 5

for i in range (0,row):

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

print("*",end ="")

print ()

Using single loop :

row = 5

for i in range (row+1):

‎ ‎ ‎print( "*" * i)

Output :

*

* *

* * *

* * * *

* * * * *

* * * * * *

Similar questions