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
How do you make the task bar and e-mail read in larger print
JulijaS [17]
You have to go into settings and search larger text
5 0
3 years ago
Write a c program that reads marks of ten students calculate percentage and deviations percentage of each student using array
Yanka [14]

Answer:

a

Explanation:

3 0
2 years ago
10. Select the correct answer.
Aleks [24]
B) licensing because they are giving Thomas permission to use the images
6 0
2 years ago
Read 2 more answers
Which of the following is an example of new and emerging classes of sofware
malfutka [58]
We need to know what was listed :)!
3 0
2 years ago
Once the term of copyright has expired,a work
rosijanka [135]
...??????????????????
8 0
3 years ago
Other questions:
  • An engine's _______ contains the cylinder block, the cylinders, the piston, the connecting rods, and the crankshaft assemblies.
    9·2 answers
  • Choosing firm goals for your business
    7·2 answers
  • A bug collector collects bugs every day for 5 days. Write a program that keeps a running total of the number of bugs collected d
    12·1 answer
  • What bus carries a status signal back to the CPU?
    14·1 answer
  • What is the printout of the call nPrint("a", 4)?
    14·1 answer
  • What does the rule of five say?
    12·2 answers
  • Why is a memory hierarchy of different memory types used instead of only one kind of memory?
    13·1 answer
  • What do you call a set of programs?
    7·1 answer
  • True or False? PPOs differ from HMOs because they do not accept capitation risk and enrollees who are willing to pay higher cost
    10·1 answer
  • A transistor may be used as an amplifier in an electronic circuit. <br> Select one: True False
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!