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
You are hired to train a group of new users to become technicians. One of your lessons is on how to construct Cat5 and Cat6 Ethe
Greeley [361]

Answer:

To ensure that the trainees are well acquainted with how to differentiate 568A cables and 568B cables, you must ensure they know appropriate color scheme pattern for the both cables. Also, they are expected to know the correct terminology when using both cables, as 568A is known as a crossover cable and 568B is known as a straight-through cable.

Explanation:

3 0
2 years ago
What does "CYBER-COCKROACH" mean??
katrin2010 [14]

Answer:

The cyber cockroach is the presented external anatomy of a cockroach, with labeled views of photographs from diverse angles in place of diagrams. The cyber cockroach can be navigated around the head, thorax and abdomen with possible close up views of the legs and the images are downloadable

Cyber cockroach is a useful tool for the study of insects of the Blattodea order

Explanation:

3 0
3 years ago
Write a program that asks the user for several days' temperatures and computes the average temperature for that period and how m
elena-14-01-66 [18.8K]

Answer:

#section 1

<em>no_of_days= int(input('How many days are we geting the average for: ')) </em>

<em>tem=[] </em>

<em>for i in range(no_of_days): </em>

<em>    a= int(input('Enter temperaure: input ' + str(i+1)+'  :')) </em>

<em>    tem.append(a) </em>

<em />

#section 2<em>     </em>

<em>average = round(sum(tem)/len(tem),2) </em>

<em>print('The Average is ',average) </em>

<em>gdays=[] </em>

<em>for i in tem: </em>

<em>    if i > average: </em>

<em>        gdays.append(i) </em>

<em> </em>

<em>print('The following days are greater than the average: ',gdays)</em>

Explanation:

The above code is written in python 3

#section 1:

An input is gotten for number of days that is to be used in the calculation, and an array is created to hold the temperature that will be inputted into the program.

A range of values from [0 - (no_of_days - 1)] is created from the number of days entered, this is done so that the FOR loop can iterate through every number and call for inputs.

The FOR loop prompts the user for an input based on the range and passes that input to an integer data type before appending it to the tem array.

#section 2:

The sum of the new list and the length is used to calculate the average and the it is rounded up to 2 DP, The average is then printed to the screen.

Another FOR loop is used to check which of the days are greater than the average and passes it to another array (<em>gdays)</em>, this array is also printed to the screen.

check the attachment to see how the code works.

4 0
3 years ago
WILL UPVOTE ALL plz
OverLord2011 [107]
D-ash is the answer.
8 0
2 years ago
Only one calendar can be visible at a time<br> in Outlook.<br> Select one:<br> a. False<br> b. True
Fed [463]

Answer:

a. False

Explanation:

It is false as more than one calendar is visible in outlook.

4 0
3 years ago
Other questions:
  • When computing the cost of the basket of goods and services purchased by a typical consumer, which of the following changes from
    11·1 answer
  • Find the Nearest Repeated Entries in an Array People do not like reading text in which a word is used multiple times in a short
    15·1 answer
  • How many bytes are there in 256 Kbytes?
    6·1 answer
  • Create a function names minElement() that takes an array of numbers as a paaramter and returns the min value of the array. The a
    9·1 answer
  • A _______ template is used to maintain consistency in terms of margins and page numbers .
    6·1 answer
  • How do I get the bot token for discord? (scripting etc)
    5·1 answer
  • . What process skill would a scientist use to find the length of a line
    5·1 answer
  • Can you explain the difference between software and hardware? Tell me 3 examples of each one.
    10·1 answer
  • Find the mean median mode and range of the data set <br> 11, 13,11,12 10 ,12,11,8
    10·1 answer
  • A ____ is an Access feature that makes it easy to enter data.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!