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
Nikolay [14]
3 years ago
13

In a certain game, the integer variable bonus is assigned a value based on the value of the integer variable score.

Advanced Placement (AP)
2 answers:
Bingel [31]3 years ago
5 0

Answer:

See Explanation

Explanation:

The options are not properly presented; hence, they can't be used to answer this question

First, we need to analyze the conditions:

  • score > 100 implies bonus = 2 * score
  • score between 50 and 100 implies bonus = score
  • score < 50 implies bonus = 0

Writing the above as programming instructions, we have:

if(score > 100){//This represents the first condition

bonus = 2 * score;

}

else if(score >=50 && score<=100){//This represents the second

bonus = score;

}

else{//This represents the last condition

bonus = 0;

}

<em>Note that, we assume that all variables have been declared</em>

<em>The comments (//) were used for explanation purpose</em>

marishachu [46]3 years ago
4 0

Answer:

A and D

Explanation:

In a certain game, the integer variable bonus is assigned a value based on the value of the integer variable score.

If score is greater than 100 bonus is assigned a value that is 10 times score

•If score is between 50 and 100 inclusive, bonus is assigned the value of score.

If score is less than se, bonus is assigned a value of 0

Which of the following code segments assigns bonus correctly for all possible integer values of score?

Select two answers

Answer : A and D

You might be interested in
What impact does gerrymandering have on a democracy?
olga55 [171]

Answer:

Two principal tactics are used in gerrymandering: "cracking" (i.e. diluting the voting power of the opposing party's supporters across many districts) and "packing" (concentrating the opposing party's voting power in one district to reduce their voting power in other districts).  Gerrymandering means to draw congressional districts to the advantage of the political party that controls the State's legislature. This is a tactic that does not give equal representation to minority groups in the Congress.

Explanation:

hope this helps :D pls mark brainliest :D

4 0
2 years ago
Marta took her dog, roxy, to the dog park to play. the park was crowded that day with lots of dogs and owners.
stira [4]

The principle which allowed Marta to find her dog Roxy is known as an: d. absolute threshold.

<h3>What is an absolute threshold?</h3>

An absolute threshold can be defined as the smallest (lowest) level of stimulus such as light, touch, sound, etc., that can be detected by a living organism, usually half the time.

In this scenario, a principle which allowed Marta to find her dog Roxy amid all of the other barking dogs is known as an absolute threshold.

Read more on absolute threshold here: brainly.com/question/15301528

#SPJ1

7 0
2 years ago
Based on your knowledge of engine components, what type of engine component or system appears to be shown in Figure A-16? A. A r
Veronika [31]
I don't see the picture so i can't answer your question
5 0
3 years ago
When supply equals demand:
sdas [7]

Answer:

market \: equilibrium \: occurs \\ thank \: you

5 0
2 years ago
What is relocation diffusion​
Jlenok [28]

Answer:

Relocation diffusion is when  an idea spreads to a new location by a person moving for example corona it spreaded to America cuz a person brought it here

Explanation:

5 0
2 years ago
Other questions:
  • Cloud computing helps to address
    5·1 answer
  • What are SOME of your goals about graduating collage?
    9·1 answer
  • Every piece of content covered in class will be on a unit test<br> True or False
    14·2 answers
  • Jason hangs sheetrock for a local contractor. His job requires him to hang the sheetrock overhead on ceilings. What type of ergo
    10·2 answers
  • If blank did not exist a person could spend an indefinite period of time in jail waiting for their case to go trial
    9·2 answers
  • All of the following are advantages of participation in community service and extracurricular activities except
    7·2 answers
  • The distribution of actual weights of 8-ounce chocolate bars produced by a certain machine is Normal with mean 8.1 ounces and st
    5·1 answer
  • In each question,line k is parallel to l, and line t intersects k and l. Based on the diagrams, which statement is true?
    13·1 answer
  • A quick way to check the evaporator for leaks is to remove the
    12·1 answer
  • What happened in the Scopes Monkey Trial?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!