← Back to Dictionaries
Question 294
Menu Order With A Check
Menu Order With A Check
The dict menu holds the price of each item. Read an item name and then a quantity as a whole number (two lines, no prompts). Use in to check the key first: if the item is on the menu print Total: <value> with two decimals, the price times the quantity; otherwise print No such item. Input: two lines. Output: one line either way.
Expected Output:
Total: 8.00= 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.