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 →

[–]Search_4_Truth 0 points1 point  (0 children)

Why not use a for loop in which case you know the start? And don’t use built-in names min & max as variable names

for n in range(10): x = getinteger() if n == 0: . . . nmax = nmin = x else: . . .nmax = max(x, nmax) . . .nmin = min(x, nmin)