Python Program:

- To print half triangle pattern using number

Example:

User Input: 3

Output:

1
1 2
1 2 3
rows=int(input("Enter number of rows : "))
for i in range(1,rows+1):
  for j in range(1,i+1):
    print(j,end=" ")
  print("")

Output:

  Enter number of rows : 4
  1
  1 2
  1 2 3
  1 2 3 4
Program
pattern

Main logic :

for i in range(1,rows+1): #rows : number of rows to print
  for j in range(1,i+1):
    print(j,end=" ")
  print("")
Concept

Coming Soon !

Quick
Tutorial

Quote

A good decision is based on knowledge and not on numbers.