Write program in python
1
12
123
1234
12345
Answers
PYTHON PROGRAM
Answer:
def num(a):
# initialising starting number
num = 1
# outer loop to handle number of rows
for i in range(0, a):
# re assigning num
num = 1
# inner loop to handle number of columns
# values changing acc. to outer loop
for k in range(0, i+1):
# printing number
print(num, end=" ")
# incrementing number at each column
num = num + 1
# ending line after each row
print("\r")
# Driver code
a = 5
num(a)
TO KNOW MORE ABOUT:
1.Print the sum of the series 1-12+123-1234+12345...+nhttps://brainly.in/question/12113739
2.Write a program on Python to find area of a triangle using Heron's formula. (value to be entered by user)
https://brainly.in/question/9830494
Answer
n = int(input("enter the row "))
for row in range(1,n+1):
for col in range(1,row + 1):
print(col,end = " ")
print()
Explanation: