Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q1: So, for a 2D- list using the following piece of code as an

example and solve.

for i in range(0,4):

for j in range(0,6):

# what to write here


Solve the loops on a piece of paper, with each iteration draw a table as discussed in
class.

a)

b)
c)

Rows = 3
cols = 4

matrix[]

For i in range (rows)


Row[]
For j in range (cols)
row.append(xyz)
—-
matrix.append(row)

You might also like