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
Need help please!!!its a test
Fed [463]
The third answer is correct because if they can fuse into a hybrid then they both can be a Species
4 0
3 years ago
What are some advantages of having a high credit score?
attashe74 [19]

If you have a good credit score, you'll almost always qualify for the best interest rates, and you'll pay lower finance charges on credit card balances and loans. The less money you pay in interest, the faster you'll pay off the debt and the more money you have for other expenses.

Hope This Helps!      Have A Nice Day!!

6 0
3 years ago
Read 2 more answers
Anong mga rehiyon sa asya ang may magkakatulad na klima?Ang may natatangingklima?Bakit?​
ra1l [238]

Answer:

Africa,india,indonisia,maliysia

Explanation:

Africa,india,indonisia,maliysia mag kapariha tayo ng clima dahil ang ating bansa ay nasa pacific nasa aquetor ang ating bansa at iba PA.

6 0
3 years ago
Read the sentence from the article: "it's drought-proof, that's one of the most important" things, said water-use expert bob yam
bonufazy [111]

The ability of the local natural and human production resource base to supply a desirable amount of food, drinking water, livelihood resources during a drought is what is meant by "drought proofing" a place.

The main factor behind agricultural loss on a global scale is drought, which inserted a serious risk to the availability of food. When it comes to creating crops that can produce large yields in water-limited settings, plant biotechnology is now one of the most promising topics.

The primary drought stress response pathways have been identified through research on complete Arabidopsis thaliana plants, and numerous drought resistance genes have already been inserted into crops. Since most plants that have improved drought resistance have so far had lower crop yields, new strategies to decouple drought resistance from plant growth are still needed.

To know more about inserted click here:

brainly.com/question/8119813

#SPJ4

4 0
1 year ago
You should check your windshield wiper fluid level ___________
enyata [817]
I would say every 6 months.
 
..But it also makes sense to check it every month.

Have a Blessed day :)
8 0
3 years ago
Read 2 more answers
Other questions:
  • John hit his neighbor's fence while backing his vehicle out and caused $500 worth of damage. the insurance company paid for $100
    13·2 answers
  • Which of the following is a good rule to follow when using business cards? a. Write notes about the people you meet on the back
    12·2 answers
  • The Watchmaker analogy. (philosophy)
    7·2 answers
  • 20000000000000000 times 40000000000000000000
    15·1 answer
  • Help!! I need to write a report on this Spider-Man comic I'm reading. What's the name of the superhero with the red and blue sui
    13·2 answers
  • we are taught that the universe goes on forever and doesn’t end but, we are also taught the universe is constantly expanding eve
    9·2 answers
  • Which of the following best expresses explicitly that Simon and Hillary worked together to save the little boy? "Hey kid," Hilla
    7·1 answer
  • Donald Trump was right when he Tweeted "The concept of global warming was created by and for the Chinese in order to make U.S. m
    7·1 answer
  • What is the importance of the state to an individual?​
    5·1 answer
  • An electric bill for the month of February showed a total of 646 kWh(kilowatt hours) used by her family of four. How many kWh pe
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!