Skip to content

ALL-DUPL0003 · examples

These examples come directly from ALL-DUPL0003. Read their source.

def total_over(rows, limit):
total = 0
for row in rows:
total = total + row.value if row.value > limit else total
return total
def sum_above(items, floor):
carried = 0
for item in items:
carried = carried + item.value if item.value > floor else carried
return carried
def total_over(rows, limit):
return sum(row.value for row in rows if row.value > limit)