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
antiseptic1488 [7]
3 years ago
8

You want to know your grade in Computer Science, so write a program that continuously takes grades between 0 and 100 to standard

input until you input "stop", at which point it should print your average to standard output.
Computers and Technology
1 answer:
Dominik [7]3 years ago
6 0

Answer:

Following are the program in the Python Programming Language.

#declare variables and initialize to 0

s=0

n=0

avg=0

#set the infinite while loop  

while(True):

 #get input from the user

 score=input()

 #set if statement to break loop

 if(score =="stop"):

   break

 #otherwise, perform calculation

 else:  

   n+= 1

   s=s+ int(score)

   avg= s/n

#print average of the input

print ('average: ',avg)

<u>Output</u>:

58

96

34

15

stop

average:  50.75

Explanation:

<u>Following are the description of the program</u>.

  • Firstly, set three variable that is 's' for sum, 'n' for count and 'avg' for average and initialize them to 0.
  • Set the infinite while loop and inside it, set variable 'score' that get input from the user then, set the if conditional statement for break the loop, otherwise we calculate the sum of the user input and calculate its average.
  • Finally, we print the result with message.
You might be interested in
Prominent is another word for stands out. True False
earnstyle [38]
The answer is TRUE.

There you go.
6 0
3 years ago
An additional factor in how an element is rendered is that properties are passed from a parent element to its children in a proc
ValentinkaMS [17]

Answer: Style inheritance

Explanation:

Style inheritance is used to design style sheets. It is a process in which properties are inherited by children from a parent element. For example you wish that all text on a page use same font color i.e. red. You can apply they following style for <body> tag like {body color:red;}. All the elements in the web page will inherit this font color. This is better to use than to create styles for each tag. Every heading and paragraph will be displayed in this font color until you define different color for particular element.

3 0
2 years ago
1. In Access, a template is which of the following? a. A database to manage contacts b. Where a database is stored c. Two tables
sweet [91]
Where a database is stored
7 0
2 years ago
Gal runs a music store. He has a desktop computer in the back room that acts as a server. He has a point-of-sale terminal that c
Masja [62]

Answer:

The answer is letter C. The letter C is the true statement.

Explanation:

The true statement is The point-of-sale terminal cannot connect directly to the Internet.

8 0
3 years ago
A general rule for adding text to a slide is ____.
KiRa [710]

A general rule for adding text to  a slide is to use not more than two fonts in a presentation and vary the font  size. Besides adding text you can also import text, photographs, numerical data, and facts from files created in programs such as Microsoft word, excel and access.

5 0
2 years ago
Read 2 more answers
Other questions:
  • What is client server relationship is the basic form of what
    6·1 answer
  • Suppose you find a magic $1.00 coin. Its magic power is as follows: as each day passes, you get an additional dollar plus half o
    6·1 answer
  • 50 Points! 25 Points Each! Please help ASAP! Will mark brainliest! See attached image.
    10·2 answers
  • Alison wants to add her company name at the bottom of every page in her document. Which option should she use?
    11·2 answers
  • Which of the following is a rule of thumb for cell phones or smartphone etiquette ?
    12·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • Write a method called sum with a while loop that adds up all numbers between two numbers a and b. The values for a and b can be
    11·2 answers
  • The higher the ____________________, the faster the ____________________.
    5·1 answer
  • What should you do if a headset plugged into your computer is not working properly.
    12·1 answer
  • Compare and discuss between electromechanical and electronic era of computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!