Battleship!

 

Battleship is a one-player version of the classic board game in which there will be a single ship hidden in a random location on a 5×5 grid. The user (us ) will have 10 guesses to try to sink the ship. To build this game we will use our knowledge of lists, conditionals and functions in Python. starting from building our lists, to then adding conditional statements to ensure that the program executes and sink the ship at the end.

 

screen-shot-2016-12-18-at-5-31-44-pm screen-shot-2016-12-18-at-5-31-54-pm screen-shot-2016-12-18-at-5-32-03-pm screen-shot-2016-12-18-at-5-32-12-pm screen-shot-2016-12-18-at-5-32-19-pm screen-shot-2016-12-18-at-5-32-28-pm screen-shot-2016-12-18-at-5-33-00-pm screen-shot-2016-12-18-at-5-33-09-pm screen-shot-2016-12-18-at-5-33-09-pm screen-shot-2016-12-18-at-5-33-19-pm screen-shot-2016-12-18-at-5-33-28-pm screen-shot-2016-12-18-at-5-33-28-pm screen-shot-2016-12-18-at-5-33-36-pm screen-shot-2016-12-18-at-5-33-36-pm screen-shot-2016-12-18-at-5-33-45-pm screen-shot-2016-12-18-at-5-33-52-pm screen-shot-2016-12-18-at-5-34-02-pm screen-shot-2016-12-18-at-5-34-11-pm