The user enters a number and the program should output that amount of rows and colunmns. I have tried a couple of different ways butcant quite get it even though I think I am close. for example if 10 is entered it should look something like this:
O OO OOO OOOO OOOO OOO OO O
num = 0 #user input num = int(raw_input('Give me a number up to 10: ')) for a in range(0,num +1,1): print "*" * a #make a space for the next rows that count down print for a in range(num,0,-1):print'*' * a print'done' #a different way num = 0 num = int(raw_input('What is your number: ')) for row in range(1, num + 1, 1): for column in range(1, num, 2): circleList = list() circleList.append(row) print'*'
Edited 3 Years Ago by mike_2000_17: Fixed formatting