We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Constants Quiz

Consider the following functions:

def sum(nums: list[int]) -> int:
    total = 0
    for num in nums:
        total += num
    return total
def double_sum(nums: list[int]) -> int:
    total = 0
    for num in nums:
        double = num + num
        total += double
    return total