411,862 views
44 votes
44 votes
9.6 Code practice Edhesive

9.6 Code practice Edhesive-example-1
User Sourav Das
by
2.8k points

1 Answer

15 votes
15 votes

Answer:

N = [1,1,1,1,1],

[2,2,2,2,2],

[3,3,3,3,3],

[4,4,4,4,4]

def printIt(ar):

for row in range(len(ar)):

for col in range(len(ar[0])):

print(ar[row][col], end=" ")

print("")

N=[]

for r in range(4):

N.append([])

for r in range(len(N)):

value=1

for c in range(5):

N[r].append(value)

value=value + 1

printIt(N)

print("")

newValue=1

for r in range (len(N)):

for c in range(len(N[0])):

N[r][c] = newValue

newValue = newValue + 1

printIt(N)

Step-by-step explanation:

I got 100%.

User Amos Batto
by
3.1k points