Code Academy: Battleship

For this tutorial I learned how to use python to create a little battleship game. I got more practice using for loop statement because there was a for loop inside the tutorial. The for loop was used as turns for the player, like how many guesses the player can have. If the player doesn’t sink the battleship before the turn runs out, it would mean game over. I had to program different displays if the player guesses wrong or right. Everything either had to be defined first or set equal to something before it can be used in this program.

Code academy Battleship part 14 Code academy Battleship part 15 Code academy Battleship part 16 Code academy Battleship part 17 Code academy Battleship part 18