This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 10 posting(s) in 1 day

mini selection algorithm perl

by Zak Zarychta - Wednesday, 10 August 2011, 11:30 AMNumber of replies: 1

I'm scratching my head wondering how to construct a selection algorithm in order that a correct logical connective is selected from an array given a random selection of a statement. I'm wondering if anybody may have already considered this.

Given the statements P,Q and logical connectives =>,<= arranged (for example, but not exclusively) in an array as the elements

[0] => [1] P [2] Q [3] <=

and if, P => Q. How might one select the correct logical connective given a random selection of either P or Q.

The basic idea is that i first want to randomly select a statement P or Q followed by an answer box and the other statement Q or P so that the correct logical connective is selected for comparison with the answer that the student gives.