Add comments to all the methods, to make it easier for someone else to read the function.

Note: By “all” methods, this question refers to all the adventure game methods of Chapter 10 not yet commented. These being: playGame (Program 133), showEntryway, showKitchen, showKitchen, showLR, showDR, and showIntroduction. Comments should explain sections of the code in simple English. An example for playGame is below.


```
def playGame ():
#The initial location of the player
location = "Porch"
showIntroduction() #Shows the intro text
#Continue to run the game until the exit is reached
#Each loop the current room is shown, a direction is requested,
#and a new location is determined based on the direction
while not (location == "Exit") :
showRoom(location)
direction = requestString("Which direction?")
printNow("You typed: "+direction)
location = pickRoom(direction, location)
```

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1. Given the two C++ array declarations: ``` int a[10], b[10]; ``` You can successfully compute one array, say a, then assign b to a: ``` a = b; ``` 2. In the sequential search algorithm, items are examined alternately, odd then evens, in order to find whether the target value is in the array (and if the target is present, to the index of the target.) 3. In a sorting an array, the items in the array are rearranged so that ``` for all j and k, if j < k, then array[j]<=array[k] ``` 4. In the definition, ``` double d[10] = {0.0}; ``` only ``` d[0] ```is initialized to zero,the rest are uninitialized, just like x in the definition``` double x; ```

Computer Science & Information Technology

Which of the following is true about recovery objectives?

A. they should be the same for each database B. the RTO is usually the same whether the recovery scenario involves one or many databases C. the RTO is the maximum amount of data that may be lost D. the recovery point objective is expressed as a time frame

Computer Science & Information Technology

Which of the following is NOT a common LAN topology?

A) Star B) Bus C) Hierarchical D) Ring

Computer Science & Information Technology

Draw a decision tree depicting the reimbursement policy below:

``` DO WHILE there are claims remaining. IF a local trip Pay 45 cents a mile THEN IF a one-day trip Pay mileage and check the times of departure and return IF leave by 7:00 A.M. and return later than 10:00 A.M. THEN receive reimbursement for breakfast IF leave by 11:00 A.M. and return later than 2:00 P.M. THEN receive reimbursement for lunch IF leave by 5:00 P.M. and have dinner by 7:00 P.M. THEN receive reimbursement for dinner ELSE We allow hotel, taxi, and airfare ENDIF ENDIF ENDIF Print summary for Trav Farr ENDDO ```

Computer Science & Information Technology