Hi All,
I am doing a little coding challenge thing for work and I was wondering if anyone knew the answer to this.
I want to display a 12x12 grid which I have done, the issue is that it displays fine on Jupyter but not on Pycharm. I do not know what work are using to mark the code but I wanted to see if this is something I need to change in my code to make it universal or its a pycharm thing. Have to use standard python, no external libraries.
The above displays in Jupyter fine i.e [] 12 across x 12 down
In Pycharm it shows like:
[]
[]
[]
[]
edit: Tried on an online python compiler too and it displayed per Pycharm.
I am doing a little coding challenge thing for work and I was wondering if anyone knew the answer to this.
I want to display a 12x12 grid which I have done, the issue is that it displays fine on Jupyter but not on Pycharm. I do not know what work are using to mark the code but I wanted to see if this is something I need to change in my code to make it universal or its a pycharm thing. Have to use standard python, no external libraries.
Python:
grid_size = 12
# Create a 2-dimensional list filled with square brackets
grid = [["[ ]" for x in range(grid_size)] for y in range(grid_size)]
# Display the grid using ASCII characters
for row in grid:
print(" ".join(row))
The above displays in Jupyter fine i.e [] 12 across x 12 down
In Pycharm it shows like:
[]
[]
[]
[]
edit: Tried on an online python compiler too and it displayed per Pycharm.
Last edited: