Respuesta :
Algorithms are used to simulate real programs.
The true conditions of the algorithm are:
- (a) If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even
- (b) If the last digit of the value found in step 6 is 5, then the sum is odd
First, we analyze the algorithm.
Assume the outcomes of the two rolls are x and y
Step 4: Calculate sum
[tex]Sum = x + y[/tex]
Step 5: Multiply Sum by 10
[tex]Result = Sum \times 10[/tex]
Step 6: Divide by 2
[tex]Result = Sum \times 10 \div 2[/tex]
[tex]Result = Sum \times 5[/tex]
This means that, the algorithm simply multiplies the sum of the rolls by 5
Option (a): If step 6 is 10, 20, 30, 40, 50 or 60, then sum is even
Make Sum the subject in [tex]Result = Sum \times 5[/tex]
[tex]Sum = \frac{Result}{5}[/tex]
When 10, 20, 30, 40, 50 and 60 are divided by 5, the result is:
[tex]Sum = 2, 4,6,8,10, 12[/tex]
All the above numbers are even number.
This means that, the sum is an even number.
Hence, (a) is true
Option (b): If the last digit of step 6 is 5, then the sum is Odd.
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:
[tex]Sum = 1,3,5,7[/tex]
It is not possible to have a sum of 1 for two rolls
So, we have:
[tex]Sum = 3,5,7[/tex]
All the above numbers are odd.
This means that, the sum is an odd number.
Hence, (b) is true
So, we can conclude that the true conditions are:
(a) and (b)
Read more about algorithms at:
https://brainly.com/question/17780739