[Tutor] Program xy.py

Ethan Rosenberg ethanrosenberg414 at gmail.com
Fri Dec 22 06:49:22 EST 2023


Thank you for the excellent help you give to python programmers.

This program should put i*j  in a 2x2 matrix.  It does not.

#xy.py
#Program to put i*j [indexes] in a 2x2 matrix

mat=[][]
for i =0:
    for j in range(0,1):
        mat[0][j] = i*j
for j=0:
    for i in range(0,1):
        mat[i][0] = i*j

print(mat)

Thank you in advance.

Ethan Rosenberg


More information about the Tutor mailing list