This Python program reads an integer n between 1 and 80 from the user and prints a square of asterisks (*) of size n × n.
For example, if n = 5, the output will be a 5-row, 5-column grid of stars.
# Read n from user
n = int(input("Enter a number between 1 and 80: "))
# Validate input
if 1 <= n <= 80:
for i in range(n):
print('* ' * n)
else:
print("The number must be between 1 and 80.")
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
- The user inputs a number n
- The program checks that n is between 1 and 80
- A for loop runs n times to print n rows
- Each row prints '* ' repeated n times