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
yKpoI14uk [10]
3 years ago
6

Write a program that will input a list of test scores in from the keyboard. When the user enters -1, print the average.

Computers and Technology
2 answers:
never [62]3 years ago
7 0

print("Enter the Scores:")

total = []

while True:

   num = int(input())

   if num == -1:

       break

   total.append(num)

print("The average is:",(sum(total)/len(total)))

I wrote my code in python 3.8. Also, you have to be careful about adding -1 to the total. You don't want to count -1 in the average.

aivan3 [116]3 years ago
3 0

Answer: -1 usually represents infinity.

Explanation:

It would keep going forever and not be able to stop without manually stopping it.

You might be interested in
What method does a GSM network use to separate data on a channel?
Sergeu [11.5K]

Answer: TDMA(Time division multiple access)

Explanation: Time-division multiple access is the method that is used by GSM(Global system for mobile communication) usually for the separation process of the data.It is a way in which a same frequency is shared by different time slots of signal.It has high flexibility and so thus is helpful for the GSM network and provides easy services of division.It divides the data according to the time period slots in a GSM network.

4 0
3 years ago
How to change the indent of the list item "regular" on slide 2 to .5 inches in powerpoint?
galina1969 [7]
<span>You can change the identation of text in Powerpoint by right clicking on the list item and selecting, "Format Text". On the paragraph tab, you can adjust the indentation before text as given in inches.</span>
4 0
3 years ago
What will be displayed after the following code executes? (Note: the order of the display of entries in a dictionary are not in
iren [92.7K]

Answer:

Nothing will be printed

Explanation:

You can easily find out that FL is not a member of the Dictionary. And we are checking these in the if. Since the if condition ends up being false, the further process will not run as they will only if the condition ends up being true. Hence, nothing will be printed.

Remember, del is used to delete a dictionary item. If this would have been a true condition for if then the FL item in the dictionary would have been deleted as it, in that case, would have been present there. And then the next line would have again added the FL item, and print would have printed the dictionary items with FL item as well. However, since if the condition is ending up being false, nothing will be printed.

If cities['FL'] and print is outside if then

the output will be

{'FL': 'Tallahassee', 'GA': 'Atlanta', 'NY': 'Albany', 'CA': 'San Diego'}

6 0
3 years ago
Comments should
suter [353]

Answer:

Correct answer is:

communicate the purpose of the code that follows it.

Explanation:

Let have a look at each option

comment should give the reader the background of the programmer.

Comments are unable to do so.

Be written on every line

No, it is not need as comment are useful only to explain difficult or complex part of code.

communicate the purpose of the code that follows it.

yes, this option is true, as comments will give hints to programmer about the piece of code.

give information about how many hours it took to write the code

No, comments can answer it,

3 0
3 years ago
Read 2 more answers
what allows separate systems to communicate directly with each other, eliminating the need for manual entry into multiple system
Karolina [17]
Connections, allow separate systems to communicate directly with each other, eliminating the need for manual entry into multiple systems. They do not entirely eliminate information redundancy, but they do ensure information consistency among multiple systems.
6 0
2 years ago
Other questions:
  • Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive.
    10·1 answer
  • What special member function of a class is called whenever an instance of a class is created and initialized?
    15·1 answer
  • How is a cell named?
    9·1 answer
  • What document type would be best to communicate sales items from a business to potential customer?
    12·1 answer
  • 2.1 Changes in which factors could cause aggregate demand to shift from AD to AD1? What could happen to the unemployment rate? W
    8·1 answer
  • Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less
    15·1 answer
  • After you configure backup settings using the backup plugin, backup jobs will run automatically and start taking backups at the
    13·1 answer
  • Select the three careers in the creative side of digital media.
    11·1 answer
  • In this paper https://arxiv.org/pdf/2008.10150.pdf, I'm having a hard time understanding how the assignment in the picture is de
    10·2 answers
  • Who tryna trade in gta my psn is xMadOrNawx-_-
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!