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
gulaghasi [49]
3 years ago
14

Produce a program using a loop that requests for 8 floating point numbers from a user.once provided the program should calculate

the average of all numbers that are less than 10.5
​
Computers and Technology
1 answer:
kati45 [8]3 years ago
7 0

Answer:

The program in Python is as follows:

total = 0

count = 0

for i in range(8):

   num = float(input())

   if num < 10.5:

       total+=num

       count+=1

print("Average: ",total/count)

Explanation:

This initializes the total to 0

total = 0

This initializes the count to 0

count = 0

This loop is executed 8 times

for i in range(8):

This request for float number

   num = float(input())

If input is less than 10.5

   if num < 10.5:

The sum is taken

       total+=num

And count is incremented by 1

       count+=1

The loop ends here

This calculates and prints the average

print("Average: ",total/count)

You might be interested in
The objects that you place on master pages are called _____.
Studentka2010 [4]
The answer to this is A.
3 0
3 years ago
Which magazine can help public determine best technology to buy
Dennis_Churaev [7]
Consumer report would help determine the best technology to buy.
4 0
3 years ago
Which of the following is a subsystem of computers providing access to the Internet and offering multimedia and linking capabili
lbvjy [14]
Answer is option C that is w.w.w.
6 0
2 years ago
What is the output of the following program? #include using namespace std; class TestClass { public: TestClass(int x) { cout &lt
Alik [6]

Answer:

An error will be occurred here. In C++ a function must be like

returntype function_name(){

}

but the functions in given class does not have returntype given. So there will be a syntax error.

If the returntype is defined then the code does not show any output since nothing is printed in the main function.

4 0
3 years ago
What is the quickest option for adding internet images to a power point presentation
Alex777 [14]

Answer:copy and paste

Explanation:

5 0
3 years ago
Other questions:
  • Which is a feature of a strong thesis statement? A) It presents only the facts. B) It is open-ended. C) It answers the central q
    15·1 answer
  • What is the best way to learn JavaScript?
    5·2 answers
  • An online service allows users to integrate their phonebook with their social media profiles and stores it on the cloud. The pho
    12·1 answer
  • You are given a 5-letter word (for example, abcde). Write a C-Program which outputs all possible unique 5 letter permutations of
    13·1 answer
  • To discover how many cells in a range contain values that meet a single criterion, use the ___ function
    5·1 answer
  • What is a file path?
    7·1 answer
  • WHICH PROGRAMMING LANGUAGES ARE THE BEST FOR PROGRAMMING?
    14·1 answer
  • Define computers software.dicuss the types of computer software​
    5·1 answer
  • Identify a statement that accurately differentiates between short-term memory and working memory.
    15·1 answer
  • Select the correct answer.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!