+ 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
Papa Kwasi Ansah Asare
Papa Kwasi Ansah Asare - avatar
1 ответ
0
Get the print statement in the for loop so it will work
29th May 2020, 6:56 AM
Gaurav Kulkarni
Gaurav Kulkarni - avatar