1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| chaine = int(input("Combien de lignes voulez vous"))
forma = int(input("Quel format ? 1/2/3 ?"))
etoile = "*"
espace = 1
if(forma == 1):
for i in range (chaine):
print (etoile)
etoile = etoile + "*"
if(forma == 2):
for i in range (chaine):
etoile = etoile + "*"
for i in range(chaine):
etoile = etoile[:-1]
print(etoile)
if(forma == 3):
for i in range (chaine):
while(espace <= chaine):
print (" " * (chaine-espace) + etoile * (espace * 2 - 1) + " " * (chaine-espace))
espace = espace + 1 |