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
WILL GIVE BRAINLIEST!!! NEED LATIN HELP!!!
arlik [135]

Answer:

from making war upon the Romans will be against the Greeks, the Ligurians,

girls from Greek sailors are trained to fight with swords

be given to the young men who were beautiful maidens of the small gifts of great congregation, from

The queen is loved by an evil witch Kingdom

Explanation:

8 0
4 years ago
Substance abuse does all of the
serious [3.7K]

Answer:

D

Explanation:

5 0
2 years ago
Based on your knowledge of engine components, what type of engine component or system appears to be shown in Figure A-16? A. A r
Veronika [31]
I don't see the picture so i can't answer your question
5 0
3 years ago
Below is a summary of the educational degrees of four applicants to a hospital. The hospital is looking for a Radiologist, an Or
neonofarm [45]
<span>Applicant 4 is qualified to be a Radiologist, applicant 3 is qualified to be an Orderly, and applicants 1, 2, and 4 are qualified to be Biomedical Engineers.</span>
6 0
3 years ago
Read 2 more answers
If my bones were to be liquid how would my body act
n200080 [17]
You would be jello like. A blob. No structure
6 0
3 years ago
Other questions:
  • The table above shows aggregate statistical data for Country X in 2018. Assume the GDP deflator is 160.
    5·1 answer
  • Identify one difference between mayan religion and the religion in ancient sumer
    9·1 answer
  • Why did she leave I really liked her she was the one
    7·2 answers
  • Consider some things you would like to accomplish in your life, or some things you have already accomplished. List at least thre
    7·2 answers
  • The following diagram projects the age structure of the United States for the year 2050. Explain how the diagram would likely ch
    11·1 answer
  • How many McDonald's are there in the whole world?
    13·1 answer
  • Do students that are planning to apply to an early college high school need to pass an SAT/ACT to get in?
    10·2 answers
  • Free points c cds cxcxcxvc
    11·2 answers
  • Any cu.te gi.rl here who wanna join me.e t​
    13·2 answers
  • Explain at least two factors that contribute to the development of aggression. Include at least one strategy that can be used to
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!