For this WSQ I searched for how to call a random number with range. I found this information, in that page is very well explained and, also there's an example of how to use the comand to generate a random number. To make a range you need to use the command "rand", this page contains info about that command.
Other important info could be how to make a counter within a "while" loop. Here a video that teach us how to make a counter. Also you can go an look my code and take an idea of how can you make your code.
Finally, this is a picture of my code and the terminal running it.