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
Predict how digital video will be viewed in the future. Step into the year 2028. How are people viewing digital video? Or have w
Nostrana [21]
<span>Google Glass was interesting; a personal screen overlaid onto the real world, with 'augmented reality' ideas. The Nintendo 3DS was the first 'no glasses' portable 3D system.

So I predict Google 3D Glasses with built in Dolby 9.1 sound emulation. </span>
4 0
3 years ago
Read 2 more answers
On an Android device, where can a user find the correct app to use to sync contacts and apps among devices?
12345 [234]
The user can use the Play store on there android device
3 0
3 years ago
Help please!! worth 10 pts! answer quick please!
WINSTONCH [101]

Answer:

it has helped the people of today by

1.helped the young generation with there homework

2.you can book an hotel through the internet

3.you can also book a plane ticket via the internet

4.it is easier to look to ur email message via the internet

4 0
3 years ago
Visual Basics: 1 ) Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments
Lemur [1.5K]

Answer:

visual basic: 1)

Module PHmodule

   Sub Main()

       'Creating a variable for each entity

       dim ph as double = 0.0, neutral,base,acid as boolean

       'Writing a line to show user what to do

       console.writeline("Enter the pH :")

       'Taking the value

       ph=console.readline()

       'using if & elseif statement for distingushing the values into correct catagories

       if ph<7.0 then

       neutral=false:base=false:acid=true

       elseif ph>7.0 then  

       neutral=false:base=true:acid=false

       elseif ph=7.0 then

       neutral=true:base=false:acid=false

       end if

       'Printing the result

       console.writeline(" Neutral :" & Neutral)

       console.writeline(" base :" & base)

       console.writeline(" acid :" & acid)

       'command for staying in the command prompt for reading the result

       console.readline()

   End Sub

End Module

visual basic: 2)

Module AGEmodule()

  Sub Main()

       'Creating a variable for each entity

       dim age,minors,adults,seniors as integer = 0

       'Taking age from user

       console.writeline("Enter the age")

       age=console.readline()

       'using if & elseif statement for checking the age differnce

       if age<18 then'

       minors +=1

       else if age>18 and age<64 then

       adults +=1

       else if age>64 then  

       seniors +=1

       end if

       'printing result

       console.writeline("minors="&minors)

       console.writeline("adults="&adults)

       console.writeline("seniors="&seniors)

       'command for reading the result  

       console.readline()

  End Sub

End Module

Explanation:

visual basic 1) it is very simple program which allow us to find if the substance is acidic, basic or neutral. we use sim statement for making a variable as double (gives value in decimal) which allow to take a value from the user through console.readline() command and then by using the if statement we apply the condition if the ph is less then, greator then or equal to 7.0 value. thus the program gives us the answer. console.writeline() command is used to print a command on the screen while console.readline() command let us read the lines until we press enter.

visual basic 2)a program which allow us to count and add number of persons according to their age. we use dim statement for creating the variable as integers in which we take the age from user and then after checking it through if statement we increment according to three categories i.e. minors, adults, seniors. the console.writeline() command allow us to print anything on screen and console.readline() allowus to take value while compiling.

thank you...

6 0
3 years ago
Dani needs to present a mathematical formula to his audience. How should he start the process of adding an equation to a slide?
bonufazy [111]

The principles of creating equations are the same in PowerPoint 2007 and later. Assuming Danny is using PowerPoint 2010, he will click on the insert tab then go ahead and choose the Equation in the symbols group. 

Dani will be able to click on the equation option and use the Equation Tools Design tab or click on the drop down arrow to view more equations






3 0
3 years ago
Other questions:
  • What are some of the causes for error 1921 when updating?
    11·2 answers
  • In Vista and Windows 7, the Appearance and Personalization option allows you to change the
    14·1 answer
  • What is the d/c b/n information rich and information poor society​
    13·1 answer
  • In needs analysis: Group of answer choices the costs of different physical network design alternatives are assessed the rate of
    10·1 answer
  • After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linkin
    10·1 answer
  • Priortization is an example of a skill that helps you reach long term goals because
    14·1 answer
  • Will economists be replaced by artificial intelligence?
    12·1 answer
  • Kinda strange, and im good
    11·2 answers
  • In PowerPoint, a picture might be a photograph, a shape you draw, a piece of clip art, or an illustration created using a graphi
    7·2 answers
  • You find a picture of a famous department store online that would be great to include in a project of yours. What should you do
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!