+ 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 odpowiedzi
0
Use modulus (%) instead of division so it should be numbers % 2 == 0.
9th May 2020, 1:58 PM
Epsilon ︻╦̵̵͇̿̿̿̿╤──
Epsilon ︻╦̵̵͇̿̿̿̿╤── - avatar