Python multiplication table
Write code that will output a multiplication table for 10 positive numbers across the columns and 10 positive integers down the rows. Prompt the user for the initial values for the columns and rows. row = int(raw_input("Enter the first row number: " )) col = int(raw_input("Enter the frist column number: ")) lastRow = row + 10 lastCol = col + 10 while (row < lastRow): print "%4d" % (col * row) while(col < lastCol): print "%4d" % (col * row), col += 1 print "%4d" % (col * row) row += 1 My effort followed some explanation from this video (https://www.scaler.com/topics/multiplication-table-in-JUMP_LINK__&&__python__&&__JUMP_LINK/) I saw, which doesn't print how Id expect it. What am I supposed to call the print statements, and what is wrong with the iterations? Here's a second attempt, which is better but not what I expected. row = int(raw_input("Enter the first row number: " )) col = int(raw_input("Enter the frist column number: ")) lastRow = row + 10 lastCol = col + 10 x=row y=col while (x < lastRow): while(y < lastCol): y += 1 print "%4d" % (y * x) x += 1 Sorry for the repeated post; I had no idea it was poor etiquette.