← Back to Dictionaries
Question 271
Menu Price Times Quantity
Menu Price Times Quantity
The dict menu holds the price of each item. Read an item name, then a quantity as a whole number (two lines, no prompts; the item is always on the menu). Print the cost in the form Total: <value> with two decimals, where the cost is the item's price times the quantity. Input: two lines. Output: one line.
Expected Output:
Total: 7.00= newline. The output ends with a newline — print one after the last line.
Hints2 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.