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
FIND THE WAYS TO IMPROVE THE POSITIVE ATTITUDE AND HOW IT WILL HELP IT IN YOUR STUDIES?
ladessa [460]

Answer:

Positive Attitude And How It Can Help

Explanation:

In Many Ways Can A Positive Attitude Help With Your Studies.

1. Simply, just by putting effort and deciding to yourself that you can do it will put your body and mind-set to work.

2. It's Always Good To Keep Your Body In A Balanced Form. What I meant by this is that many people can get stressed and will become exhausted and not be able to catch up with what they are doing.

3. Can Also Change You. In a good way, just by making a daily routine of being on check, feeling good, and much more, your helping yourself out by being a good leader to make your body healthy, and be more concentrated in what you do.

4. Won't Give Up So Easily, I, Myself Haven't Given Up On My Work Or Studies Just By Being Positive. You feel good when you finish your work, and you might even finish quicker.

7 0
3 years ago
Explain how economic restructuring following the end of communism has resulted in higher unemployment in some lander.
Andru [333]
Friedman and Johnson (1997) show that for a wide range of dynamic optimization problems, supermodularity is both necessary and sufficient for monotone static results. In the present context, this implies that our supermodular model requires the minimum set of assumptions to obtain monotonicity in the optimal decision variables.

2

The evidence presented here needs to be supplemented with information about inter- and intrafamily income transfers. This issue was addressed in a follow-up survey, but analysis of the results is not yet complete.
7 0
3 years ago
What always happens when two objects interact?
kozerog [31]

Answer:

Force

Explanation:

A description and measurement of the interaction between the two objects.A push or a pull.Forces always exist in pairs.

7 0
3 years ago
PLEASE HELP MEEEEEEEEEE
marysya [2.9K]
I think the right one is c
6 0
3 years ago
Sagutan Ang mga katanungan tungkol sa artikulong binasa​
bazaltina [42]

nakalimutan mo po i post ang tanong plese post the question para maansetan na min

8 0
3 years ago
Other questions:
  • How will an increase in the percentage of older americans affect the healthcare field
    8·2 answers
  • In what ways is globalization of culture apparent in the landscape ?
    5·1 answer
  • Which of the following is an example of a listening style?
    7·2 answers
  • Which temperature most likely corresponds to the asthenosphere?
    6·1 answer
  • Why is audience awareness important when writing instructions?
    11·1 answer
  • Which of the following outcomes is a benefit of conventional agriculture?
    8·2 answers
  • Population <br><br>what is the total population of Nepal ​
    9·2 answers
  • Which country would be MOST LIKELY to educate young mother’s on parenting?
    10·2 answers
  • If a dozen apples have a mass of 2.0kg and .2 bushel is 1 dozen apples, how many bushels of apples are in 3.1kg of apples?
    13·1 answer
  • HELP!! AP Psychology!!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!