Question: WRITE IN PYTHON:We now need to allow the Vacuuminator to move around the world. Write a function make _ move ( world , direction )
WRITE IN PYTHON:We now need to allow the Vacuuminator to move around the world. Write a function makemoveworld direction The direction may be one of udl or r as described on the Background slide. Your function return a list of lists representing the world after the move has been made.
Note that a move may not be possible either because:
It would take the Vacuuminator off the edge of the world
It would take the Vacuuminator into a wall
If an impossible move is requested, the Vacuuminator should not attempt to make it and should instead return the current state of the world.
Example Calls
makemoveEWEXl
EWXE
makemoveEWEXr
EWEX
makemoveEWEXu
EWEX
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
