How should my code be indented inside of the new for loop?
To ensure that we keep all of the same functionality per turn, just with the added ability to now take 4 turns before the game ends, we need to make sure we put everything we had before inside of the
for loop we just created. The result should look like this (in pseudo code, to avoid giving the answer):
for turn in range(4): get guess_row get guess_col if guess is correct: print “Congrats! You sunk my ship.” else, not correct: if guess is invalid: print “Not in the ocean” elif already guessed: print “Already guessed!” else, just missed: print “Missed!” update element in board to be “X” print current turn print the board
Be sure to
turn + 1 like above as well!