hasQuit = False hasLatern = False hasPen = False DRAWING_ROOM = 1 SUPPLY_ROOM = 2 NEITHER_ROOM = 3 location = DRAWING_ROOM while(hasQuit == False): while(location == DRAWING_ROOM): print("DRAWING ROOM OPTIONS") if (hasPen == True): print("(d)raw on the wall") if (hasLatern == False): print("(l)atern") print("(s)upply room") print("(q)uit") selection = input("Your selection: ") if ((selection == "q") or (selection == "Q")): hasQuit = True location = NEITHER_ROOM elif ((selection == "d") or (selection == "D")): if (hasPen == True): print("You doodle on the wall, feel better now?") else: print("You have no pen to draw with") elif ((selection == "s") or (selection == "S")): location = SUPPLY_ROOM elif ((selection == "l") or (selection == "L")): if (hasLatern == False): hasLatern = True else: print("You already have the latern") print() while(location == SUPPLY_ROOM): print("SUPPLY ROOM OPTIONS") print("(d)rawing room") if (hasLatern == True): print("(p)en") print("(q)uit") selection = input("Your selection: ") if ((selection == "q") or (selection == "Q")): hasQuit = True location = NEITHER_ROOM elif ((selection == "d") or (selection == "D")): location = DRAWING_ROOM elif ((selection == "p") or (selection == "P")): if (hasPen == False): hasPen = True else: print("You pick up another pen") print() print("Has quit value=", hasQuit)