Computer Science, asked by BrainlySecurityIndia, 2 months ago

Write a python program to display the following pattern:
1
1*2
1*2*3
1*2*3*4
1*2*3*4*5

Answers

Answered by sravanimekala3142
2

Answer:

row = int(input())

for i in range(0, row):

c = 1

print(c, end='')

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

print('*', end='')

c = c + 1

print(c, end='')

print(' ')

Explanation:

Answered by anindyaadhikari13
3

Solution:

The given c‎ode is written in Python.

for i in range(1,6):

 print(*range(1,i+1),sep="*")

Logic:

  • Run a loop in the range i = (1 to 5).
  • Display list of numbers in the range 1 to i with '*' as separator.

See the attachment for output.

Attachments:
Similar questions