Thats odd.. Challenge in coach [solved] | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Thats odd.. Challenge in coach [solved]

Idk why this doesnt work in test 4&5: x=[] z=0 while True: try: x.append(input()) except: break for i in x[1:] #solved if(int(i)%2==0): z+=int(i) print(z) EDIT:solved

20th Dec 2019, 7:05 PM
Sousou
Sousou - avatar
3 Respostas
+ 6
Thx for telling me :) I changed now line 8 to x[1:] Also, i reached level10; gold :D
20th Dec 2019, 7:16 PM
Sousou
Sousou - avatar
+ 3
Alexandr is right. The first value gives the number of values to evaluate. You should not put this one in your list.
20th Dec 2019, 7:17 PM
Coding Cat
Coding Cat - avatar
+ 2
if you write input() at the top, it should work.
20th Dec 2019, 7:17 PM
HonFu
HonFu - avatar