added method for interation

This commit is contained in:
2026-02-10 18:43:12 -05:00
parent 064bb24ebe
commit 470bbb28a1

View File

@@ -1,2 +1,10 @@
from __future__ import annotations
from Card import Card
def sum_cards_iter(cards: list[Card]) -> int:
total = 0
for card in cards:
total = total + card
return total
#Added for project 2: Created a function to sum a list of Card objects using iteration.