contestada

In a certain video game, the variable maxps represents the maximum possible score a player can earn. the maximum possible score depends on the time it takes the player to complete the game. the value of maxps should be 30 if time is greater than 120 and 50 otherwise.

Respuesta :

The code segment that best sets the value of maxPS is the first one because it includes complete and correct information.

What is a code segment?

As indicated by its name, it refers to a small section in the program's executable instructions.

How to select the best code segment?

The code segment should include complete and accurate information. In this case, we know:

  • The maxPS is directly related to time.
  • The maxPS is usually 50.
  • This condition is not Met if the time is over 120 which would lead to 30 maxPS.

Based on this, the best code segment is A because this accurately shows the maxPS is 50 except when time is over 120 as this changes the maxPS to 30.

Note: This question is incomplete because the options are missing; below I attach the missing section:

  • Which of the following code segments correctly sets the value of maxPS based on the value of time?

Learn more about code segment in: https://brainly.com/question/26683418

Ver imagen michell96
Ver imagen michell96
Ver imagen michell96
Ver imagen michell96
ACCESS MORE
EDU ACCESS
Universidad de Mexico