Question: def has _ ship [ fleet grid: list [ 1 ist [ str ] ] , fow _ start: int, col _ start: int, ship
def hasshipfleet grid: lististstr fowstart: int, colstart: int,
shipsyntol: str shipsizer int bool:
wauneturn True if and only if a ship that uses shipsymbol as its thip
symool and has length shipsize appears in fleet onid starting at
position row start, colstart where roustart, colstart is the
topmostluftmost correr of the ship.
If the ship has shipsize or more and appears as both a colum and a row,
return False.
Preconditions:
rid
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
