How do I start displaying random values(indexes) from a list one after another

Hello, I am creating a simple word color test. How do I start displaying random values(indexes) from a list one after another with an interval of 2 seconds? I have to display random indexes 40 times.

Thanks in advance

You can select the same item twice?

This is one way .

  1. You need a clock and set interval to 2000 milliseconds
  2. Set it disable by default and set it enable when you want , ex. When click a button
  3. Under the block when clock timer you have to select an item and delete it too

Now if you need it one time you can add item to a list
(second list) using as index random integer and delete it from the first list.
To do this you can save the random integer in a variable and use it to add and delete item.
If you can select twice you don't need a second list to move item
If yuo don't need to save item after selection you can show and delete together

One way, it shows random items one time and saves the items in a second list

Thankyou for your response, I am very glad. Actually I am trying to make a stroop test where:

(1) text appears from a list (list contains 4 color names:red,yellow,green,blue) in a random manner and these 4 have to be displayed randomly 40 times on the label. Between each random text, there should be an interval of 2000 ms.

(2) but there's a catch, the random texts should also appear in random colors(red, yellow, green and blue).

(3) User actually has to press from one of the 4 color buttons on the bottom of the screen depending on what is the color of the text and not the text itself.
E.g. "Green" appearing randomly with red color. So the user will press RED BUTTON and get the score.

Any help regarding the above 3 points would be highly appreciated. Thankyou in advance.

1 Like

Good, so it's more easy, you need only the two blocks to show random text color and text name.
There is one block that get the color of the text, after click you can control if text color=button color (there is a block to get it too). If true get points else nothing or less points

You will need this value procedure:

1 Like

Which block should be used to assign random colors to random list items...how to do it? Actually I am a beginner and I am clueless in this regard.

Thanks.

image
Something like this?

To shuffle a list, we have an easy way now:
image

3 Likes

(added to FAQ)

Perfect!! Thanks alot😇

1 Like

Right. Thanks:)