That's odd code coach | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

That's odd code coach

Solution with python while loop d = int(input()) b = 0 i =0 while i < d : a = int(input()) if (a%2)==0: b += a i = i +1 print(b)

13th Jun 2021, 9:44 PM
Gbolahan Qudus
Gbolahan Qudus - avatar
3 Answers
+ 1
Try out in this way: x=0 len = int(input()) list = [] for i in range(len): list.append(int(input())) for i in list: if i%2 == 0: x = i + x print(x)
14th Jun 2021, 2:27 AM
Aysha
Aysha - avatar
+ 1
Do you really have to down vote it
14th Jun 2021, 7:23 AM
Gbolahan Qudus
Gbolahan Qudus - avatar
0
What's your question?
13th Jun 2021, 10:28 PM
Simon Sauter
Simon Sauter - avatar