How do you make sure an answer contains an item in a list?

I am working on a mastermind intro project where one player is an encoder and the other is a decoder, but I want to make sure the encoder chooses letters from my list ROYGBV.

Is this a BJC assignment?

There's a CONTAINS block in Lists.

Red Orange Yellow Green Blue Violet?
And yeah, do:[scratchblocks]<(list)contains(answer)::list>[/scratchblocks]

additional information:

image

image
return false it's normal if you search in a list of list...

because:
image

This way you can recursively test the presence of anything and anywhere
contains recur script pic

contains recur script pic (1)
contains recur script pic (3)
contains recur script pic (2)

Thank's, i like it !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.