Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Rearrangement of a sequence into random order

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28446] Re: Rearrangement of a sequence into random order
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Thu, 19 Apr 2001 03:26:34 -0400 (EDT)
  • References: <9bjg9m$gsn@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Loren Dill" <lorendill at mediaone.net> wrote in message
news:9bjg9m$gsn at smc.vnet.net...
> Hi,
>
> I'm a math teacher, and need to prepare exams from time to time.  I
> typically prepare questions for the exam in a sequential order starting at
> the beginning of the material and going to the end.  I may have something
> like 20 short-answer questions.  I want a program that will randomize the
> order of the questions.  In other words, I want to provide n, the number
of
> questions, and have the program provide a list of length n that contains
all
> the numbers from 1 to n in a random order without any number being
repeated
> or omitted.  I'm sure that this is an easy task for Mathematica, but I
can't
> figure out the best way to do it.

<<DiscreteMath`Combinatorica`

t = RandomPermutation[10]

Map["Question " <> ToString[#]&,t]//TableForm

Question 6
Question 4
Question 3
Question 7
Question 10
Question 1
Question 9
Question 5
Question 2
Question 8

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: Rearrangement of a sequence into random order
  • Next by Date: Re: Rearrangement of a sequence into random order
  • Previous by thread: Re: Rearrangement of a sequence into random order
  • Next by thread: RE: Rearrangement of a sequence into random order