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]
3 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]3 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
¿Por qué es importante que lo países crezcan a nivel tecnológico?
IrinaK [193]

Answer:

Importancia de la tecnología en el crecimiento económico de los países. ... El desarrollo de estas vías tecnológicas aporta un aspecto positivo como el ahorro del tiempo, la disminución de los esfuerzos de los trabajadores que permite una economía progresiva.

Explanation:

4 0
3 years ago
Conceptos importantes de red de computadoras
Bumek [7]

Answer:

-Consiste en conectar varias redes de computadoras basadas en diferentes protocolos -Requiere la definición de un protocolo de interconexión común sobre los protocolos locales. -El Protocolo de Internet (IP) desempeña este papel, definiendo direcciones únicas para una red y una máquina host.

3 0
3 years ago
What do I have to do to get you to cancel this subscription? I have emailed several times and every dang month I get a $10 charg
alexdok [17]
Contact the moderation team’s email
5 0
3 years ago
All of this information is part of a ____ in a database.
Crank
The correct answer or solution to the question above is marked A
5 0
3 years ago
Read 2 more answers
Pressing the _____ key when entering title text in a placeholder creates a new paragraph. BACKSPACE SHIFT DELETE ENTER
Lunna [17]
Enter would create a new line, thus allowing you to enter a paragraph, on some applications you can use "Shift+Enter" if it is an IM application like Skype.
4 0
3 years ago
Other questions:
  • Which of the following is a domestic business activity?
    6·2 answers
  • If you see ##### in a cell, you should
    10·1 answer
  • Which feature enables you to make changes to all the slides of your presentation at the same time?
    15·2 answers
  • Read the excerpt from The Code Book. Other attacks include the use of viruses and Trojan horses. Eve might design a virus that i
    13·1 answer
  • Ile 1 cm<br> ?<br> 50 m<br> The an
    5·2 answers
  • What are the possible consequences of intentional virus setting?
    14·1 answer
  • So I was looking at my profile and it says i'm a brainly PLUS member didn't sign up for it tho. Any ideas why this could have ha
    14·2 answers
  • Which list shows a correct order of mathematical operations that would be used by a spreadsheet formula?
    5·2 answers
  • What is a word processing program? Give examples of word processing programs.
    10·1 answer
  • I came here for a answer so why did i get a pep talk
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!