+ 1
Question Randomizer
How would you go about making a program that randomizes questions every time the user presses Enter? The questions would be manually entered and it could be used as a study tool. Also, I’m learning Python so that’s the language I’d like to use.
5 Respostas
+ 3
put then into an array myarray and use random.choice(myarray).
+ 3
Daniele Bonomi or read that file into an array.
and after rc.
+ 2
I would create a file where there is a question on each line and then find a random number, get to that line and print the line
+ 1
If you want to iterate through the questions, you can also use random.shuffle on the list, mixing it up, then iterate from the start.
+ 1
I think random module will help you.
check this.
https://youtu.be/KzqSDvzOFNA