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
Softa [21]
2 years ago
10

The algorithm below simulates rolling a regular 6-sided die twice. Consider the goal of determining if the sum of the values of

the two rolls is odd or even.
Step 1: Using a random number generator, get a value between
1 - 6 inclusively
Step 2: Remember that number
Step 3: Repeat steps 1 and 2
Step 4: Add the two remembered numbers together
Step 5: Multiply that sum by 10
Step 6: Divide the result of that multiplication by 2


What conclusions can be made with regard to what we are trying to determine? Select two answers:

Group of answer choices

If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even

If the last digit of the value found in step 6 is 5, then the sum is odd

If the value found in step 6 is 10, 30 or 50 then the sum is odd

If the value found in step 6 is not 20, 40, 60, 80, 100 or 120 then the sum is odd
Advanced Placement (AP)
1 answer:
FrozenT [24]2 years ago
7 0

Algorithms are used to simulate real programs.

The true conditions of the algorithm are:

  • <em>(a) If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even </em>
  • <em>(b) If the last digit of the value found in step 6 is 5, then the sum is odd</em>

First, we analyze the algorithm.

Assume the outcomes of the two rolls are x and y

<u>Step 4: Calculate sum</u>

Sum = x + y

<u>Step 5: Multiply Sum by 10</u>

Result =  Sum \times 10

<u>Step 6: Divide by 2</u>

Result =  Sum \times 10 \div 2

Result =  Sum \times 5

This means that, the algorithm simply multiplies the sum of the rolls by 5

<u>Option (a): If step 6 is 10, 20, 30, 40, 50 or 60, then sum is even</u>

Make Sum the subject in Result =  Sum \times 5

Sum = \frac{Result}{5}

When 10, 20, 30, 40, 50 and 60 are divided by 5, the result is:

Sum = 2, 4,6,8,10, 12

All the above numbers are even number.

This means that, the sum is an even number.

<em>Hence, (a) is true</em>

<u>Option (b): If the last digit of step 6 is 5, then the sum is Odd.</u>

The possible sum of two rolls of dice, where the last digit ends in 5 are:

5, 15, 25, 35

When each of these are divided by 5, the result is:

Sum = 1,3,5,7

It is not possible to have a sum of 1 for two rolls

So, we have:

Sum = 3,5,7

All the above numbers are odd.

This means that, the sum is an odd number.

<em>Hence, (b) is true</em>

So, we can conclude that the true conditions are:

(a) and (b)

Read more about algorithms at:

brainly.com/question/17780739

You might be interested in
I need help with AP psychology pls
Illusion [34]
Send me the question and I can answer it- there is no picture
6 0
3 years ago
Read 2 more answers
Which temperature most likely corresponds to the asthenosphere?
blsea [12.9K]
The answer is c because the numerical expression correction is 28
6 0
3 years ago
Preschool children figure out problems mainly because?
Firlakuza [10]
Problems are extremely basic?
The teacher tells them the answer?
Is this multiple choice or something, help me out here

4 0
3 years ago
Read 2 more answers
Briefly explain one example of targets of repression in American society, stemming from American involvement in World War I.
Maurinko [17]
Briefly explain one example of targets of repression in American society, stemming from American involvement in World War I.
3 0
3 years ago
Read 2 more answers
PLS HELP IM RUNNING OUT OF TIME!!!
Dmitrij [34]

Answer: 1. They shake the ground

               2.  They travel through solids

                3. They vibrate from side to side

Explanation: Hope this helps!

6 0
3 years ago
Other questions:
  • Mary is an authorized user on her parents' credit card. What may happen if Mary doesn't use the card in a responsible way?
    11·1 answer
  • What kind of vegetable do you get by crossing a breed of dog with a baking ingredients
    6·1 answer
  • 1.The development of both males and females is essentially identical except for the development of the
    15·2 answers
  • Answer a funnier one and you get BRAINLIEST :)
    15·1 answer
  • Foreign Policy Analysis
    15·1 answer
  • Piuto
    15·1 answer
  • 4. Suppose the house in question 3 is located in Cleveland where the annual average solar flux is 160 W/m2 2. If 10 m2 of solar
    13·1 answer
  • Hai! I am looking for a frined must be anti-trump supporting lgbtq+ and blm and liking BTS
    12·2 answers
  • Given the quantitative easing measures put into place by the Federal Reserve, what do you believe will be the impact on the valu
    10·1 answer
  • What term describes the continuation of a visual sensation after removal of the stimulus?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!