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
sergiy2304 [10]
2 years ago
15

Write a program that reads numbers from the user until a blank line is entered. Your

Computers and Technology
1 answer:
ddd [48]2 years ago
5 0

Answer:

nums = []

while True:

   in = input()

   if in:

       nums.append(in)

   else:

       break

if nums:

   avg = sum(nums) / len(nums)

   for i in range(len(nums)):

       if nums[i] == avg:

           print(f"index: {i+1}")

           print(nums[i])

else:

   print(-1)  # if there aren't any values in nums

Explanation:

Assuming that you are coding in Python 3x. The last 'else' statement is an edge case that you might want to consider, I don't know what you want to put there, but I'm just going to leave it as -1.

You might be interested in
LAB: Formatted output: Hello World! Write a program that outputs "Hello World!" For ALL labs, end with newline (unless otherwise
maxonik [38]

Answer:

public class LabProgram {

  public static void main(String[] args) {

     System.out.println("Hello World!");    }  }

Explanation:

In this statement: System.out.println

System is a class in JAVA language package

out is a member of class System

println() is a functionT to print or display message to a console or file

So the message to print here is Hello World!

Now this statement   System.out.println prints the message "Hello World!" passed in the argument.

Hence this statement as a whole displays the message Hello World! on the output screen.

6 0
3 years ago
When comparison shopping, all of these hint at a good deal EXCEPT_____________________.
pav-90 [236]

Answer:

lower-priced models offer more features

Explanation:

4 0
3 years ago
Which view shows how the document will look when printed?
DIA [1.3K]
Please provide photos for your question.
7 0
3 years ago
A strategy for speeding up hard drive performance is _________.
Daniel [21]

Answer:disk caching

Explanation:

Disk caching speeds up hard drive performance

7 0
3 years ago
Read 2 more answers
Which is a software configuration management concept that helps us to control change without seriously impeding justifiable chan
Darina [25.2K]

Answer:

Baselines

Explanation:

The idea of software configuration management is that of monitoring and controlling changes in the software. The baseline is the standard and formally accepted form of a software item that is meant to be configured. It is like a generally accepted reference point, which could be applied in effecting incremental changes in the software.

There are three types of baselines which are the functional, developmental, and product baselines. Functional baselines provide an overview of the functionality and specifications of a system. The product baseline encompasses both the functional and physical details of the system.

7 0
3 years ago
Other questions:
  • 4. Who developed the first design technology program which had a
    12·1 answer
  • What is NOT a good habit when presenting to an audience?
    5·2 answers
  • Many computer magazines and Web sites present comparisons of several DBMSs. Find one such DBMS comparison article and compare th
    10·1 answer
  • How can I collect tweets from different accounts concurrently and categorize the tweets in a corpus?
    15·1 answer
  • Technology has proliferated in Kenya and Somaliland, with text messages used to replace cash, creating mobile money use that, on
    11·1 answer
  • Which of the following does not make a good analysis class? (Points : 6) its name reflects its intent
    13·1 answer
  • if a second system failure occurs while the first recovery is in progress, what needs tobe done after the system recovers for th
    11·1 answer
  • Edhesive unit 4 test
    9·1 answer
  • takes the perspective that a program describes what the solution to a problem is, not how that problem is solved. Select one: a.
    5·1 answer
  • 6. kinukuha nito ang kabuuang bilang ng mga numerical na datos sa mga piniling cells
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!