Quiz

Fair Rules, Clear Feedback

A game feels fair when the same command always does the same thing, and players can tell what happened and why.

This helper tries to be extra friendly. Instead of a list of exact words, it only looks at the first letter of whatever the player types.

SHORT = {"n": "north", "s": "south",
         "e": "east", "w": "west"}

def understand(text):
    first = text.strip().lower()[:1]
    return SHORT.get(first)

print(understand("search"))

A player types `search` to look for treasure. What does `understand` return?