their clue about zophie the cat is true or not will you find zophie the cat in time and accuse the guilty party """ input('press enter to begin ' starttime time time( endtime starttime time_to_solve while truemain game loop if time time(endtime or accusationsleft = handle "game overcondition if time time(endtime print('you have run out of time!' elif accusationsleft = print('you have accused too many innocent people!' culpritindex suspects index(culprit print('it was {at the {with the {who catnapped her!format(culpritplaces[culpritindex]items[culpritindex]) print('better luck next timedetective ' sys exit( print( minutesleft int(endtime time time()/ secondsleft int(endtime time time() print('time left{min{secformat(minutesleftsecondsleft) if currentlocation ='taxi' print(you are in your taxi where do you want to go?' for place in sorted(places) placeinfo ' if place in visitedplaces placeinfo visitedplaces[place namelabel '(place[ ')place[ : spacing (longest_place_name_length len(place) print('{{}{}format(namelabelspacingplaceinfo) print('( )uit game' while truekeep asking until valid response is given response input(''upper( if response ='' continue ask again if response =' ' print('thanks for playing!' sys exit( if response in place_first_letters keys() break currentlocation place_first_letters[response continue go back to the start of the main game loop at placeplayer can ask for clues print(you are at the {format(currentlocation) currentlocationindex places index(currentlocation thepersonhere suspects[currentlocationindex theitemhere items[currentlocationindexj'accuse