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
nydimaria [60]
3 years ago
9

Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce

pting scores until the user enters a negative value. Finally, calculate and display the average for the entered scores.
Computers and Technology
1 answer:
fomenos3 years ago
6 0

Answer:

total = 0

count = 0

while(True):

   grade = float(input("Enter a grade: "))

   if grade < 0:

       break

   else:

       total += grade

       count += 1

       

average = total/count

print("The average is: " + str(average))

Explanation:

*The code is in Python.

Initialize the total and count as 0

Create a while loop that iterates until a specific condition is met inside the loop

Inside the loop, ask the user to enter a grade. If the grade is smaller than 0, stop the loop. Otherwise, add the grade to the total and increment the count by 1.

When the loop is done, calculate the average, divide the total by count, and print it

You might be interested in
Which of the following is not one of the four methods for classifying the various instances of malware by using the primary trai
BlackZzzverrR [31]

Answer: Source

Explanation: The malware is the software persisting malicious approach to cause the damage/loss.The primary trait of the malware are infection,concealment,etc.

The concealment refer to the malware such as the Trojan horse, and other viruses that has only purpose to cause the malfunctioning in the system.The virus that get into the other software and then damage the system in known as the infectious malware .

The circulation is the transferring of the virus in the circular manner between the system for the damaging.Thus,the only trait that is not the part of the malware is source.

4 0
3 years ago
When’s The release date for Mobile legends project next phase 3 going To come
Gennadij [26K]

Answer: This Project will involve Hero Revamps, Hero Adjustments, Hero Remodels, and much more. Project NEXT is divided into 2 phases: the first phase was released on September 22, 2020, the second phase was released on June 15, 2021 and the third phase is to be released on "September 2021".

4 0
2 years ago
how do you call the squares method to compute the first five squares and store the result in an array numbers
IRINA_888 [86]

Answer:

The method can be called using:

int[] returnarray = Squares();

<em>Where returnarray represents the name of the array</em>

Explanation:

To answer this, I will make an assumption that the Square method is an int array method (i.e. it returns array).

So, to call the method from main, an array has to be declared to get the values:

int[] returnarray = Squares();

Then an iteration is created to iterate through the array in order to print the array elements.

for (int i = 0; i < returnarray.length; i++)

 System.out.print(returnarray[i]+ " ");    

-------------------------------------------------------------------------------------------

The answer ends here

-------------------------------------------------------------------------------------------

As an addition, the complete program that includes the method and the main is:

<em>public class Main{</em>

<em> public static int [] Squares(){</em>

<em>     int [] arr = new int[5]; </em>

<em>     for(int i = 1;i<6;i++){</em>

<em>         arr[i-1] = i*i;</em>

<em>     }</em>

<em>     return arr;</em>

<em> }</em>

<em> public static void main(String[] args) {</em>

<em>  int[] returnarray = Squares();</em>

<em>  for (int i = 0; i < returnarray.length; i++)</em>

<em>  System.out.print(returnarray[i]+ " ");          </em>

<em> }  </em>

<em>}</em>

8 0
2 years ago
You have a scenario where you need to disable the guest network on your wireless router. You try to log in, but your password do
Tom [10]

Answer:

Reset the router by holding down the reset button for 30 seconds. The reset button can be located in the back or bottom area of the router. The function of the reset button is to turn restore the wireless router to default factory setting such that customized settings including the DNS, the static IP address setup, stored personal passwords DHCP parameter settings port forwarding and routing settings are erased.

Explanation:

8 0
3 years ago
I really need To know how To get The special ending for final fight 2 for super nintendo it’s a video game
Bogdan [553]

Answer:

Check Yt

Explanation:

More often than not there are many video tutorials about every game imaginable.

5 0
3 years ago
Other questions:
  • Heatsinks used to protect cpus in computers from overheating, are shaped so that their surface area is very large. why is that?
    5·1 answer
  • Graphic images can be stored in a variety of formats including ____.
    15·1 answer
  • Which part of the faucet is the aerator?
    13·1 answer
  • Which best explains a password attached to a document?
    7·1 answer
  • In what other game can kids line up in a row
    6·1 answer
  • State the difference between = and ==
    9·1 answer
  • Which option is referred to by the Reports Due tag?
    7·1 answer
  • Programming in https<br>​
    5·1 answer
  • ____allow(s) visually impaired users to access magnified content on the screen in relation to other parts of the screen.
    5·1 answer
  • When advertising on search engines, if you bid the same as your competitor, having a higher quality score will mean you appear w
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!