Question: A function like pickRoom is hard to read with all the nested if statements. It can be made clearer with appropriate use of comments to
A function like pickRoom is hard to read with all the nested if statements. It can be made clearer with appropriate use of comments to explain what each section of the code is doing—checking the room, then checking the possible directions in the room. Add comments to pickRoom to make it easier to read.
Step by Step Solution
3.34 Rating (163 Votes )
There are 3 Steps involved in it
def pickRoomdirection room This code handles the command that quits the game if direction quit or di... View full answer
Get step-by-step solutions from verified subject matter experts
