My code is very simple. It tells you the largest number, the smallest number, and how many numbers you have inputted before pressing the key 'E'. However, the 'max()' function doesn't consider numbers whose digits are greater than 1. So it ignores range(10,'infinity'). The minimum does work, so I have no idea why it's doing what it's doing. My code is the following:
list1=[]
while len(list1)>-1:
i = input("Input a number: ")
list1.append(i)
if i == 'E':
break
del list1[-1]
max1 = max(list1)
min1 = min(list1)
c = len(list1)
print('Max: {}'.format(max1))
print('Min: {}'.format(min1))
print('Count: {}'.format(c))
print(list1)
Example:
Input a number: -10
Input a number: 3
Input a number: 4
Input a number: 1
Input a number: 3
Input a number: 5
Input a number: 41
Input a number: E
Max: 5
Min: -10
Count: 7
['-10', '3', '4', '1', '3', '5', '41']
Sorry for the messy format. I don't know how to format text in this website and it did it automatically.