Discuss Scratch

Divya51
New Scratcher
1 post

Quiz Script

hey … i am making a quiz game … i want questions to be random as well as they should not repeat in a cycle of series of wrong answers ?

how to code the script for this ??
deck26
Scratcher
1000+ posts

Quiz Script

If you want to select questions in a random order an easy method is to store the questions and answers in lists so that answer 3 corresponds to question 3.

Then create another list from 1 to N where N is the number of questions you have. Now shuffle that list - eg by going through the list in a loop and swapping each item with another random item. That will give you the numbers 1 to N in a random order and you can use that list to select the questions and answers.
coc4tm
Scratcher
39 posts

Quiz Script

whenclickedsetvarto(pick random (1) to (10)) foreverifvar=1then

Last edited by coc4tm (March 14, 2016 13:59:37)

Powered by DjangoBB