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

Write a program that determines a student's letter grade. Allow the user to enter three test scores. The maximum score on each t

est is 100 points. Determine the letter grade from the average of the test scores, using the following: 90% or more A 80% or more, but less than 90% B 70% or more, but less than 80% C 60% or more, but less than 70% D or F, to be determined from additional information less than 60% F Only if the grade needs to be determined between D and F, allow the user to enter the number of homework assignments the student turned in, and the total number of homework assignments. If more than 80% of the homework assignments were turned in, the letter grade is D, otherwise F. Test it 4 times: 96 84 90 95 83 90 70 59 60 with 5 homework out of 6 turned in 73 58 65 with 8 homework out of 11 turned in Compute the results by hand and check your results.
Computers and Technology
1 answer:
Elina [12.6K]3 years ago
6 0

Answer:

public class Grade {

   

   public static void main (String [] args) {

       

       int sum = 0, avg = 0;

       char grade = 'x';

       Scanner input = new Scanner(System.in);

       

       System.out.print("Enter the test scores: ");

       for(int i=1; i<=3; i++) {

           int testScore = input.nextInt();

           sum += testScore;

       }

       

       avg = sum/3;

       

       if(avg >= 90) {

          grade = 'A';

       }

       else if(avg>= 80 && avg < 90) {

          grade = 'B';

       }

       else if(avg>= 70 && avg < 80) {

          grade = 'C';

       }

       else if(avg>= 60 && avg < 70) {

         

          System.out.print("Enter the number of homeworks turned in: ");

          int homeworksTurnedIn = input.nextInt();

          System.out.print("Enter the total number of homeworks: ");

          int totalHomeworks = input.nextInt();

         

          if((homeworksTurnedIn / (double)totalHomeworks) > 0.8) {

              grade = 'D';

          }

          else

              grade = 'F';

       }

       else if(avg < 60) {

          grade = 'F';

       }

       

       System.out.println("Your grade is: " + grade);

   }

}

Explanation:

- Initialize the variables

- Ask the user for the test scores

- Inside the for loop, calculate the <em>sum</em> of the test scores

- Then, find the <em>average</em> of the scores

- Depending on the <em>average</em>, print the <em>grade</em>

You might be interested in
What aspects of your life are most influenced by media and technology​
Anastasy [175]

Answer:

Everyday life

Explanation:

Television

office work (computers )

Music

video games

ware house work uses technology

work from home jobs use technology

cellular towers

5 0
3 years ago
A protester seeking to make a political point by leveraging technology tools, often through system infiltration, defacement, or
Korolek [52]

Answer:

- agitator hacktivist

Explanation:

There are various terms which are described below:

activist cyber: when a person uses online campaigning by non-violation means like social media or other online platforms to create their activism is known as activist cyber.

agitator hacktivist: when a person uses illegal ways to bring change in political point by hacking or theft the information from the internet or bring the system down is known as agitator hacktivist.

ethical hacker: when a person uses legal ways to make a system safe from any type of malicious attack by removing the weakness of the system is known as the ethical hacker.

cybersquatter: when a person buys a domain name with the vision of selling it to the company needed it at very high prices, it is known as a cyber squatter.

so, according to the scenario the most appropriate answer is agitator hacktivist.

4 0
3 years ago
At a local burger chain, a customer became extremely angry. Everyone took notice at the person, who was yelling at anyone he cou
leonid [27]

Answer: Donald, the branch manager displayed people skills  

Explanation: People skills are a combination of behavior and behavioral interactions between people. There are many abilities that fall under the category of people skills, for example, personal effectiveness, interactive skills and negotiation skills. While the customer was shouting, Donald patiently heard and tried to calm the customer which reflected that he respected and valued the customer and kept a positive behavior towards the customer.


5 0
3 years ago
Read 2 more answers
NumA = 3 <br>numB = 2<br>Result = numA ** numB
Paul [167]

Answer:

The result of the following code will be 9

Explanation:

There are several operators used in Python to do mathematical calculations.

** operator is used for exponents.

i.e.

a ** b mathematically means a^b

Here in the given code

3 is assigned to numA and 2 is assigned to numB

Result will be equal to 3^2

Hence,

The result of the following code will be 9

3 0
2 years ago
Cheri needs to write a small program that interacts with the user. What step will allow her to do this?
Alinara [238K]

Answer:

Including a input statement

Explanation:

You need a input statement in order for it to work, here´s an example;

script.parent.click <u>then</u>

you need the ¨.mouse¨ after parent or it wouldnt work.

8 0
3 years ago
Read 2 more answers
Other questions:
  • You can execute three main types of linux commands. what are they?
    8·1 answer
  • If I put a short clip from a copyrighted video to Facebook and make it only viewable to friends, is that illegal?
    12·1 answer
  • Conduct online research to determine specific conflict-resolution and management techniques and skills that would be beneficial
    5·1 answer
  • A professor is working with five teams in his marketing research class. He decides to experiment with path-goal theory in helpin
    11·1 answer
  • __________ offers a mechanism to accomplish four security goals: confidentiality, integrity, authentication, and nonrepudiation.
    9·1 answer
  • The___provides access to the internet; may also be internal
    11·1 answer
  • When Russ opened a website on his browser, he saw an error that the site was not compatible with the browser version he was runn
    9·1 answer
  • Which type of film would typically require the least amount of input from a screenwriter?
    10·1 answer
  • How was the Big Ben project similar to the investigation you conducted in class to determine if the table was vibrating? How is
    7·1 answer
  • Thirty percent of a magazine's subscribers are female. A random sample of 50 subscribers Answer the following questions using Ex
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!