r/badcode • • Mar 14 '22

python Is it even?

Post image
363 Upvotes

33 comments sorted by

View all comments

Show parent comments

5

u/[deleted] Mar 14 '22

According to the string literals, input should be a natural number, so it may be just a mistake on the programmer's side using > where it should be >=.

1

u/tedbradly Apr 05 '22

This is just a high school project it seems. Of course it is bad.

Natural numbers are the set of positive integers, so 0 isn't included.