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
Fynjy0 [20]
2 years ago
5

Based on three scores that the user inputs, display the average of the score and the letter grade that is assigned fort he test

score average. The grading scheme is as follows:
// 90 - 100 A
// 80 - 89 B
// 70 - 79 C
// 60 - 69 D
// <60 F
return 'F';
Your display should look like:
Your average test score is 89.9. You earned a B.
1 public void calculateDisplayLetterGrade (double scorel, double score2, double score3)
2 {
3
4 }
5
Computers and Technology
1 answer:
Korolek [52]2 years ago
5 0

I used python function to write the code.

def averageScore(x,y,z):

    s = x + y + z

    avg = s/3

   if avg >= 90:

              return f'Your average test score is {avg} You earned a A.'

    elif avg >=80 and avg < 90 :

                return f'Your average test score is {avg} You earned a B.'

   elif avg >=70 and avg < 80 :

                 return f'Your average test score is {avg} You earned a .C'

      elif avg >=60 and avg < 70 :

                  return f'Your average test score is {avg} You earned a D.'

      else:

                    return f'Your average test score is {avg} You earned a F.'

print(averageScore(98, 90, 80))

Python function is used to write the code where x, y and z are the argument (user inputs) of the function. Then the inputs are summed and the average is gotten and stored with the variable, avg.  

If the average is greater than or equal to 90 the program will give the appropriate score and response(grade). It does the same if the user scored 80 - 89, 70 - 79, 60 - 69 and less than 60.

Finally. the function is called with the user input(argument).

Note the bolded values in the code are keywords in python.

read more: brainly.com/question/14191443?referrer=searchResults

You might be interested in
How do you handle sensitive data?
arlik [135]

  1. <em>Take stock. Know what personal information you have in your files and on your computers.</em>
  2. <em>Scale down. Keep only what you need for your business.</em>
  3. <em>Lock it. Protect the information that you keep.</em>
  4. <em>Pitch it. Properly dispose of what you no longer need.</em>
  5. <em>plan </em><em>ahead</em>

<em>hope </em><em>it</em><em> helps</em>

7 0
3 years ago
Although the first GPS satellite was put into orbit in the ___________, GPS did not provide global coverage until _______.
Ilia_Sergeevich [38]
February 22 1978 and 1992 
5 0
3 years ago
9.10: Reverse ArrayWrite a function that accepts an int array and the array ’s size as arguments . The function should create a
AleksandrR [38]

Answer:

#include <iostream>

using namespace std;

int * reverse(int a[],int n)//function to reverse the array.

{

   int i;

   for(i=0;i<n/2;i++)

   {

       int temp=a[i];

       a[i]=a[n-i-1];

       a[n-i-1]=temp;

   }

   return a;//return pointer to the array.

}

int main() {

   int array[50],* arr,N;//declaring three variables.

   cin>>N;//taking input of size..

   if(N>50||N<0)//if size greater than 50 or less than 0 then terminating the program..

   return 0;

   for(int i=0;i<N;i++)

   {

       cin>>array[i];//prompting array elements..

   }

   arr=reverse(array,N);//function call.

   for(int i=0;i<N;i++)

   cout<<arr[i]<<endl;//printing reversed array..

   cout<<endl;

return 0;

}

Output:-

5

4 5 6 7 8

8

7

6

5

4

Explanation:

I have created a function reverse which reverses the array and returns pointer to an array.I have also considered edge cases where the function terminates if the value of the N(size) is greater than 50 or less than 0.

8 0
3 years ago
A social media site violates its terms of service by selling information about its users
balu736 [363]
A company violating its terms of service by selling their user’s info is a violation of Digital Privacy
4 0
3 years ago
New friends??? if you want to be my new friend go follow my gram
lord [1]

Answer:

what you need

only friends

4 0
3 years ago
Read 2 more answers
Other questions:
  • When a crystal grows in unrestricted space, how does growth occur?
    14·2 answers
  • What term refers to a piece of software that interfaces with the hardware on your computer?
    10·2 answers
  • Write a program for playing tic tac toe. Two players take turns marking an available cell in a 3 X 3 grid with their respective
    15·1 answer
  • What is the output of the following program? #include using namespace std; class TestClass { private: int val; void showVal() {
    5·1 answer
  • What will the document.write() statement display, given the following code snippet? var scores = new Array[94, 90, 88, 82, 73, 7
    6·1 answer
  • A company has recently learned of a person trying to obtain personal information of employees illegally. According to which act
    15·2 answers
  • Your source data is of 50 GB. You make a full backup. Next week, once again you perform a full backup, but this time 10 more GB
    10·1 answer
  • The exploitation of a buffer-overrun vulnerability in an application will MOST likely lead to:_________
    15·1 answer
  • Write a program that asks the user for the name of a text file. The program should display the first 10 lines of the file on the
    6·1 answer
  • Why does a crane need to rotate/swivel​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!