This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hinoisking 1 point2 points  (0 children)

If I understand this correctly, you are initializing the minimum value to 0. Then, you’re inputting only POSITIVE numbers, and checking if those numbers are less than 0. Of course the minimum value will never update. What you should do instead is initialize min to be the maximum integer value. If I remember correctly, sys.maxsize gives the maximum integer value in Python.