Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def listave(list):
- UserInput = input('Enter integer (q to quit):')
- list.append(UserInput)
- while UserInput != 'q':
- UserInput = input('Enter integer (q to quit:)')
- if isinstance(UserInput, int) == True:
- list.append(UserInput)
- elif UserInput == 'q':
- break
- list.pop()
- print('Average: ', float(sum(list) / len(list)))
- listave(list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement