trying to solve a problem for code coach "that's odd" it seems i does not add to n =0 in sololearn but works on a different IDE | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

trying to solve a problem for code coach "that's odd" it seems i does not add to n =0 in sololearn but works on a different IDE

name =input() n = 0 for i in name: i = int(i) if(i%2==0): n +=i print(n)

28th May 2020, 5:48 PM
Kwasi Ansah
Kwasi Ansah - avatar
1 Answer
0
Get the print statement in the for loop so it will work
29th May 2020, 6:56 AM
Gaurav Kulkarni
Gaurav Kulkarni - avatar