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
vfiekz [6]
4 years ago
12

The code below is supposed to display the name and score for the student with the highest score one time before the program ends

. It is displaying Jim as the student with the highest score. It is displaying the highest score of 95. Unfortunately, Jim does not have a score of 95. Correct the following code:
Declare String students[SIZES] = {"Jen", "Jon", "Jan", "Joe", "Jim"}
Declare Integer scores[SIZES] = 70, 85, 72, 95, 90
Declare Integer index Declare Integer highest = scores[0]
Declare Integer highest Name = " " For index = 0
To SIZES //Assume that this translates to For (index = 0; index <= SIZES, index ++)
If scores[index] > highest then highest = scores[index]
End Of highestName = students[index]
End For Display "

The name of the student with the highest score is ", highest Name Display "The highest score is ", highest
Computers and Technology
1 answer:
Alona [7]4 years ago
7 0

Answer:

Modify

<em>If scores[index] > highest then highest = scores[index] </em>

<em>End Of highest</em>

<em>Name = students[index] </em>

<em>End For Display</em>

to

<em>If scores[index] > highest then highest = scores[index] </em>

<em>Name = students[index] </em>

<em>End Of highest</em>

<em>End For Display </em>

<em />

Explanation:

In the code, you posted the code segment that gets the name of the student with the highest score is outside the if condition that determines the highest.

To make correction, we only need to bring this code segment into the loop.

<em>See Answer</em>

You might be interested in
(tco 9) the most common protocol(s) used for sending and retrieving e-mail is(are) _____.
Readme [11.4K]
SMTP = Simple Mail Transport Protool
5 0
4 years ago
An action that makes an employee uncomfortable in any way is classified as
skelet666 [1.2K]

This is a just a guess, and this doesn't belong in this section but... Maybe hostile work environment?

8 0
4 years ago
Which programming languages are the best choices for desktop applications? Select 3 options.
slega [8]
The three are Python c and html
5 0
3 years ago
Read 2 more answers
8.5 Edhesive Code Practice
Lynna [10]

Answer:

Check explanation

Explanation:

#Print original quote

twainQuotes = ["I have never let my schooling interfere with my education.",

"Get your facts first, and then you can distort them as much as you please.",

"If you tell the truth, you don't have to remember anything.",

"The secret of getting ahead is getting started.",

"Age is an issue of mind over matter. If you don't mind, it doesn't matter. "]

print(twainQuotes)

#Sort and print

twainQuotes.sort()

print(twainQuotes)

#Insertion of quote, sort, then print

twainQuotes.extend(["Courage is resistance to fear, mastery of fear, not absence of fear."])

twainQuotes.sort()

print(twainQuotes)

mark as brainliest pls hehe

8 0
3 years ago
As a ______________ you must be able to show that you know what to do to keep food safe
Natali [406]

         

<h2>\beta\beta \beta \geq \neq</h2>
6 0
4 years ago
Other questions:
  • How many results are shown by default when using a Top or Rare Command?
    13·1 answer
  • What is most likely kept in as database
    15·1 answer
  • Which of these is NOT a reason why you would print handouts of your presentation?
    14·1 answer
  • Mark is the network administrator in his building and is responsible for training all the new technicians on various troubleshoo
    7·1 answer
  • Click this link to view O NET'S Wages and Employment section for Film and Video Editors.
    11·2 answers
  • Impact of computer in society, using relevant examples​
    13·1 answer
  • The function of an audio mixer is to _____. layer audio tracks at their ideal volume combine, control, and route audio signals f
    6·1 answer
  • I'll give brainlyist
    9·2 answers
  • Everyone say bye to brainly cause I’m reporting it for being against the law
    10·2 answers
  • you have just finished developing a new application. before putting it on the website for users to download, you want to provide
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!