i am trying to get this pattern:
input=3
pattern:
1 2 3
1 2 *
1 * * *
a=int(input())
for j in range(a):
for i in range(a-j) :
print(i+1 , end=" ")
for i in range(2*j-1):
print("* " , end="\n")
i am trying to get this pattern:
input=3
pattern:
1 2 3
1 2 *
1 * * *
a=int(input())
for j in range(a):
for i in range(a-j) :
print(i+1 , end=" ")
for i in range(2*j-1):
print("* " , end="\n")
Hi @amangupta
I advise you not to use tab; use spaces for indentation
please refer the following code :
Hope this might helps
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.