0

I don't understand what this problem really wants

so I added my code here to a problem named that's odd... and what I understand is that it needs the sum of even numbers in a list and I don't understand what I did wrong https://code.sololearn.com/cRyIpCL0SY39/?ref=app

13th Jan 2020, 6:30 AM
yara moharram
yara moharram - avatar
3 odpowiedzi
+ 2
The task description wants you to use 2 inputs. The first gives the length of the list which means the number of numbers you are going toninput. The second input has to be done repeatedly in a loop according to length defined in input one.
13th Jan 2020, 7:02 AM
Lothar
Lothar - avatar
+ 1
u create the list yourself. but the list is given. your prog does what u want: input is 6... 0,1,2,3,4,5,6 0,2,4,6...sum is 12 but for problem the input is 2,5,6,1,8. eg.
13th Jan 2020, 6:36 AM
Oma Falk
Oma Falk - avatar
0
You need to iterate through the numbers and only add those which are odd... or those which are pairs, I don´t remember the problem now.
13th Jan 2020, 6:43 AM
Fernando Pozzetti
Fernando Pozzetti - avatar