write a program to show the program.....
plz do it...
Answers
Num=int(input("Enter the max. lines : ")) # This will collected the number of rows needed to make the patten.
num=Num+1 # I did this so that we don't need to add one with the old variable always.
for i in range(1,num):
for j in range(1,num-i):
print(end=" ") # This will print the spaces before the numbers in one line.
for k in range(0,i):
print(i,end=" ") # This will print the numbers in the pattern in one line.
print()
Answer:
I don't know much you liked the previous answer of your question from Math Aryabhatta but now I will do this same program in Python using only one loop...I hope you will like this and if you like this then definitely hit the BRAINLIEST answer icon....
Your Code In Python:-
n=int (input ("Enter number of lines:")
for i in range (1,n+1):print((n-i)*" ", i*(str (i)+" "))
Explanation:
I hope it helps you