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 types of services are found in the CBD?
Lisa [10]
It welcomes opportunities to deliver credentials for the provision of maintenance and maintenance management services
8 0
3 years ago
Suppose a fox in a food web feeds only on rabbits, squirrels, mice and birds, all of which feed exclusively on plant material. A
Illusion [34]

Answer:

square metres of plant materials required to support the fox = 3650 m²

Explanation:

From the given information:

the daily caloric requirement of the fox = 800  

In a year, we have = 800 kcal × 365 /year = 292,000 kcal/year

Also, only 10% of the energy at a particular trophic level can be passed onto the next.

the net productivity of the plant material = 8000 kcal/m²/yr

So, using 10% of energy at a particular level, the fox only need 80 kcal/m²/yr

The objective is to determine in square meters, how many materials are required to support the fox.

square metres of plant materials required to support the fox = \dfrac{292,000}{80}

= 3650 m²

7 0
3 years ago
I gave you the answer❤️.
mezya [45]
Thank you for the answer:)
5 0
2 years ago
the perimeter of rectangle is 66 cm and the width is half of its length.What are the length and the width of the rectangle?
nikitadnepr [17]
2W+2L=66
W=1/2L

2(1/2L)+2L=66

Simplifies to L+2L=66
Simplifies to 3L=66
Or L=22.

If W=1/2L, then W =1/2(22).
W=11.

To check our work, 2W+2L=66.
2(11)+2(22)=66.
22+44=66
66=66 Check.
5 0
3 years ago
Denmark is a good example of a nation-state because...
d1i1m1o1n [39]
<span>Denmark is a goo example of a nation-state because nearly all Danes speak Danish and live in Denmark. So in this case the correct answer would be C. Nearly the entire population are ethnic Danes who speak Danish.</span>
3 0
3 years ago
Other questions:
  • Technician A says that a ratio is a comparison between two values. Technician B says that in a compression ratio, the main value
    5·1 answer
  • Which researcher went around the world, testing people from various cultures on their ability to identify pictures of facial exp
    14·1 answer
  • Match each force with the correct description. 1. a force that opposes motion electrical force 2. equal and opposite forces appl
    11·1 answer
  • A/an_is used to check for variable voltage output from an ignition sensor or computer.
    15·2 answers
  • Почему Бэла не отказалась от веры
    15·1 answer
  • Compare and contrast the environmental consequences of reliance on coal with reliance on petroleum.
    5·1 answer
  • AP English assignment, write a 1 page typed response in which you address the rhetor's claim and your opinion on it. I'm not the
    7·1 answer
  • Is all of this correct and how do I color it?
    14·1 answer
  • A business issued a 90-day, 5% note for $10,000 to a creditor on account. The company uses a 360-day year for interest calculati
    8·1 answer
  • Which of the following is NOT one of the methods Krakauer used to research his subject?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!