Nov-13-2017, 06:02 PM
(This post was last modified: Nov-13-2017, 06:02 PM by AceScottie.)
(Nov-13-2017, 05:43 PM)Larz60+ Wrote: ' something like ' d0esn't work in programming,
what was the actual input?
there is nothing 'something like' about it.
if the list is 10x10 elements the user (in this case me) put 10 and 10 as the variables in the command line.
it wouldnt matter if it was 10 10 or 1000 1000, the size of the lists are irrelevant,
my question is regarding changing a single element in a 2D list from a 0 to a 1
imagine this is a square of black pixels,
i want to change 1 singular pixel to white. the size of the full image would not matter the only thing that matters is the coordinates of that one singular pixel.
so my question is simple:
why does 'list[x][y] = 1' change every element in the 'y'th position to a 1 for the entire list
how do i change the singe element without changing any other element in the list.
here is the full code:
https://pastebin.com/tseM76rH