Programs
Campus & Labs
Admissions
Student Success
About
+91 89033 90051
|
+91 93637 93954
Apply Now
☰
Practice
/
DebugZone
/
Fix Total Calculation
Debug Drill
+60 XP
Fix Total Calculation
⚡ PYTHON EDITOR
▶ Run Tests
# BUGGY CODE: Identify and correct the logic flaw below def calculate_total(cart_items, tax_rate=0.08): total = 0 for item in cart_items: # BUG: Missing quantity multiplier and wrong rounding total += item['price'] return round(total * (1 + tax_rate), 2)
🖥️ TEST RUNNER & CONSOLE OUTPUT
Run your code to see test results...