Question: write a program to play a game called Frigate, which is a one-sided battleship game in which the computer hides the ships and the player
write a program to play a game called Frigate, which is a one-sided battleship game in which the computer hides the ships and the player must destroy them before they run out of ammunition (the player has a limited number of shells per game).
Step by Step Solution
There are 3 Steps involved in it
python import random def creategridrows cols Creates a grid with empty spaces to represent the ocean grid for in rangerows gridappend cols return grid def placeshipsgrid ships Randomly places ships on ... View full answer
Get step-by-step solutions from verified subject matter experts
