As far as my googling went I understood that there are basically no limitations regarding solution.
So one can take advantage of Python 3.8 new cool feature and of course use built-in min and max to deliver result:
So one can take advantage of Python 3.8 new cool feature and of course use built-in min and max to deliver result:
ints = [] while (answer := input('Enter integer: ').lower()) != 'done': try: ints.append(int(answer)) except ValueError: print(f"{answer!r} can't be interpreted as integer") print(f'Maximum entered value was {max(ints)} and minimum value was {min(ints)}')
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.