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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!