MathGroup Archive 2009

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

Search the Archive

Re: creating problem sets using mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105653] Re: [mg105650] creating problem sets using mathematica
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 14 Dec 2009 00:04:58 -0500 (EST)
  • Reply-to: hanlonr at cox.net

This will need embellishment if you want to go beyond 26 questions.

data = ToString /@ Range[25];

firstCharacter = "a";(* e.g., "a" or "A" *)

letters = CharacterRange[firstCharacter,
   FromCharacterCode[
    ToCharacterCode[firstCharacter] +
     Length[data] - 1]];

numberOfColumns = 3;

partitionPadding =
  Table["", {numberOfColumns - 1}];

Letter across then down:

Join[
   Inner[StringJoin[#1, ".  ", #2] &,
    letters, data, List],
   partitionPadding] //
  Partition[#, numberOfColumns] & //
  Grid[#, Alignment -> Left, Frame -> All] &

Letter down then across:

Join[
    Inner[StringJoin[#1, ".  ", #2] &,
     letters, data, List],
    partitionPadding] //
   Partition[#,
     Ceiling[Length[data]/numberOfColumns]] & //
  Transpose //
  Grid[#, Alignment -> Left, Frame -> All] &


Bob Hanlon

---- Jon Joseph <josco.jon at gmail.com> wrote: 

=============
I am try to create problem sets using mathematica and I would like the 
problems to be formatted in columns across the page - three problems in 
a row. The problems should be individually numbered or lettered. Is it 
possible to have Mathematica assign the letters across the columns much 
as it does when you hit return for the "itemNumbered" format style?  
Thanks, Jon.



  • Prev by Date: Re: unreadable text in Demonstration projects
  • Next by Date: Re: Toolbar
  • Previous by thread: creating problem sets using mathematica
  • Next by thread: Re: creating problem sets using mathematica