Coded in IDLE, program asks for the user to input numbers. Once done with the input it calculates the sum/avg of all of the inputted numbers
Code:
count = 0 #amount of numbers inputted
vSum = 0.0 #variable to track sum
average = 0.0 #variable to track average
data = input('Enter a number or press enter to quit:')
while data != '': #while data is actively being inputted it calculates the sum and count total
number = float(data)
count += 1
vSum += number
data = input('Enter a number or press enter to quit:')
average = vSum/count
if data == '': #once the enter key is hit, process stops and prints sum and average
print('The sum is', vSum)
print('The average is', average)