Step-by-step explanation:
A. Generate a string of 25 random digits in the range 0-9*. Replace every 1 in the string with a 0. Any non-zero will represent a successful throw. This leaves 8 of the 10 possible digits representing a successful throw.
__
B. Count the number of non-zeros in a row. If there are 5 or more, then the student has 5 or more successful throws in a row.
_____
Example
In the attached example, the raw string of digits is ...
08697 33776 69191 90868 14492
After replacement of 1 with 0, we have ...
08697 33776 69090 90868 04492
Formatting so non-zero digits are together, we have ...
0 86973377669 0 9 0 9 0 868 0 4492
There is 1 string of 5 or more successful throws in a row
_____
* Many math handbooks have tables of random numbers, often in groups of 5 digits. 5 such groups will serve the purpose here. We have chosen to use a web site that generates random numbers based on noise from the Universe. Such numbers are believed to be truly random, though deviation from randomness has been seen when world consciousness is synchronized by some cataclysmic event.