← Back to Dictionaries
Question 289
Lookup With A Message
Lookup With A Message
The dict book maps names to phone numbers. Read one name from the input (one line, no prompt). Use in to check the key first: when the name is in the book print <name>: <number>, otherwise print <name> is not in the book. Input: one line. Output: one line either way, the name repeated as typed.
Expected Output:
Lin: 555-0142= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Dictionaries
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.