+ 2

That's odd in Python. Why not working? Explain for me? Also add another solution?

numberLength = int(input()) count = 0 for i in numberLength: numbers = int(input()) if numbers / 2 == 0: count += numbers print(count)

24th Apr 2020, 4:58 PM
Purevsuren
Purevsuren - avatar
2 Answers
0
Use modulus (%) instead of division so it should be numbers % 2 == 0.
9th May 2020, 1:58 PM
Epsilon ļø»ā•¦ĢµĢµĶ‡ĢæĢæĢæĢæā•¤ā”€ā”€
Epsilon ļø»ā•¦ĢµĢµĶ‡ĢæĢæĢæĢæā•¤ā”€ā”€ - avatar