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
Businesses that conduct telemarketing are required to access the Do-Not-Call Registry every _______ in order to maintain an upda
densk [106]

Businesses that conduct telemarketing are required to access the Do-Not-Call Registry every 31 days in order to maintain an updated database of people.

<h3>What telemarketing firms do?</h3>

The act of telemarketing is known to be the act talking to potential or existing customers through the use of a telephone.

Conclusively, Note that Telemarketing can help a business firm to promote or boast their products or services, make their customer database stronger, bring about a lot of leads and appointments and others.

Learn more about telemarketing from

brainly.com/question/25974538

6 0
3 years ago
What was the first general purpose, programmable, electronic computer?.
ryzh [129]

Answer:

ENIAC: first general-purpose electronic computer.

Explanation:

6 0
3 years ago
Desktop Management software requires managers to install software such as antivirus updates or application updates on client com
Natali [406]

Answer: False

Explanation: Desktop management is the managing of the computer system and its elements .They also supervises the data organization , network management, etc.

The desktop management software requires automatic installation rather than being installed by the managers.The updates for the antivirus or application occurs after a certain period of time intervals automatically because of the inbuilt feature of the software . So, the given statement is false.

5 0
4 years ago
How do I do this wow
astraxan [27]

Answer:

no sweat

Explanation:

variable = [X]

while n <  8:

    print(variable)

    variable.append("X")

    variable.append("X")

    n += 2

this is not very well written im tired i just woke up

6 0
4 years ago
Difference between netbook and PDA
Mazyrski [523]
Search Results
Featured snippet from the web
A PDA and a laptop computer share many of the same features, yet they are quite different. A PDA is outstanding for its light weight and portability. The laptop is portable, but is heavier and somewhat more cumbersome. ... A PDA is lightweight - more so than the laptop.
6 0
3 years ago
Other questions:
  • . Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
    15·1 answer
  • Arcade games such as Donkey Kong, Mr. Dol, and Venture were adapted from arcade titles to home consoles by which company?
    9·2 answers
  • Write a complete program whose class name is hello and that displays hello, world on the screen.
    13·2 answers
  • Write a program that reads in your question #2 Python source code file and counts the occurrence of each keyword in the file. Yo
    11·1 answer
  • Where are domain user passwords stored?
    10·1 answer
  • Does anyone know how I can "guest browsing" when it's blocked ?
    7·1 answer
  • It is important to consider the quality of the data being used when considering the accuracy of a conclusion. Incorrectly collec
    11·2 answers
  • Select the items below that are examples of things that could use the smart card technology.
    7·1 answer
  • write a c program to insert and delete values from stack( to perform pop and push operations) using an array data structure
    8·1 answer
  • A form of segmentation that is based on user usage rate, user status, purchase occasion, and benefits sought is _________.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!