Python

Fix the TypeError

TypeError

A TypeError occurs when an operation is applied to an inappropriate type.

Your Task

This code has a TypeError. Fix it so the function correctly calculates the total.

script.py
Loading PYTHON engine...
Downloading Python… (one-time, ~10 MB)

Downloading Python… (one-time, ~10 MB)

This runs entirely in your browser and is cached for next time.