Brevet (DNB) 2022 — Mathematics general stream, Amérique du Nord 3 juin 2022 — exercise 4 : Probability and programming (official exam paper)
Statement
In this exercise, no justification is expected.
A game of chance was created using programming software.
When the green flag is clicked, the sprite draws three patterns side by side.
Each pattern is drawn at random: either it is a cross or it is a rectangle.
The player wins if the display obtained shows three identical patterns.
At the start of the program, the sprite is facing horizontally to the right.
Main program:
When the green flag is clicked:
- clear all;
- go to x : $-110$, y : $0$;
- repeat 3 times:
- if « random number between 1 and 2 = 1 » then execute the « cross » block;
- otherwise execute the « rectangle » block;
- move 100 steps.
Block « rectangle »:
- define « rectangle »;
- pen down;
- repeat 2 times:
- move 60 steps;
- turn left 90 degrees;
- move 80 steps;
- turn left 90 degrees;
- pen up.
Block « cross »: the script is not given.
Explanation of the instruction « random number between ... » using an example: « random number between 1 and 4 » returns a number at random among 1, 2, 3 and 4.
1. Using the scale 1 cm for 20 steps, represent the pattern obtained by the block « rectangle ».
2. Here is an example of the display obtained by running the main program: a cross is drawn on the left, then two rectangles are drawn side by side on the right. Each rectangle corresponds to the block « rectangle »: width 60 steps and height 80 steps. After each pattern, the sprite moves 100 steps; the distance $d$ indicated is the horizontal space between the right side of the first rectangle and the left side of the second rectangle.
What is the distance $d$ between the two rectangles in the display, expressed in steps ?
3. What is the probability that the first pattern drawn by the sprite is a cross ?
4. Draw by hand the 8 different displays that could be obtained with the main program.
5. We will assume that the 8 displays are equally likely to appear. What is the probability that the player wins ?
6. We now want, for each pattern, that there be twice as much chance of obtaining a rectangle as a cross. To do this, the instruction in line 5 must be modified.
On the answer sheet, copy the following instruction by completing the boxes:
« random number between ... and ... = ... ».
⏳ 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 solutionHave a similar exercise? Get it solved step by step, for free.
🧮 Solve my exercise