Battleships!

Objective:

In this assignment, we learned how to step by step create a battleship game with the use of python in Code Academy! While also applying the lists and function rules.

Lists: is a sequential collection of Python data values, where each value is identified by an index. The values that make up a list are called the elements (or items) of that list. The elements in a list can be any type of Python data

Here are some of the steps towards creating this game:

capture

“Hit or Miss?” #10. You win!

capture2

“Hit or Miss?” #11. Danger, will Robinson!!

capture3

“Hit or Miss” #12. Bad Aim

capture4

“Hit or Miss” #13. Not Again!

capture5

“Hit or Miss” #14. Test Run

capture6

“You Sunk My Battleship!” #15. Play It, Sam

capture7

“You Sunk My Battleship” #16. Game Over

capture8

“You Sunk My Battleship” #17. A Real Win

capture9

“You Sunk My Battleship” #18. To Your Battle Stations!

capture10

“You Sunk My Battleship” #19. Extra Credit

Overall Experience:

When creating this game, one of the hardest problem that I had encounter was in “A Real Win”. I had to add a break under the win condition to end the loop, as it was assigned into the for loop. But for some reason when I wrote it under the win condition I would receive an error, until it finally went through. I believe the problem was the spacing. Everything has to be aligned exactly in order for it to work.