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
In a block-style business letter, the paragraphs are double-spaced and indented. <br> True or False
Sav [38]
I am pretty sure it is true
5 0
3 years ago
Read 2 more answers
A ____ firewall keeps a record of the state of a connection between an internal computer and an external device and then makes d
Yakvenalex [24]

Answer:

Stateful frame filtering

Explanation:

<h2><u>Fill in the blanks</u></h2>

A <u>Stateful frame filtering </u> keeps a record of the state of a connection between an internal computer and an external device and then makes decisions based on the connection as well as the conditions.

8 0
3 years ago
What is big data<br>please explain why it is called big and do the data necessarily mean numbers​
harkovskaia [24]

<u>Answer:</u>

<em>Big data is to analyze large complex data.</em>

<u>Explanation:</u>

It is basically a data processing software which has overcome the disadvantage which we had in <em>the classical software where it was not able to manage huge data in a faster mode.</em>

The mean of an informational collection is found by including all numbers in the informational index and afterwards partitioning by the number of qualities in the set.

<em>To answer the question is the word big points to a number? I would say yes, since it can handle large amount of data, it is so called “Big data.</em>

The middle is the center worth when an informational collection is requested from least to most noteworthy. <em>The mode is the number that happens frequently in an informational index.</em>

6 0
3 years ago
You can access cloud files from any computer smart phone or tablet as long as it is connected to the Internet is it true or fals
Zepler [3.9K]

Answer:yes

Explanation:

because it is the internet

8 0
3 years ago
Tools used in a particular career depend on the tasks performed. True or false
Aliun [14]
True so hopefully this will help
8 0
3 years ago
Read 2 more answers
Other questions:
  • What is a browser? Give one example
    8·2 answers
  • Which step can most directly help your team follow up on decisions made during Web development meetings?This task contains the r
    6·1 answer
  • In an inheritance situation, the new class that you create from an existing class is known as the:
    5·1 answer
  • Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (
    12·1 answer
  • Exercise#3: Write a program that performs the following: Declare a two arrays called arrayA and arrayB that holds integer and th
    14·2 answers
  • Question Mode Matching Question Match the following description with the appropriate programming language generation. 1GL 1GL dr
    7·1 answer
  • Computer instructions are converted to binary when executed. Binary numbers use which set of digits?
    10·1 answer
  • Blockquote
    11·1 answer
  • In this lab, you complete a C++ program that uses an array to store data for the village of Marengo.
    8·1 answer
  • What is the launching of a 3-D map called?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!