Question: Need the two missing lines in the Python function sum_even(values) . This function receives as input a list of integers and returns the sum of

Need the two missing linesin the Python functionsum_even(values). This function receives as input a list of integers and returns the sum of all the values that areeven. If there are no even values then the function must return 0.

For example:

print(sum_even([12,2,3,4,5,6])) 24 

def sum_even(values):

result = 0

for i in values:

if i%2==0:

# missing line

# missing line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!