1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Veseljchak [2.6K]
3 years ago
11

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 o

r 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
Computers and Technology
1 answer:
Dmitriy789 [7]3 years ago
5 0

Answer:

The solution code is written in Python 3

  1. count = 0
  2. sum = 0
  3. num = input("Enter a number: ")
  4. while(num != ''):
  5.    sum += float(num)
  6.    count += 1
  7.    num = input("Enter a number: ")
  8. print("Sum : " + str(sum))
  9. print("Average: " + str(sum / count))

Explanation:

Firstly, we declare two variables count and sum to hold the number of input number and the total of the input number, respectively (Line 1-2)

Next, we prompt user to input the first number (Line 4). While the num is not ' ' (This means it is not "Enter" key), accumulate the num to sum variable and increment count by one (Line 6-8) and then prompt the user to input the next number (Line 9).

At the end, display the sum and average using print function (Line 11 -12).

You might be interested in
Were can i watch unexpected free season 3
Vesna [10]

Answer:

Netflix

Explanation:

3 0
3 years ago
"PindCart, an online retailer, places a small file on the computer hard drive of its visitors to recognize them when they revisi
photoshop1234 [79]

Answer:  cookie

Explanation:

  • A cookie is a small welcome file contains the information in the form og letters and numbers.
  • It is downloaded on to a computer when a website is visited.

Hence, if a company uses a small file on the computer hard drive of its visitors to recognize them when they revisit their Web site to generate a personalized welcome message to its visitors. This small file is called <u>a cookie</u>.

3 0
3 years ago
A look to different section of the same page is known as_____.
11Alexandr11 [23.1K]

Answer:

hatdoggggggggg

Explanation:

sunoggggggg

6 0
3 years ago
Why is dark supereffective against ghost?
Mice21 [21]

Answer:

hmmmmm...hold up let me look up what dark supereffective means XD...

Explanation:

?oh so i only see stuff about pokemon so id imagine its about that...

4 0
3 years ago
Read 2 more answers
When assigned to a cell, the __________ function returns a number that corresponds to the system date and time beginning with De
Sloan [31]

Answer:

Option D: NOW

Explanation:

In Microsoft Excel, NOW function can be used to return a serial number that  corresponds to the system date and time beginning with December 31, 1899.

The NOW function is useful when a date and time is required for calculation or display. The value will be updated each time we open the Excel worksheet.  To use the NOW function, we can type in the formula as follows:

<em>=NOW() </em>

7 0
3 years ago
Other questions:
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • What does the do not disturb button do on the iphone?
    12·1 answer
  • The FaceSnap app has permission to use many devices on your smartphone, including the camera. A data privacy concern that arises
    6·1 answer
  • Which note-taking method quickly captures and organizes information?
    9·2 answers
  • What is the easiest way to create a resume in Word with predefined content that can be replaced with your information?
    13·2 answers
  • As part of the systems engineering development team, use IDEF0 to develop a functional architecture. The functional architecture
    13·1 answer
  • The famous study entitled ""Protection Analysis: Final Report"" focused on a project undertaken by ARPA to understand and detect
    14·1 answer
  • Linux is a kind of software whose code is provided for use, modification, and redistribution. what kind of software is this?
    5·1 answer
  • What are the reasonsfor documenting business rules​
    6·1 answer
  • Simplify 0.2×0.03055 to 3 decimal places​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!