Files
Laboratori-PY/printTriangolo.py
2024-03-22 17:01:42 +01:00

8 lines
150 B
Python

n = int(input("Inserisci un numero: "))
for i in range(1, n + 1, 2):
spaces = n - i
smez = int(spaces/2)
print(" "*smez+"*"*i+" "*smez)