(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

I'm having and issue with this problem, and I don't understand what I'm doing wrong, I really want to understand the material

Write code that will print a multiplication table for 10 positive integers across the columns and 10 positive integers down the rows. Prompt the user for the starting values for both the columns and the rows.

3. The attempt at a solution

I believe my iterations are correct but I don't get the desired print out in grid format, I am unsure as to what the order of the statements should beCode (Text):

row = int(raw_input("Enter the first row number: " ))

col = int(raw_input("Enter the first 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

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Python multiplication table and user input

**Physics Forums | Science Articles, Homework Help, Discussion**