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
8. A good example of a monolingual country
Nadya [2.5K]
The answer is most likely A)
5 0
3 years ago
Which of the following describes a situation in which the total distance a baseball player travels is 0 meter from his starting
pshichka [43]

Answer:

3

Explanation:

4 - 3 = 1 + 3 = 4 - 3 = 1 + 3 = 4 - 4 = 0 + 3 = 3

4 0
2 years ago
I'm feeling generous take all my points. Also if possible could you look at the questions I asked and answer them? Thank you!
jek_recluse [69]

Answer:

Where are the questions?

Explanation:

7 0
3 years ago
Read 2 more answers
Earth is closet to the sun during the month of January
nalin [4]

True. Earth is closest to the sun on January 2-3.

Not sure what your asking but I hope this helped!

7 0
3 years ago
How can teens model good physical fitness to other teens in their neighborhood?
DochEvi [55]

Answer:

c

Explanation:

it's the only option that shows physical activity

6 0
3 years ago
Read 3 more answers
Other questions:
  • Which of the following countries has the freest market system
    15·2 answers
  • Which of these is NOT a criticism of the concentric zone model?
    11·1 answer
  • The first electronic stock market is known as:
    13·1 answer
  • ..........................
    6·2 answers
  • Which of the following is a word that refers to the solid, plastic layer of the mantle just below the lithosphere?
    13·1 answer
  • How would a die-out herbivore zooplankton impact the food web?
    10·1 answer
  • John owns three different auto repair shops. In 2016, Store A made a profit of $102,100, Store B made a profit of $200,500, and
    9·1 answer
  • Paano nakaapekto sa mga pilipino at sa ating kultura ang pananakop ng mga dayuhang amerikano? ​
    12·1 answer
  • 5. A major difference between the U.S. and other countries is?
    9·1 answer
  • A graph has quantity on the x-axis and price on the y-axis. The supply line goes through (60, 65), (75, 70), (100, 95). The dema
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!