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]
3 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]3 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
Which of the following is an example of a cycle theme in science?
vaieri [72.5K]

Answer:

fourth option is best or relationship between plants and animals

5 0
3 years ago
Read 2 more answers
How long will a beneficiary receive payments under the single life settlement option
Vladimir [108]

rest of their life

The Single Life Option can provide a single beneficiary income for the rest of his/her life. Upon the death of the beneficiary, the payments stop.

quizlet

4 0
3 years ago
The acceleration, in meters per second per second, of a race car is modeled by A(t)=t3−152t2+12t+10, where t is measured in seco
iren2701 [21]

Answer:

  10.237 m/s²

Explanation:

The maximum acceleration will be at one end of the interval, or at a turning point in the interval. The turning points can be found where the derivative of acceleration is zero

  A'(t) = 3t^2 -304t +12

The quadratic formula will tell the zeros of this.

  t = (304±√(304^2 -4(3)(12)))/(2(3)) = (304 -√92272)/6 = (152 -√23068)/3

  t ≈ 0.0394891

Then the maximum acceleration is ...

  A(0.0394891) ≈ 10.23690 . . . . m/s^2

__

<em>Additional comment</em>

The maximum magnitude of acceleration is at t=6, where acceleration is ...

  A(6) = -5174 . . . . m/s^2

This is more than 500 g's in the negative direction, so the race car is not expected to survive that long.

__

The attached graph shows the acceleration curve for positive acceleration. The acceleration continues to decrease to a minimum of -5174 m/s^2 at the right end of the interval [0, 6].

6 0
3 years ago
Read 2 more answers
For you, a job where things are predictable is better than a job where they are not predictable.
White raven [17]
I would say a job where things aren't predictable would be better. When your job is unpredictable you never know what the next day holds for you and it creates excitement and makes you curious about what will happen next. You don't get stuck in the same old routine and get bored with your job.
5 0
4 years ago
Has the number of states increased or decreased in the last 100 years?
aleksley [76]
States in the last 100 years have increased, hope this helps :)!!

7 0
3 years ago
Other questions:
  • Equilibrium is always attainable but not desireable.Explain?
    7·1 answer
  • why would an unpredictible flooding of the Nile cause political and social upheaval? (skill - causation free response)
    9·1 answer
  • Worldwide, there are about how many species of blowflies?<br><br> 1<br> 10<br> 100<br> Over 1000
    11·2 answers
  • The asthenosphere is made of _____ rocks and minerals
    13·1 answer
  • 1.¿Cuál es la importancia de las empresas para la sociedad?
    7·1 answer
  • FLINT WATER QUESTIONS PLEASE ANSWER ALL ;) &lt;3
    15·1 answer
  • I'm honestly looking for advice on a personal matter while I blow off class
    8·2 answers
  • Why were the Articles of Confederation unable to provide stability for the United States?
    5·2 answers
  • How do I read this image?
    5·1 answer
  • 4. Why does Jim Waldman oppose drilling for oil in the Arctic National Wildlife Refuge?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!