# Lezione 13 - Esercizio 2
# Scrivere un programma che legga un numero intero n e visualizzi,
# usando asterischi (*), un quadrato, il cui lato abbia lunghezza n.
# Se, ad esempio, l’utente fornisce il numero 4, il programma deve visualizzare:
# ****
# ****
# ****
# ****

n = int(input("Inserisci la lunghezza del lato: "))

for i in range(n):
    print("*" * n)
    


#     # Esercizio 04.1.3
# # Lati

# #  Display a square and a diamond with a side length supplied by the user.
# #

# # Read the side length from the user.
# side_length = int(input("Enter the side length: "))

# # Display the square
# for y in range(0, side_length):
#     print('*' * side_length)
# print()

# Display the diamond.
for y in range(1, n):
    print(" " * (n - y) + "*" * (y * 2 - 1))
for y in range(n, 0, -1):
    print(" " * (n - y) + "*" * (y * 2 - 1))
