Solved exercises🧮 Solve my exercise

Brevet (DNB) 2021 — Mathematics general stream, Asie 21 juin 2021 — exercise 3 : Algorithm and Scratch (official exam paper)

MathematicsLevel : Middle schoolAlgorithm and Scratch🌐 Lire en français
Statement
Here is an algorithm: Choose a number $N$. If $N>15$, then calculate $100-N\times 4$. Otherwise, calculate $2\times (N+10)$. 1. Justify that if we choose the starting number $N$ equal to 18, the final result of this algorithm is 28. 2. What final result do we obtain if we choose 14 as the starting number $N$? 3. By applying this algorithm, two different starting numbers make it possible to obtain 32 as the final result. What are these two numbers? 4. The previous algorithm is programmed. Scratch program description with line numbers: line 1: when the green flag is clicked; line 2: ask "Choose a number" and wait; line 3: if "answer > [blank box]" then; line 4: say "$100 - \text{answer} \times 4$" for 2 seconds; line 5: otherwise; line 6: say "[blank box] $\times$ ([blank box] + [blank box])" for 2 seconds. a. Rewrite line 3 by completing the dots: line 3: if answer $> \ldots$ then. b. Rewrite line 6 by completing the dots: line 6: say $\ldots * (\ldots + \ldots)$ for 2 seconds. 5. We randomly choose a prime number between 10 and 25 as the starting number $N$. What is the probability that the algorithm returns a multiple of 4 as the final result?
⏳ Solution not generated yet

Open this statement in Expert Maths AI: the step-by-step solution is computed on demand, checked by a second resolution, then published here for everyone.

📝 See the solution

Have a similar exercise? Get it solved step by step, for free.

🧮 Solve my exercise