Numbered Price List
Python
25 pts
Numbered Price List
A café in Asmara has two lists in the same order: items and prices. Use for i in range(len(items)): to print a numbered menu, and add each price to total. Then print the total.
The numbers on the menu start at 1, not 0 (use i + 1). Expected output:
1. tea - 10 Nakfa 2. coffee - 15 Nakfa 3. bread - 8 Nakfa 4. juice - 25 Nakfa Total: 58 Nakfa
Checklist
- Keep
itemsandpricesunchanged. - Loop with
range(len(items)), print each numbered menu line (starting at 1) and add each price tototal. - After the loop, print
Total: 58 Nakfa.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
