0

Tengo esta línea de código y no me forma un triángulo print("* \n** \n*** \n****")

Cadenas

5th Feb 2022, 7:26 PM
Juan Guillermo Gallego
3 odpowiedzi
0
This is the code for a left sided right angled triangle. If you want a center aligned triangle, that has a different code
5th Feb 2022, 7:51 PM
Adi Nath Bhawani
Adi Nath Bhawani - avatar
0
Thanks
5th Feb 2022, 7:53 PM
Juan Guillermo Gallego
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()
5th Feb 2022, 7:56 PM
Adi Nath Bhawani
Adi Nath Bhawani - avatar