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
For social I need help❤️
nasty-shy [4]

Answer:

if we all work together we can make is world to be a better world.

Explanation:

8 0
3 years ago
Describe ONE example of Chinese culture tradition that withstood
Anna35 [415]
One example is Filial piety
8 0
3 years ago
What is the bully pulpit
umka2103 [35]
A public office or position of authority that provides its occupant with an opportunity to speak about any issue they please.
4 0
4 years ago
Read 2 more answers
One pound of bituminous coal contains 14,000 BTUs of energy. Suppose a coal-fired power plant needs 3,500 BTUs of heat to produc
Rainbow [258]

Answer:

\boxed{\text{4 oz}}

Explanation:

1. Energy needed

\text{Energy} = \text{1 kWh} \times \dfrac{\text{3500 BTU}}{\text{1 kWh}} = \text{3500 BTU}

2. Mass of coal needed

\text{Mass of coal} = \text{3500 BTU} \times \dfrac{\text{1 lb coal}}{\text{14 000 BTU}} = \text{0.25 lb coal} = \textbf{4 oz coal}\\\\\text{It takes $\boxed{\textbf{4 oz of coal}}$ to produce 1 kWh of electricity}

5 0
3 years ago
How might Islamic scholars have used Galen’s treatise to further innovations in medicine?
Savatey [412]

Answer:

the answer is b

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • What does planet 9 look like?
    9·2 answers
  • What is the multiverse?
    15·2 answers
  • Which individuals identify as LGBTQ? Select three options. 1. gay male 2.queer female 3. bisexual female 4. heterosexual male 5.
    10·1 answer
  • Air pollution from a power plant is being monitored for levels of nitrogen dioxide and ground-level ozone. The levels are measur
    12·2 answers
  • The Korean War (1950–1953) marked the first time that
    7·2 answers
  • What are the OSHA violation types?
    13·1 answer
  • Imagine that it is 1831 and you have decided to join Mazzini's Young Italy.
    10·1 answer
  • Match the letters to the numbers please. Put it down below the comments and please do not put any links please. This is for an e
    12·1 answer
  • Who is the 1st president
    8·2 answers
  • Yo, what's syphilis?????
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!