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
liraira [26]
3 years ago
5

loop Write a program to read a list of exam scores given as integer percentages in the range 0 to 100. Display the total number

of grades and the number of grades in each letter-grade category as follows: 90 to 100 is a A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F. Use a negative score as a sentinel value to indicate the end of the input. (The negative value is used only to end the loop, so do not use it in the calculations.) For example, if the input is 98 87 86 85 85 78 73 72 72 72 70 66 63 50 -1 the output would be Total number of grades = 14 Number of A's = 1 Number of B's = 4 Number of C's = 6 Number of D's = 2 Number of F's = 1 loop

Computers and Technology
1 answer:
Licemer1 [7]3 years ago
8 0

Answer:

import java.util.Scanner;

public class Program

{

public static void main(String [] Args)

{

int A_grades = 0;

int B_grades = 0;

int C_grades = 0;

int D_grades = 0;

int F_grades = 0;

int count=0;

int max = 0;

int min = 9999999;

int num;

int total = 0;

int smallest = 0;

int largest = 0;

Scanner in = new Scanner(System.in);

System.out.println("Enter exam score as integer percentage in range 0 to 100");

System.out.println("And enter a negative score at the end of the list :");

int score = in.nextInt();

while(score>0)

{

count++;

if(score < 0){ // negative number

break;} // exit the infine loop

else if(score > max){ // find bigger one

max = score;}

else if(score < min) { // find smallest one

min = score;}

total = total + score; // the total for average

if(score <= 50 && score>0)

smallest = score;

if(score > 90 && score <=100)

largest = score;

if(score>=90 && score<=100)

A_grades++;

else if(score>=80 && score<=89)

B_grades++;

else if(score>=70 && score<=79)

C_grades++;

else if(score>=60 && score<=69)

D_grades++;

else if(score>=0 && score<=59)

F_grades++;

score = in.nextInt();

} //end while

System.out.println("Total number of scores is : " + count );

System.out.println("Total Number of each Letter grade : " + count);

System.out.println("Percentage of total for each letter grade : ");

System.out.println("Total number of A grades :"+ A_grades);

System.out.println("Total number of B grades :"+ B_grades);

System.out.println("Total number of C grades :"+ C_grades);

System.out.println("Total number of D grades :"+ D_grades);

System.out.println("Total number of F grades :"+ F_grades);

System.out.println("Lowest Score is :"+smallest);

System.out.println("Highest Score is :"+largest);

System.out.println("Average score : "+ (total / count));

}

}

Explanation:

The Java program is such that functions in this manner, It reads a list of exam scores given as integer percentages in the range 0 to 100. Displays the total number of grades and the number of grades in each letter-grade category as follows: 90 to 100 is a A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F.

See attachment for program output.

You might be interested in
Synthesize (15 points)
Veronika [31]

Answer:

Perfection: When you make a mistake, no one cares but you.

Even the most accomplished public speaker will make a mistake at some point. Just keep in mind that you’ll notice more than anyone in your audience. The most important thing you can do after making a mistake during a presentation is to keep going. Don’t stop and—unless the mistake was truly earth shattering—never apologize to the audience for a minor slip. Unless they are reading the speech during your delivery, the audience won’t know if you left out a word, said the wrong name, or skipped a page. Because “to err is human,” a mistake can work for you, because it allows you to connect with your audience. People don’t want to hear from someone who is “perfect;” they will relate much more easily to someone who is real.

Master the art of public speaking and crush your next presentation with one of our public speaking seminars, available online and in a classic classroom format.

Effective Executive Speaking

Take your public speaking to the next level! Speak, present and communicate with poise, power and persuasion.

Visualization: If you can see it, you can speak it.

Winners in all aspects of life have this in common: they practice visualization to achieve their goals. Sales people envision themselves closing the deal; executives picture themselves developing new ventures; athletes close their eyes and imagine themselves making that basket, hitting that home run, or breaking that record.

The same is true in public speaking. If you’ve read “10 Powerful Body Language Tips” then you know how anxiety can impact presentation skills. The best way to fight anxiety and to become a more comfortable speaker is to practice in the one place where no one else can see you—your mind. If you visualize on a consistent basis, you’ll prepare your mind for the prospect of speaking in public, and pretty soon you’ll conquer any feelings of anxiety.

Discipline: Practice makes perfectly good.

Your goal is not to be a perfect public speaker. There is no such thing. Your goal is to be an effective public speaker. Like anything else in life, it takes practice to improve those public speaking skills. We too often take communication for granted because we speak to people everyday. But when your prosperity is directly linked to how well you perform in front a group, you need to give the task the same attention as if you were a professional athlete. Remember, even world champion athletes practice every day. Try taking a class where you practice giving speeches.

8 0
3 years ago
WILL DO A BRIANLY! Use an algorithm to help the Python Turtle get to the finish line in 10 steps by using only the 3 commands be
Alexandra [31]

Answer:

3 3 2 1 1

Explanation:

8 0
3 years ago
The number of operations executed by algorithms A and B is 40n2 and 2n3, respectively. Determine n0 such that A is better than B
Tom [10]

Answer:

Given that:

A= 40n^2

B = 2n^3

By given scenario:

40n^2=2n^3

dividing both sides by 2

20n^2=n^3

dividing both sides by n^2 we get

20 = n

Now putting n=20 in algorithms A and B:

A=40n^2

= 40 (20)^2

= 40 * (400)

A= 16000

B= 2n^3

= 2 (20)^3

= 2(8000)

B= 16000

Now as A and B got same on n = 20, then as given:

n0 <20 for n =20

Let us take n0 = 19, it will prove A is better than B.

We can also match the respective graphs of algorithms of A and B to see which one leads and which one lags, before they cross at n= 20.

8 0
3 years ago
To show the navigation pane if it is hidden, click the ____ button
Tcecarenko [31]
Hi,

I believe it's "show".

"To show the navigation pane if it's hidden,
click the show button"


Hope this helps.
r3t40
4 0
3 years ago
Read 2 more answers
To control how and when the slides should appear during the slide show, we use the__________________ feature​
jekas [21]

Answer:

Slide transition

Explanation:

See open chapter 4 page 49 and you will get it

8 0
3 years ago
Other questions:
  • Which letters appear in the home row on a keyboard?
    14·2 answers
  • What is the output of the following Python program? try: fin = open('answer.txt') fin.write('Yes') except: print('No') print('Ma
    9·1 answer
  • 1. Problem solving is
    13·1 answer
  • #Write a function called hide_and_seek. The function should #have no parameters and return no value; instead, when #called, it s
    7·1 answer
  • Which These operating systems use a graphical user interface?
    6·1 answer
  • One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
    12·1 answer
  • Power point presentation make use of pages known as
    9·2 answers
  • How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full identification of both so
    9·1 answer
  • Create a query that shows columns employee last name, job title and hire date for those employees who joined the company on or a
    7·1 answer
  • A network technician attempts to ping www.example.net from a customer computer, but the ping fails. access to mapped network dri
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!