Question: Write a function called place _ ghosts that accepts 2 arguments. The first argument called board is a list of lists. The second argument called
Write a function called placeghosts that accepts arguments. The first argument called board is a list of lists. The second argument called ghosts is a list of string objects.The board contains a player represented by the string and a melon represented by the string M at random locations. All other locations in the board are empty and are filled in with The function places each ghost in the ghosts list at random empty locations in the board. After placing all the ghosts, the function returns a list ofTime left ::each tuple is the location ie the row col pair where a ghost has been placed.In addition to the placelghosts function the program also has a main function. The main function calls the place ghosts function with the required arguments. Assume themain function already exists and looks like thisdef main :board LLO, PIMghosts UGGGghoststocations placeghest board, ahostprint Board: boardprint Ghosts Locations : ghostsFFoMtFonMmain When the program is executed, something similar to the following output is displayed:Board: lGPG UMGGhosts Locations: Complete the placeghosts function by dragging and dropping the answers in the blanks to make it work as desired
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
