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
Electric vehicles make up a very small proportion of the overall car market, but by how much has that proportion increased? Inde
Minchanka [31]

Given Information:

The proportion of electric cars sold in 2012 = p₁ = 0.1%

The proportion of electric cars sold in 2016 = p₂ = 0.5%

Sample size of electric cars in 2012 = n₁ = 10,000

Sample size of electric cars in 2016 = n₂ = 20,000

Confidence level = 95%

Required Information:

Change in the proportion of electric cars sold from 2012 to 2016 = ?

Answer:

Change in the proportion of electric cars sold from 2012 to 2016 = (0.284%, 0.516%)

Step-by-step explanation:

The change in the mean is given by

\mu = p_2 - p_1\\\\\mu = 0.005 -0.001\\\\\mu = 0.004\\\\

The change in standard error is given by

SE = z\cdot\sqrt{\frac{p_1(1 - p_1)}{n_1} + \frac{p_2(1 - p_2)}{n_2} }

Where z is the value of z-score corresponding to 95% confidence level.

z_{\alpha/2} = 1 - 0.95 = 0.05/2 = 0.025\\\\z_{0.025} = 1.96\\\\

SE = 1.96\cdot\sqrt{\frac{0.001(1 - 0.001)}{10,000} + \frac{0.005(1 - 0.005)}{20,000} } \\\\SE = 1.96\cdot 0.00059\\\\SE = 0.00116\\\\

The change in the proportion of electric cars is

\mu \pm SE \\\\0.004\pm 0.00116 \\\\(0.004-0.00116) \: and \: (0.004-0.00116)\\\\(0.00284, \: 0.00516)\\\\(0.284\%, \: 0.516\%)

Therefore, we are 95% confident that the change in the proportion of electric cars sold from 2012 to 2016 is between (0.284%, 0.516%)

5 0
3 years ago
What was the role of mankind during the renaissance?
Harlamova29_29 [7]
To learn never stop and liberate as much as you can
6 0
3 years ago
Read 2 more answers
Which of the following statements concerning the states of the pacific rim is the most accurate?
tester [92]
A because it gives historical details
7 0
3 years ago
In a long response explain how symbols can be used to influence audience (reader,viewer,listener) reaction?
anastassius [24]
Here using symbols demonstrates your feelings, and so the reader/viewer/listener and understand the topic more clearly and their reactions will be more likely as you think
5 0
3 years ago
if someone was in a race and they passed the person in 2nd place and was in 3rd place, what place are they in, now?
Nonamiya [84]

Answer:

2nd place

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the difference between vap and vep? explain how these measures may (or may not) affect our thinking about the apparent d
    11·1 answer
  • Why do all odd binary numbers end in 1
    7·1 answer
  • When you file your tax return______?
    13·1 answer
  • (This is PC, I don't know what to put it in as a subject.)
    12·2 answers
  • Francesca is one of the twelve jurors in an ongoing criminal trial. After listening to both the prosecution and defense, it is t
    9·1 answer
  • true or false: when it comes to the concept of power, the more power a government has the greater the capabilities of that gover
    12·1 answer
  • Write a sentence using proper and common nouns for the following pictures below​
    6·1 answer
  • Please give a clear answer, GEOMETRY STUFF!! It's not middle school but it's math
    14·2 answers
  • Darron is working on his algebra homework and needs to draw a linear function.
    10·2 answers
  • Pleassseeee hlep meeeee
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!