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]
3 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]3 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
DES: Group of answer choices A) is a commonly used symmetric encryption B) algorithm that was developed in the mid-C) 1970s was
OLEGan [10]

DES is a commonly used symmetric encryption

A) is a commonly used symmetric encryption

<u>Explanation:</u>

DES stands for Data Encryption Standard. It is a symmetric key algorithm and is used for encrypting electronic data. It was developed in 1975. DES is one of the oldest encryption standards to be used in the industry.

The algorithm takes 16 rounds of permutations in order to encrypt data. But now, with the advent of technology, as new algorithms have been designed and put in use, DES is less preferable.

In the process of key generation, some keys generated sometimes turn out to be weak and hence are prone to attacks. If not for the weak keys generation, DES works perfectly fine and is an effective algorithm to encrypt data.

6 0
3 years ago
Question 4 (Multiple Choice Worth 5 points)
pentagon [3]

Answer:

A. append()

Explanation:

I don't know python fully but i do know what stuff means

Print: display text

Main: basically the roots of the entire code

Sort: it's in the freaking name

so crossing out 3 of the 4 its safe to assume its append.

4 0
3 years ago
NEED HELP ASAP
belka [17]

Answer:

Movie editing and Sound Editing

Explanation:

Gaming tool will not help edit video and audio that the production crew have shot. Media player will simply just play the video and not allow them to edit it. Animation tool isn't useful unless they plan on doing SFX.

8 0
3 years ago
Read 2 more answers
How do i use a computer (i'm 99999 years old)
AlekseyPX

Answer:

grandma?

Explanation:

is it you?

6 0
3 years ago
Read 2 more answers
Which key should you press to leave the cell as it originally was?
GREYUIT [131]
The correct answer should be A. Delete
4 0
3 years ago
Other questions:
  • ____ deals with ensuring that data is protected against unauthorized access, and if the data are accessed by an authorized user,
    10·1 answer
  • In the RGB model, which color is formed by combining the constituent colors?
    14·2 answers
  • What is the term for sending emails that imitate legitimate companies?
    6·2 answers
  • You recently discovered that Marketing1 can connect to Admin1, and Admin1 can connect to Marketing1, but neither of these comput
    11·1 answer
  • Information from the system that is used to make modifications in the input, processing actions, or outputs is referred to as: G
    9·2 answers
  • Among the following, which is the best protection against ransomware?
    8·1 answer
  • Which of the following are not parts of a message? Select all that apply.
    12·1 answer
  • Select the correct answer.
    6·1 answer
  • The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sumof the previous two, for example: 0, 1
    11·1 answer
  • What are the peripherals of a computer ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!