Challenge for Functions
The following function sums the even numbers of its parameters:
def sumEven(*vars): sum = 0 for n in vars: if n%2==0: sum += n return sum
sumEven(2,3,4) would return 6.
You have a tuple named
tup. Write one line of code (13 characters) that passes
sumEven() so it returns the sum of it's even numbers.
Alternatively, you can try out Learneroo before signing up.