largest = None
smallest = None
l = []
while True:
try:
num = input("Enter a number: ")
except NameError as err:
if err == "done":
break
else:
print("Invalid input")
finally:
l.append(num)
l.sort()
largest = l[-1]
smallest = l[0]
print("Maximum", largest)
print("Minimim", smallest)
一只萌萌小番薯
料青山看我应如是
相关分类