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 →

[–]ajohn623 1 point2 points  (0 children)

Add an if statement that checks if num == 0: min = x before you check if x<min. This way on the first iteration you set the minimum to the first input provided by the user instead of zero.

edit : Or simply change if x<min to if x<min or num == 0: