1
xsize = int(input('square hash dimension: '))
def square():
    i=0
    while i < xsize:
        x = '#'*xsize  
        print(x)       
        i+=1

print(square())

// trying to write a couple lines to recreate the dimensions input to make a square out of hashes, but the result when -say, 2 is input as 'xsize': (imgur link) output from code

not sure why 'none' is being added, but i am quite new to programming on the whole :P ty in advance!

georgiewot
  • 21
  • 1

0 Answers0