You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
#Ligne
|
|
def ligne(longueur: int):
|
|
for loop in range(longueur):
|
|
print("X", end="")
|
|
print()
|
|
|
|
#Rectangle
|
|
def rectangle(lignes: int, colonnes: int):
|
|
for ligne in range(lignes):
|
|
if ligne > 0 and ligne < lignes - 1:
|
|
print("#", end="")
|
|
for colonne in range(colonnes - 2):
|
|
print(" ", end="")
|
|
print("#", end="")
|
|
else:
|
|
for colonne in range(colonnes):
|
|
print("#", end="")
|
|
print()
|
|
|
|
#Triangle
|
|
def triangle(lignes):
|
|
print("@")
|
|
print("@@")
|
|
espace = 0
|
|
for ligne in range(2,lignes):
|
|
if ligne < lignes - 1:
|
|
print("@",end="")
|
|
espace +=1
|
|
for loop in range(espace):
|
|
print(" ",end="")
|
|
|
|
print("@")
|
|
else:
|
|
for loop in range(lignes):
|
|
print("@",end="")
|
|
print()
|
|
|
|
ligneNbLignes = int(input())
|
|
rectangleNbLignes = int(input())
|
|
rectangleNbColonnes = int(input())
|
|
triangleNbLignes = int(input())
|
|
ligne(ligneNbLignes)
|
|
print()
|
|
rectangle(rectangleNbLignes, rectangleNbColonnes)
|
|
print()
|
|
triangle(triangleNbLignes)
|