for i in range(0,3) :
for j in range(0,3) :
print(a[i][j]+b[i][j], end="")
You are creating an expression that represents matrix addition using a double list.
If you do it like I did, it looks like 246810121416168
For when you go around a cycle of a door, print out only 3 numbers.
I want to know how to change the line, so please. I beg you.
python
I understood that you wanted to print out a 3 x 3 array. Then you can print it out like this.
If you give "
to the end, you won't change the line, so I made you change the line after printing three.
for i in range(0,3) :
for j in range(0,3) :
if j == 2:
seperator="\n"
else:
seperator=""
print("{}{} ".format(i,j), end=seperator)
You can write it a little simpler if you print a line that floats after running one line in the first for statement.
a = [[1,2,3],[1,2,3],[1,2,3]]
b = [[1,2,3],[1,2,3],[1,2,3]]
for i in range(0,3) :
for j in range(0,3) :
print(a[i][j]+b[i][j], end="")
print(end='\n')
564 Uncaught (inpromise) Error on Electron: An object could not be cloned
563 PHP ssh2_scp_send fails to send files as intended
557 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
803 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.