Computer Science, asked by samuelhembrom32, 2 months ago

Write a program that will accept the number of Rows from the user to print pattern

Answers

Answered by Anonymous
2

Explanation:

Code -

rows = int(input("Enter the number of rows: "))

# Outer loop will print number of rows.

for i in range(rows+1):

# Inner loop will print the value of i after each iteration.

for j in range(i):

print(i, end=" ") # print number.

# line after each row to display pattern correctly.

print(" ")

Similar questions