subject

Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he or she is finished providing inputs. After the user presses the enter key, the program should print:

The sum of the numbers

The average of the numbers

An example of the program input and output is shown below:

Enter a number or press Enter to quit: 1
Enter a number or press Enter to quit: 2
Enter a number or press Enter to quit: 3
Enter a number or press Enter to quit:

The sum is 6.0
The average is 2.0
BASE CODE

theSum = 0.0
data = input("Enter a number: ")
while data != "":
number = float(data)
theSum += number
data = input("Enter the next number: ")
print("The sum is", theSum)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
You know the right answer?
Write a program that receives a series of numbers from the user and allows the user to press the ent...
Questions
question
Mathematics, 03.11.2020 09:10
question
English, 03.11.2020 09:10
question
Mathematics, 03.11.2020 09:10
question
Biology, 03.11.2020 09:10
Questions on the website: 13722367