Already Sinking Ship


#1

I know that this is not right, per the instructions which tell you to use .append.
However, in the output window this code DOES work.

So I guess, other than not using the commands instructed, is this NOT correct because the base you're starting with won't work later on when you develop the code further?

I think I'm trying to find my mistake, per say, so that I can figure out the syntax for the .append, because that's where I'm lacking.


board = []

for x in range(0, 5):
    print ["O"] * 5


#2

yea, the output will look correct, but you don't store the output anywhere. Which is going to be a problem later. Append will append items to a list (which means you store them), print will just show them and not store them

So, then later if you want to place a ship on your board, and you don't have a stored board, this is going to be very difficult


#3

Thank you, I just wanted to verify that my train of thought was on the right track.