Click to See Complete Forum and Search --> : Non-repeating Random


Kynn
08-22-2005, 01:14 PM
Hello all,

Have a sticky problem. I am helping somebody do some research and they need some items done in a certain way. Here is what they want to have happen.

Their are 12 pictures and the same question for each of the 12 pics.

If I put the thing in modules, I have 12 mods with one pic in each with a set of questions.

Program starts, randomly chooses a number 1 to 12 and runs that module, say Mod_6

Pic 6 shows, and the question associated with pic 6 are asked, vales saved to a database.

Randomly chooses another mod BUT NOT Mod_6.. say Mod_9.

Pic 9 shows, and the question associated with pic 9 are asked, vales saved to a database.

Randomly chooses another mod between 1 - 12 BUT NOT Mod_6 or Mod_9......

And goes till all mods are ran. In reality their will be 45 different mods.

That is how I thought about doing it, but I am not sure how to take out the already selected random numbers.

Here is what they are trying to do, if you can think of a better way let me know. Has 45 pictures, wants to rate each pictures with a set of questions (must know what pics is being displayed to know how they rated it(have a database for storing answer)). Wants the order of the pictures randomized.

Thanks in advance,
Kynn

felgall
08-22-2005, 03:05 PM
Put them in an array and then sort the array into random order then process them sequentially from the array.