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
What is the differnces between dark and middle ages of computer?​
noname [10]
The "middle ages" are anything between the collapse of Rome (400 AD) to its re-emergence in Rennaissance Italy (1400). Rennaissance means "rebirth". The "dark ages" are the period in the middle ages which were relatively undocumented. This would definitely include 400 AD to 700 AD, and some extend it to 900 AD.
3 0
3 years ago
Which method tries all possible passwords until a match is found?
barxatty [35]
Brute force is this approach to password cracking. It tires all possible password combinations until a correct match between the hashes is found. It may make use of rainbow tables which contain precomputed password-hash combinations.

Please remember that it helps to provide the choices that match your question. This can help you get an accurate answer and have your question answered much quicker.
7 0
2 years ago
The best defenses against covert channels include IDS and intrusion prevention system (IPS) and thoroughly watching all aspects
ddd [48]

Answer:

The statement is True

Explanation:

When talking about computer security, we can define covert channels as an attack on a system capable of creating a loophole for information objects transfer between various processes that would normally not allow communication under the computer security policy. Hence, the best defenses system against this kind of attack is via Intrusion Defense System and Intrusion Prevention System and relentlessly "watching all aspects of an IT infrastructure for aberrant or abnormal events of any type."

7 0
3 years ago
What does a wholesaler do?
Svetach [21]
Wholesalers acquire goods from manufacturers, farmers or miners, holds them then distributes them to retailers.
6 0
3 years ago
Describe how you would define the relation Brother-in-Law whose tuples have the form (x, y) with x being the brother-in-law of y
damaskus [11]

Answer:

The expression is :

π[cd) + π(g,h) ],[π(e,f)+π(a,b)])

We will use foreign key and primary key

8 0
2 years ago
Other questions:
  • Aubrey didnt like to use graphics or images on her slides. She preferred to use only a title for her slides and bullet-poinged t
    14·2 answers
  • Your company is developing a new marketing campaign and wants to know which customers have never placed an order. You will need
    10·1 answer
  • Elise has just edited two photos of her cat and three different photos of her dog. She needs to save all five of these photos in
    5·2 answers
  • Device that converts sound into electrical signals, which are sent to the computer or other recording device
    6·1 answer
  • 1. The future of 2D animation does not include hand-drawing. (1 point)
    13·1 answer
  • Your license can be canceled if you __________
    14·2 answers
  • It will gain you more knowledge, intensify your soft skills, strong work ethics and grow your network. What is it?​
    12·2 answers
  • Cual es la importancia de aplicar los pasos en el modelo de diseño en las actividades académicas?
    14·1 answer
  • When you purchase donuts, they come in boxes of 12, so 24 donuts take 2 boxes. All donuts need to be in a box, so if you buy 13
    10·1 answer
  • HELP PLSSS I WILL MARK U!!!!
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!