Practice · 3 of 3
Basket Totals
CHALLENGE
Difficulty: intermediate+25 XP
Create a class Basket that starts empty, add(item, price) appends items, and total() returns the sum of prices. add returns the new item count.
Press Submit to check your solution.
Back to lesson: Practice: Class Fundamentals