Hollow square program

siimnurges at gmail.com siimnurges at gmail.com
Wed Dec 12 17:48:01 CET 2012


Hey, I need to write a program that prints out a square, which is empty on the inside. So far, I've made a program that outputs a square, which is full on the inside.
P.S. Between every asterisk there needs to be a space(" ")
Here's my code:

print("Rows: ")
rows = int(input())
for i in range(rows):
    for j in range(rows):
        print("* ", end="")
    print("")



More information about the Python-list mailing list