up
This commit is contained in:
parent
34618150ad
commit
6767aefa4e
23
Fonctions/formes_creuses.py
Normal file
23
Fonctions/formes_creuses.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ligne(int(input()))
|
||||||
|
rectangle(10, 20)
|
Loading…
x
Reference in New Issue
Block a user