#๐ Another kinda simple question lol
19 messages ยท Page 1 of 1 (latest)
@brisk light
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
so far i have:
if row in enumerate(pattern_2d):
pattern_2d[m][n]
sum = (m + n + 3)
which outputs:
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
e!
!e
code
!e if row in enumerate(pattern_2d):
pattern_2d[m][n]
sum = (m + n + 3)
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | if row in enumerate(pattern_2d):
004 | ^^^
005 | NameError: name 'row' is not defined. Did you mean: 'pow'?
!e grid_size = int(input())
pattern_2d = []
for m in range(grid_size):
row = []
for n in range(grid_size):
row.append(0)
pattern_2d.append(row)
if row in enumerate(pattern_2d):
pattern_2d[m][n]
sum = (m + n + 3)
for row in pattern_2d:
for cell in row:
print(cell, end=' ')
print()
:x: Your 3.12 eval job has completed with return code 1.
:warning: Note: input is not supported by the bot :warning:
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | grid_size = int(input())
004 | ^^^^^^^
005 | EOFError: EOF when reading a line
i have figured it out
Another kinda simple question lol, uf someone can help me understand this better then the site does
so for m in range(grid_size):
for n in range(grid_size):
pattern_2d[m][n] = (m + n + 3) was correct. i still dont understand why though
@brisk light
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
๐ Another kinda simple question lol, uf someone can help me understand this better then the site doe
@brisk light
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.