Market Receipt
Python
25 pts
Market Receipt
Merhawi buys 4 kilos of tomatoes at 30 Nakfa per kilo. Using the given variables, create:
line— 20 equals signs, made with*receipt—"Tomatoes x 4 = 120 Nakfa", built with+andstr(). Let Python calculate120.shops— the listcitiesjoined with", "
Print line, receipt, line and shops. Expected output:
==================== Tomatoes x 4 = 120 Nakfa ==================== Asmara, Keren, Massawa
Checklist
- Keep the given values and create
line, 20 equals signs made with*. - Create
receiptwith+andstr(), letting Python calculate the total. - Create
shopsby joiningcitieswith", ". - Print
line,receipt,lineandshops.
🔑 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.
