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
Compare and contrast what impact does genetics have on happiness?
dmitriy555 [2]

Answer with Explanation:

<em>Genetics' influence on the happiness</em> of a person has long been studied. Some people say that the genes of a person affects the person's mood. For example, "5-HTTLPR" is a gene that is regarded to be connected to depression. This is why it is called<u> "the depression gene."</u> It is also associated with sleep disorders like "insomnia." When someone has trouble sleeping, it disrupts his way of life thereby affecting his happiness.

On the contrary, the genes exhibit themselves according to external environments. This is also one reason why a person's happiness may also be determined by his<em> success in life, material possession, relationships with people and so on.</em> So, a person's situation in life partly influences his happiness.

4 0
3 years ago
Shannon has been a member of the newspaper club for 2 years and attends writing shops in her free time. Which career choice shou
dimaraw [331]

Because she has been a member of the newspaper club for 2 years and attends writing workshops in her free time she should consider exploring a career in Journalism.

4 0
3 years ago
HELP!!! :0
Free_Kalibri [48]
Manufacturers try to locate their factors as close as possible to their inputs and markets to cut transportation cost. Other issues could be the availability of raw material, land, water, labor, power, capital, transport, and market. Examples of these manufacturers and/or industries would be the market for construction workers or “factor markets”. Industries and/or companies such as McDonald’s and other fast food chain, rely on these factor markets for materials to continue to expand and increase the economic growth and success.

5 0
4 years ago
Work activities that principle have
kaheart [24]
Setting good examples, keeping everything in order, making sure every thing stays in line, and provide work for the teachers to teach the students
7 0
3 years ago
The equation of the normal line of the function f(x) = x + 2 at x = -1 is
finlep [7]

Answer:

y=-2x+1.

Explanation:

you can youce a cowculater

7 0
3 years ago
Other questions:
  • 3 points of use of X-rays ??
    13·2 answers
  • Part A: Conduct five trials using the following table of random digits: (5 points) 96299 07196 98642 20639 23185 56282 69929 141
    8·1 answer
  • Who is the intended audience of Harrison Bergeron
    5·1 answer
  • Would You Rather......Only use Microsoft Teams...or......Only use Discord....?
    8·1 answer
  • How do you interpret the mean of a sampling distribution of a difference in sample proportions?
    5·1 answer
  • Brain riddle! Right answer gets brainliest!
    10·2 answers
  • In the first sentence of the passage, the clause set off by dashes (“she adopted . . . sell”) serves primarily to explain Rowlin
    12·1 answer
  • Ms. A is paid on the last weekday of each month. Which schedule of reinforcement is Ms. A experiencing?
    11·1 answer
  • Which type of migration best describes a move from the suburbs to a nearby city?
    7·2 answers
  • In “Letter from a Birmingham Jail,” King argues a law is unjust when:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!