Write a program that uses loops to generate table where each cell equals the number in the column divided by the number in the row. The maximum column and row numbers are specified by the user. The following table results when the user specifies 3 as the maximum column and 2 as the maximum row.

| 0 1 2 3 4
----+-------------------------------
0 | Error Error Error Error Error
1 | 0 1 2 3 4
2 | 0 0.5 1 1.5 2
3 | 0 0.33 0.66 1 1.33

I would suggest a nested for loop like:

for row in xrange( usr_row ):
    for col in xrange( usr_col ):
        ## Do my division and printing
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.