Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

How can I display dates randomly selected?

Hi,
I am trying to set a task for my experiment. I need to display a date which participants have to find its day of the week. I mean, for example you see 12.04.2018 in the screen and find the day (thursday) and write it to the screen, and it will continue. When I tried this, the experiment finished after one display.

Also I need to display equations which participants need to find answer ant write it down again.

Thank you!

Comments

  • Hi,

    When I tried this, the experiment finished after one display.

    No error message? If not, then try to set up the number of repetitions in your loop table to a higher number.

    Also I need to display equations which participants need to find answer ant write it down again.

    Sure, but is there a problem with that? If you need help, you should give us a little more info on what is actually wrong.

    Eduard

    Thanked by 1bruksist
  • Hi Eduard,
    Thank you. It worked when I set loop.
    In my second problem which is about displaying equations, the eq doesn't work. I mean when I start the experiment it shows all variable like that :

    e.g. --> 567 ("+", "-", "x") 495

    But I want it to choice one of them randomly. My script:

    eq = ("+", "-", "x")
    random.choice(eq)

    What is the wrong?
    Thank you.

  • Hi, Eduard,
    I found a code for doing random math operator in a website and I adapted it to my problem. It works now :)

    the code (for anyone interested):

    ops = {'+':operator.add, '-':operator.sub,'*':operator.mul}
    op = random.choice(ops.keys())

Sign In or Register to comment.