Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program:
calcAverage—This function should accept five test scores as arguments and return the average of the scores.
determineGrade—This function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale:
import java.util.Scanner;
public class Scores {
public static String determine_grade(double
score){
String grade = "invalid";
if(score<=30){
grade = "F";
}
else if(score<=40){
grade = "D";
}
else if(score<=50){
grade = "C";
}
else if(score<=70){
grade = "B";
}
else if(score>70){
grade = "A";
}
return grade;
}
public static double calc_average(double sc1, double
sc2, double sc3, double sc4, double sc5){
return
(sc1+sc2+sc3+sc4+sc5)/5;
}
public static void main(String[] args) {
double s1,s2,s3,s4,s5;
//inputting scores
Scanner input = new Scanner(System.in);
System.out.printf("Enter Score 1: ");
s1 = input.nextDouble();
System.out.printf("Enter Score 2: ");
s2 = input.nextDouble();
System.out.printf("Enter Score 3: ");
s3 = input.nextDouble();
System.out.printf("Enter Score 4: ");
s4 = input.nextDouble();
System.out.printf("Enter Score 5: ");
s5 = input.nextDouble();
input.close();
System.out.println("GRADES:");
System.out.println("------------------------------");
System.out.println("Grade is "+
determine_grade(s1)+" for score of "+ s1);
System.out.println("Grade is "+ determine_grade(s2)+"
for score of "+ s2);
System.out.println("Grade is "+ determine_grade(s3)+"
for score of "+ s3);
System.out.println("Grade is "+ determine_grade(s4)+"
for score of "+ s4);
System.out.println("Grade is "+ determine_grade(s5)+"
for score of "+ s5);
System.out.println("---------------------------");
System.out.println("AVERAGE: " +
calc_average(s1,s2,s3,s4,s5));
}
}

COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER,
PLEASE PLEASE GIVE A THUMBS UP
Write a program that asks the user to enter five test scores. The program should display...
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program: calcAverage—This function should accept five test scores as arguments and return the average of the scores. determineGrade—This function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale: Score Letter Grade...
Write a javascript program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program: calcAverage—This method should accept five test scores as arguments and return the average of the scores. determineGrade—This method should accept a test score as an argument and return a letter grade for the score,
Design a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. For example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two. Need Variable lists, Psuedocode, ipo chart, Flow Chart, and a python...
Write a C++ program that will provide a user with a grade range if they enter a letter grade. Your program should contain one function. Your function will accept one argument of type char and will not return anything (the return type will be void), but rather print statements to the console. Your main function will contain code to prompt the user to enter a letter grade. It will pass the letter grade entered by the user to your function....
Solve This Problem using python and please comment on every
line. also, use function to solve this.
thanks
The result will be like as below:
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following functions in the program: This function should accept five test scores as arguments and return the average of the scores. This function should accept a...
Write a Python program that asks the user to type in their three quiz scores (scores between 0 and 100) and displays two averages. The program should be written so one function gets the user to input a score, another function takes the three scores and returns the average of them. And another function takes the three scores and averages the two highest scores (in other words, drops the lowest). Each of these functions should do the computation and return...
Write a program that will ask the user to enter 4 quiz scores. These scores should be from 0 to 100. Use a procedure and pass by reference to get these scores. Write a function that will find the lowest score. This score will be sent back through the function call. You still need to pass the scores by value to this function. Write a function that will calculate the average score. This value will be sent back to main...
I need help with this c++ question please
thank you
ltls. The program should urt valte. 11. Lowest Score Drop Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: void getscore() should ask the user for a test score, store it in a reference param- eter variable, and validate it. This function should be called by main once for each of...
Using basic c++ write 2 separate codes for this assignment. Program #1 Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions. • void getScore() should ask the user for a test score, store it in the reference parameter variable, and validate it. This function should be called by the main once for each of the five scores to be entered. •...
Lowest Score Drop In Functions, there can only be one return statement. You can not use an exit or break function. Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of...