MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: preparing multiple choice questions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63365] Re: [mg63364] preparing multiple choice questions
  • From: leigh pascoe <leigh at cephb.fr>
  • Date: Tue, 27 Dec 2005 04:42:36 -0500 (EST)
  • References: <200512260959.EAA20859@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Baris Erbas wrote:

>Dear Mathematica Users,
>
>I have been trying to prepare a test of 30 question with multiple choices
>ranging from a-e.
>
>I want to automatically assign the question numbers and and the correct
>answers using mathematica. All correct answers should be in equal quantity,
>i.e. 6 a, 6 b, . 6 e.
>
>I tried to use Random with Table however it doesnt produce equal number of
>correct answers. I also tried to look into the Statistical packages.
>
>Is there a way of doing this in Mathematica? Could you please froward me to
>a link if you already know one?
>
> 
>
>All the best
>
> 
>
>Baris Erbas
>
>
>
>
>  
>
Here is one way:
You want 6 of each of the 5 possible correct aswers, so thye set of 
answers is unique.

In[12]:=
answers={a,a,a,a,a,a,b,b,b,b,b,b,c,c,c,c,c,c,d,d,d,d,d,d,e,e,e,e,e,e}
Out[12]=
{a,a,a,a,a,a,b,b,b,b,b,b,c,c,c,c,c,c,d,d,d,d,d,d,e,e,e,e,e,e}

You can get a random permutation of these for a given test

In[13]:=
testanswers=RandomPermutation[answers]
Out[13]=
{b,c,d,e,c,d,c,b,b,d,e,c,a,a,e,a,b,a,e,d,c,b,a,a,d,c,b,e,d,e}

Finally

In[14]:=
Table[{i,Part[testanswers,i]},{i,1,Length[testanswers]}]
Out[14]=
{{1,b},{2,c},{3,d},{4,e},{5,c},{6,d},{7,c},{8,b},{9,b},{10,d},{11,e},{12,
    c},{13,a},{14,a},{15,e},{16,a},{17,b},{18,a},{19,e},{20,d},{21,c},{22,
    b},{23,a},{24,a},{25,d},{26,c},{27,b},{28,e},{29,d},{30,e}}

LP




  • Prev by Date: Re: preparing multiple choice questions
  • Next by Date: Re: Re: Questions regarding MatrixExp, and its usage
  • Previous by thread: Re: preparing multiple choice questions
  • Next by thread: Re: preparing multiple choice questions