Write invoice(items) where each item is a dict with price and qty. Return {"subtotal": …, "gst": …, "total": …} with GST at 18% of the subtotal, both GST and total rounded to 2 decimals.
invoice([{'price': 100, 'qty': 2}, {'price': 50, 'qty': 1}])
→ {'subtotal': 250, 'gst': 45, 'total': 295}Submit runs 3 tests, including hidden edge cases.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.