Practice · Editing I
Drill this lesson at your own pace. Practice doesn't change your review schedule.
Keys
You selected a bit too much. Shrink the selection back to the field name.
one chord, two keys
shop – cart.pygoal
cart.pyorder.pyitem.py
2 def __init__(self, items):
3 self.items = items
4
5 def total(self):
6 amount = 0
7 for item in self.items:
8 amount += item.price
9 return amount
8:33 (10 chars) · LF · UTF-8 · 4 spaces · Python
or press Enter