feat: Initial commit
This commit is contained in:
18
Laboratorio4/forme.py
Normal file
18
Laboratorio4/forme.py
Normal file
@@ -0,0 +1,18 @@
|
||||
n = int(input("Inserisci n: "))
|
||||
|
||||
for x in range(n):
|
||||
print("*"*n)
|
||||
|
||||
print()
|
||||
|
||||
d = 2*n
|
||||
for x in range(0, d-1):
|
||||
a = 1 + x*2
|
||||
|
||||
if a > d - 1:
|
||||
a = d - 1 - (x - n + 1)*2
|
||||
|
||||
b = (d - 1 - a)
|
||||
c = int(b/2)
|
||||
|
||||
print(" "*c + "*"*a + " "*c)
|
||||
Reference in New Issue
Block a user