0
Tengo esta línea de código y no me forma un triángulo print("* \n** \n*** \n****")
Cadenas
3 ответов
0
This is the code for a left sided right angled triangle.
If you want a center aligned triangle, that has a different code
0
Thanks
0
n=int(input())
for i in range(n):
for j in range(n-i-1):
print(" ",end="")
for j in range(2*i+1):
print("*",end="")
print()