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
Always include a citation when you use facts or statistics in a document. true or false
Temka [501]
True because you need to cite source of that fact
6 0
3 years ago
.......
Anika [276]

Answer: He drank 15 cups all together :)

4 0
3 years ago
Read 2 more answers
Read the following passage carefully before you choose your answers.
Kamila [148]

Based on the details given in the story, we can infer that Dorcas agrees to go because C: she believes that she brings whatever she needs most along with her.

<h3>What does the passage say about Dorcas?</h3>

We find out that Dorcas feels really bad about leaving because of the ties she has formed with people.

She however still felt that those ties and the people they tied her to, would stay with her as she moved on and these are what she needed the most. Every other thing she might need apart from these would be found wherever she goes.

In conclusion, option C is correct.

Find out more on short stories at brainly.com/question/1410153.

8 0
2 years ago
Which of these statements accurately describes the processes that move nitrogen through the nitrogen cycle?
Alekssandra [29.7K]

Answer: C. Ammonification occurs when Bacteria break down plants

Explanation:

The Nitrogen cycle is a biogeochemical cycle by which Nitrogen moves around the various ecosystems present on Earth in different chemical forms. Various processes enable this and one of those is Ammonification.

Ammonification is a process in which microorganisms like bacteria and fungi breakdown plant and animal biomass upon death and convert nitrogen in these organic specimen into inorganic ammonia or ammonium which is then converted to Nitrates by the Nitrification process.

8 0
3 years ago
In which of the following ways did the middle class differ from the working class in the late 1800s?
bija089 [108]
The answer should be A
4 0
3 years ago
Other questions:
  • Compare and contrast willam walkers goals, methods, and effectiveness to that of james k. polk's
    7·1 answer
  • If you enjoy working with children and teenagers, the __career cluster might be a good fit for you.
    13·2 answers
  • Prompt
    7·1 answer
  • To complete an associate's degree, a student typically has to complete approximately credit hours
    5·2 answers
  • List at least two additional things you should do to make the traffic stop go smoothly
    7·1 answer
  • Why does a car have 4 wheels?
    8·2 answers
  • Biologists estimate that a randomly selected baby elk has a 46% chance of surviving to
    15·1 answer
  • Which of the following is NOT one of the methods Krakauer used to research his subject?
    12·1 answer
  • Who wants points I guesss?
    8·2 answers
  • What is the ECPA? Choose the answer.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!