Computer Science, asked by Rajeshwari31, 6 months ago

write a program in python to print the pattern.​

Attachments:

Answers

Answered by Anonymous
41

Required program:

Method 1:

rows = 5

for i in range(0, rows):

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

print("*", end=' ')

print("\r")

Method 2:

rows = 5

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

print("* " * j)

Output:

*

* *

* * *

* * * *

* * * * *

Similar questions