Annotation of capa/capa51/Manual/s-PrototypeSet.tex, revision 1.1

1.1     ! albertel    1: \hrule 
        !             2: \section{Prototype Set with Three Problems}
        !             3: \vskip 0.2in
        !             4: \hrule
        !             5: \vskip 0.2in
        !             6: \subsection{\bf General Description.}
        !             7: 
        !             8: 
        !             9: The source code for a class's problems are contained 
        !            10: in files named {\sl set$x$.qz} where {\em x} is the problem set
        !            11: number.  These files usually incorporate information from other
        !            12:  files (problem libraries) using the import command, {\tt /IMP}. 
        !            13:  The example\footnote{\fbox{Boxed} items denote
        !            14:  Clicking on a Button selection}
        !            15:  below was assembled with {\sf Quizzer} by (1) selecting \fbox{File} in the main menu
        !            16:  then (2) choosing \fbox{New}.
        !            17:  You will then be prompted to choose the {\sl capa.config} file for the class you are
        !            18:  working in, for example {\sl /usr/users/teacher/CAPA5/nsc121s9/capa.config}.
        !            19:  In the new window, (3) click \fbox{Std. Header} then (4) \fbox{Import} 
        !            20:  three times, each time selecting a problem to be imported from the {\sl /demolibrary /type00/sample-prob$xx$}.  Each time you import a problem you will be 
        !            21:  asked to set the weight of the problem and the number of tries allowed.  
        !            22:  Finally, (5)  click
        !            23:  \fbox{Endline}.  Note: each time you click on one of the
        !            24:  buttons, you will be prompted if your cursor is in the correct position.  Make
        !            25:  sure the cursor is at the beginning of a blank line and not within header
        !            26: and question text.
        !            27: 
        !            28: \index{sample problem set}
        !            29: \begin{capacode}
        !            30: //CAPA system software is copyrighted by Michigan State University.
        !            31: //By using these materials, the User agrees to:
        !            32: //1) Protect the source code files  from unauthorized copying.
        !            33: //2) Limit  access  of the source material to teaching staff.
        !            34: //3) The User is free to mix, cut and paste, modify, adapt, delete,
        !            35: //   improve, etc. the problems and graphics for his/her own use.
        !            36: //
        !            37: /IMP "/demolibrary/Tools/StdMacros"
        !            38: /IMP "/demolibrary/Tools/StdUnits"
        !            39: /IMP "/demolibrary/Tools/StdConst"
        !            40: /IMP "/demolibrary/Tools/GreekWeb2"
        !            41: /IMP "HWTop"
        !            42: //
        !            43: //
        !            44: /BEG prob_val=1
        !            45: /LET try_val=99
        !            46: /LET hint_val=1
        !            47: /DIS("/demolibrary/type00/sample-prob01")
        !            48: /IMP "/demolibrary/type00/sample-prob01"
        !            49: /DIS(stdline)
        !            50: //
        !            51: /BEG prob_val=1
        !            52: /LET try_val=99
        !            53: /LET hint_val=1
        !            54: /DIS("/demolibrary/type00/sample-prob02")
        !            55: /IMP "/demolibrary/type00/sample-prob02"
        !            56: /DIS(stdline)
        !            57: //
        !            58: /BEG prob_val=1
        !            59: /LET try_val=99
        !            60: /LET hint_val=1
        !            61: /DIS("/demolibrary/type00/sample-prob03")
        !            62: /IMP "/demolibrary/type00/sample-prob03"
        !            63: /DIS(stdline)
        !            64: /END(stdendline)
        !            65: \end{capacode}
        !            66: \capa\ processes the above set in a number of ways. By choosing \fbox{Create .dvi} and 
        !            67: selecting a student by entering {\tt A87654321},  one obtains the result
        !            68:  displayed on the following page. 
        !            69: This set is similar to {\sl nsc121s9/set2.qz} in the distribution.
        !            70: \\
        !            71: \\
        !            72: \\
        !            73: 
        !            74: \index{sample problems!tex output}
        !            75: 
        !            76: {
        !            77: \parbox[t]{3.9in}{
        !            78: \noindent{\large\bf Student, Jaimie .\hfill Section {\Large 1}}\newline
        !            79: \vskip -.1in 
        !            80: \noindent {\large \it Sample \capa Questions \hfill Set 2}\newline
        !            81: \vskip -.16in
        !            82: \noindent{\bf nsc121s9} Due Fri, May 28, 1999 at 10:00\hfill CAPA\_ID 8239
        !            83: \vskip .05in \pagestyle{empty}
        !            84: 
        !            85: /demolibrary/type00/sample-prob01
        !            86: {\par \bf 1.} [1pt]
        !            87: Find the area of a rectangle with a length of  8.0$\, cm$ and width of 4.0$\, cm$. 
        !            88: \vskip .05in \hrule width2in height0.6pt \hfill \vskip .02in
        !            89: /demolibrary/type00/sample-prob02
        !            90: {\par \bf 2.} [1pt]
        !            91: The graph below shows the function \\ \centerline{$Y=ax$}
        !            92: Make a careful determination of the value of $a$.
        !            93: \epsfxsize=3.6in \epsffile{/demolibrary/Graphics/Gtype00/Ym39x.ps}
        !            94: \vskip .05in \hrule width2in height0.6pt \hfill \vskip .02in
        !            95: /demolibrary/type00/sample-prob03
        !            96: {\par \bf 3.} [1pt]
        !            97: A mass M = 0.13$\, kg$ is on a smooth horizontal surface with negligible
        !            98: friction. It is attached to a spring with spring constant k = 15.3$\, N/m$.
        !            99: The mass is displaced from its equilibrium position by a distance of 
        !           100: 0.14$\, m$ and then released from rest. 
        !           101: (Give all of the correct answers, i.e., A or BC or ABC...) 
        !           102: \begin{choicelist}
        !           103: \item[]  A) The amplitude doesn't vary with time
        !           104: \item[]  B) The motion of M is simple harmonic motion.
        !           105: \item[]  C) The frequency of oscillation is independent of k.
        !           106: \end{choicelist}
        !           107: \vskip .05in \hrule width2in height0.6pt \hfill \vskip .02in
        !           108: \vskip .05in \hrule width3.55in height0.6pt \hfill \vskip -.07in \noindent {\tiny College of Natural Science, Michigan State University \dotfill  {CAPA\copyright msu}}
        !           109: \index{HWTop file!sample output}
        !           110: }\hspace*{.3in}\parbox[t]{2.9 in}{ \footnotesize {\tt <==} The first 3-lines
        !           111:  on the left are generated by the HWTop file. This file uses definition in
        !           112:  the StdMacros file so that the order of /IMP in the set{\em x}.qz is important. 
        !           113: 
        !           114: \vspace*{0.2in}
        !           115: \index{/DIS!sample output}
        !           116: {\tt <==} This line shows the path of the imported problem. It is essential
        !           117:  for classifying the content of a library. It is also useful while debugging
        !           118:  a set. Before printing for students, just change the {\tt /DIS...} to  a comment,
        !           119:  i.e., to {\tt //DIS...} in the {\sl set$x$.qz} file.
        !           120: 
        !           121: \vspace*{1.2in}
        !           122: \index{sample problems!graphics}
        !           123:     {\tt <==} The paths  for  {\sl .ps} or {\sl .gif} version of the picture are specified
        !           124:  in the problem file. This is one of 14 pictures randomly selected for
        !           125:  students as will be seen below from the problem code.
        !           126: 
        !           127: \vspace*{01.4in}
        !           128: \index{problem value}
        !           129: {\tt <==} The point value here is set by the {\tt /BEG prob\_val=2} at the start
        !           130:  of Problem 3. [Note: {\tt /BEG} is just an alias for {\tt /LET}
        !           131: 
        !           132: \vspace*{0.7in}{\tt <==} This type of problem should have at least 4
        !           133:  statements unless it is in an exam where students have just one try.
        !           134:  That is, at least one of the three statements should have two choices for 
        !           135:  \capa\ to randomize from.
        !           136:  Therefore, there may be several versions of each of the statements (see problem
        !           137:  code in ``Problem 3'' section.)
        !           138: 
        !           139: }
        !           140: 
        !           141: \newpage
        !           142: 
        !           143: 
        !           144: \index{Tools directory!StdMacros}
        !           145: \index{Tools directory!StdUnits}
        !           146: \index{Tools directory!StdConst}
        !           147: \subsection{\bf Imported Standard Files.}
        !           148:  All the files below should be read as examples of CAPA coding and may be edited and adapted by users.
        !           149: \begin{itemize}
        !           150: 	\item The {\sl /demolibrary/Tools/StdMacros} contains a set of useful macros
        !           151:  such as ``stdline'' to facilitate coding.  
        !           152: 	\item The {\sl /demolibrary/Tools/StdUnits} has a large number of unit
        !           153:  combinations pre-formatted for presentation on the printed page and Web
        !           154:  browsers.
        !           155: 	\item The {\sl /demolibrary/Tools/StdConst} defines variables for a number 
        !           156: 	of often used fundamental constants.
        !           157: 	\item The {\sl /demolibrary/Tools/GreekWeb2} file is a list of variables
        !           158: for displaying greek letters, symbols, etc.  You can view the symbols
        !           159: in the output of {\sl set13.qz} in the distribution class.
        !           160: \index{HWTop file!description}
        !           161: \index{copyright line}
        !           162: \index{Department Name}
        !           163: 	\item The {\sl HWTop} file resides in the classname folder.  Two lines which
        !           164:  construct the stdendline require editing.  They are visually separated from
        !           165:  other items in the file by rows of asterisks.  Please edit these lines to
        !           166:  reflect the correct course and department information.
        !           167: \begin{capacode}
        !           168: //************* Edit the 2 statements below to suit ****************
        !           169: /LET coursename="Sample \capa Questions"        
        !           170: /LET DeptID="College of Natural Science, Michigan State University"
        !           171: //******************************************************************
        !           172: //
        !           173: /IF (tex("Y","N")=="Y")
        !           174: /DIS("\noindent{\large\bf "+name()+"\hfill Section {\Large "+section()+"}}\newline")
        !           175: /DIS("\vskip -.1in") 
        !           176: /DIS("\noindent {\large \it "+coursename+" \hfill Set "+set()+"}\newline")
        !           177: /DIS("\vskip -.16in")
        !           178: /DIS("\noindent{\bf "+class()+"} Due "+due_date()+"\hfill CAPA\_ID "+capa_id())
        !           179: /DIS("\vskip .05in \pagestyle{empty}")
        !           180: /ENDIF
        !           181: /DIS(html("<b>"+name()+"</b>"))
        !           182: /LET stdendline=stdendlineA+DeptID+stdendlineB  //A & B are in  Tools/StdMacros
        !           183: \end{capacode}
        !           184:    \item {\sl HWTopSN} is similar except for an extra line of code which displays
        !           185:     the student number.  This is not recommended because the combination of the
        !           186:     student number and \capa\ ID is all that is needed to access the system
        !           187:     for this and preceeding problem sets.
        !           188: 
        !           189: 
        !           190: 
        !           191: \end{itemize}
        !           192: 
        !           193: \newpage
        !           194: 
        !           195: \subsection{\bf Problem 1.}
        !           196:  
        !           197: \index{sample problems}
        !           198: The text of {\sl /demolibrary/type00/sample-prob01} is:
        !           199: \vskip 3mm
        !           200: {\footnotesize
        !           201: {
        !           202: 
        !           203: \begin{minipage}[t]{4.2in}
        !           204: \begin{verbatim}
        !           205: //************************************** 
        !           206: //BEG prob_val=1
        !           207: //LET try_val=20
        !           208: /IMP "/demolibrary/Tools/Problem#" 
        !           209: // By  kashy@nscl.msu.edu, No commercial use.
        !           210: /HIN The area of a rectangle is the product of the two sides. 
        !           211: /EXP Multiply the length by the width and enter the result.
        !           212: //
        !           213: /LET long=random(7.0,9.1,1.0)
        !           214: /LET wide=random(2.0,5.1,2.0)
        !           215: //
        !           216: Find the area of a rectangle with a length of  /DIS(long:1f)\
        !           217: /DIS(cm_u) and width of /DIS(wide:1f)/DIS(cm_u). 
        !           218: //
        !           219: /LET area=long*wide
        !           220: /ANS(area:1f,tol=0.2,wgt=prob_val,tries=10,hint=hint\_val,unit="cm^2")
        !           221: //**************************************
        !           222: \end{verbatim}
        !           223: \end{minipage}\hspace*{8mm}
        !           224: \begin{minipage}[t]{2.4in}
        !           225: \vspace*{2mm}{\tt <==} The {\tt //BEG prob\_val=2} and {\tt //LET try\_val=2} are comments. 
        !           226: The variables {\tt prob\_val} and {\tt try\_val} are defined in the {\sl set$x$.qz}. \\
        !           227: 
        !           228: \index{hints!usage}
        !           229: \index{explanations!usage}
        !           230: \vspace*{-2mm}{\tt <==} Hints and Explanations are optional. Additional
        !           231:  hints can be inserted directly in the {\sl set$x$.qz} file for each problem.\\
        !           232: 
        !           233: \index{random function!usage}
        !           234: \vspace*{-1mm}{\tt <==} This questions was built when the \capa\ sets were 
        !           235: built on a different computer than the ones that the students logged into.  
        !           236: There were slight parsing differences with respect to real numbers 
        !           237: between the computers.  Therefore, adding a little to the high end avoided this
        !           238: problem (i.e. using 9.1 instead of 9.0 in the definition of {\tt long}).  Even better
        !           239: though would be to parse only random integers and avoid the problem entirely.  \\
        !           240: 
        !           241: 
        !           242: 
        !           243: \index{answer format!example}
        !           244: \vspace*{-1mm}{\tt <==} Note the unit for the  problem is defined as a string.
        !           245: \end{minipage}
        !           246: }
        !           247: }
        !           248: \newpage
        !           249: \index{sample problems}
        !           250: \subsection{\bf Problem 2.}
        !           251: {\sl /demolibrary/type00/sample-prob02:}
        !           252: \vskip 3mm
        !           253: {\footnotesize
        !           254: {
        !           255: 
        !           256: \begin{minipage}[t]{4.0in}
        !           257: \begin{verbatim}
        !           258: //**************************************
        !           259: //BEG prob_val=1
        !           260: //LET try_val=20
        !           261: /IMP "/demolibrary/Tools/Problem#" 
        !           262: //By E. Kashy, kashy@nscl.msu.edu, No commercial  use
        !           263: //
        !           264: /LET k=random(1,14,1)
        !           265: /LET file=choose(k,"35","45","56","62","77","86","93","m26",\
        !           266:                   "m39","m47","m51","m66","m74","m84")
        !           267: //
        !           268: //
        !           269: //
        !           270: //
        !           271: //
        !           272: /LET slope=choose(k,3.5, 4.5, 5.6, 6.2, 7.7, 8.6, 9.3, -2.6,\
        !           273:                   -3.9, -4.7, -5.1, -6.6, -7.4, -8.4)
        !           274: //
        !           275: //
        !           276: //
        !           277: //
        !           278: /LET TexGraph="\epsfxsize=3.6in \epsffile{/demolibrary"+ \
        !           279: "/Graphics/Gtype00/Y"+label+"x.ps}"
        !           280: /LET WebGraph="<IMG SRC=/demolibrary/Graphics/Gtype00/Y"+ \
        !           281: label+"x.gif"
        !           282: //
        !           283: //
        !           284: /LET constStr=web("a","$a$","<i>a</i>")
        !           285: /LET functStr=web("Y=ax","\\ \centerline{$Y=ax$}","<i>Y=ax</i>")
        !           286: //
        !           287: //
        !           288: The graph shows the function /DIS(functStr)
        !           289: Make a careful determination of the value of /DIS(constStr).
        !           290: //
        !           291: /DIS(web("", TexGraph, WebGraph))
        !           292: //
        !           293: //
        !           294: /ANS(slope:2E,tol=5%,wgt=prob_val,hint=hint\_val,tries=try_val)
        !           295: //**************************************
        !           296: \end{verbatim}
        !           297: \end{minipage}\hspace*{8mm}
        !           298: \begin{minipage}[t]{2.9in}
        !           299: \index{/IMP function!usage}
        !           300: \vspace*{7.5mm}{\tt <==} The {\tt /IMP} command imports a file to format the
        !           301:  problem number.\\
        !           302: 
        !           303: \index{random function!usage}
        !           304: \index{choose function!usage}
        !           305: \vspace*{1.5mm}{\tt <==} The computer code picks a random number,  k. For k=4,
        !           306:  the choose
        !           307: function selects the string variable, 62 which is 
        !           308: then concatenated into the name of the .eps or .gif file to be displayed.
        !           309: \index{continuation character}\index{line continuation} NOTE: The  back
        !           310:  slash is a line
        !           311: continuation character which hides the carriage return so that the {\tt /LET}
        !           312:  statement has no carriage return.\\
        !           313: 
        !           314: \index{choose function!sample}
        !           315: \vspace*{1.5mm}{\tt <==}  The answer (slope) is also specified with a {\tt choose()} function using the
        !           316: same selection index {\tt k}. Thus, the data in the first {\tt choose()} function
        !           317:  corresponds to the answers 
        !           318: in the second {\tt choose()} function.  
        !           319: 
        !           320: 
        !           321: \index{sample problems!graphics}
        !           322: \index{graphics!commands to input}
        !           323: \vspace*{2mm}{\tt <==} Commands and paths for the TeX and Web figures.
        !           324: The continuation character is outside the ``string''.\\
        !           325: 
        !           326: \index{web function!sample usage}
        !           327: \index{tex function!sample usage}
        !           328: \vspace*{8mm}{\tt <==} This formats the equation for Web and TeX\\
        !           329: 
        !           330: \vspace*{10mm}{\tt <==} Text of problem.\\
        !           331: 
        !           332: \index{/DIS!sample usage}
        !           333: \vspace*{1mm}{\tt <==} Displays the figure in TeX and Web.\\
        !           334: 
        !           335: \end{minipage}
        !           336: }
        !           337: }
        !           338: \newpage
        !           339: \subsection{\bf Problem 3.}
        !           340: {\bf /demolibrary/type00/sample-prob03:}
        !           341: \vskip 3mm
        !           342: {\footnotesize
        !           343: {
        !           344: 
        !           345: \index{sample problems}
        !           346: \begin{minipage}[t]{3.8in}
        !           347: \begin{verbatim}
        !           348: //************************************** 
        !           349: //BEG prob_val=1
        !           350: /IMP "/demolibrary/Tools/Problem#" 
        !           351: //
        !           352: //By E. Kashy, kashy@nscl.msu.edu, No Commercial Use
        !           353: // /demolibrary/CAPA46/MCTools/Nof3  Select N correct
        !           354: //of 3 Statements
        !           355: //
        !           356: A mass M = 0.13/DIS(kg_u) is on a smooth horizontal surface \
        !           357: with negligible friction. It is attached to a spring with \
        !           358: spring constant k = 15.3/DIS(NPm_u). The mass is displaced \
        !           359: from its equilibrium position by a distance of 0.14 m and \
        !           360: then released from rest. (Give all of the correct answers, \
        !           361: i.e., A or BC or ABC...) 
        !           362: //----------------------------------------
        !           363: /LET s1a="The motion of M is simple harmonic motion."
        !           364: /LET s1b="Statement 1 variation b"
        !           365: /LET s1c="Statement 1 variation c"
        !           366: /LET s1d="Statement 1 variation d"
        !           367: /LET mix1=random(1,1,1)
        !           368: /LET a1a=1
        !           369: /LET a1b=26
        !           370: /LET a1c=26
        !           371: /LET a1d=26
        !           372: //
        !           373: /LET s2a="The amplitude varies with time."
        !           374: /LET s2b="The amplitude doesn't vary with time"
        !           375: /LET s2c="Statement 2 variation c"
        !           376: /LET s2d="Statement 2 variation d"
        !           377: /LET mix2=random(1,2,1)
        !           378: /LET a2a=2
        !           379: /LET a2b=1
        !           380: /LET a2c=26
        !           381: /LET a2d=26
        !           382: //
        !           383: /LET s3a="The frequency of oscillation is independent of k."
        !           384: /LET s3b="The Period of oscillation is independent of k."
        !           385: /LET s3c="The frequency of oscillation depends of k."
        !           386: /LET s3d="Statement 3 variation d"
        !           387: /LET mix3=random(1,3,1)
        !           388: /LET a3a=2
        !           389: /LET a3b=2
        !           390: /LET a3c=1
        !           391: /LET a3d=26
        !           392: //
        !           393: //
        !           394: /IMP "/demolibrary/MCTools/Nof3aux"
        !           395: //
        !           396: //
        !           397: /ANS(Nof3right,wgt=prob_val,str=mc,hint=hint_val,tries=try_val)
        !           398: //**************************************
        !           399: \end{verbatim}
        !           400: \end{minipage}\hspace*{8mm}
        !           401: \begin{minipage}[t]{2.9in}
        !           402: \index{MCTools!sample usage}
        !           403: \vspace*{11mm}{\tt <==}  This problem starts as a template {\sl Nof3} which is located in {\sl /demolibrary/MCTools}.
        !           404:  
        !           405: 
        !           406: 
        !           407: \index{StdUnits!sample usage}
        !           408: \vspace*{11mm}{\tt <==} \ Certain variables ({\tt kg\_u, NPm\_u}) 
        !           409: are not defined within the problem. Because they are used often, they were
        !           410: defined in a files imported once at the start of the set ({\tt /IMP
        !           411: "/demolibrary/Tools/StdUnits"})\\
        !           412: 
        !           413: 
        !           414: 
        !           415: \index{choose function!sample usage}
        !           416: \vspace*{13mm}{\tt <==} The {\tt mix1} variable will allow only the one variation of this statement and all students will have it.
        !           417:  It is identified as correct by {\tt a1a=1}.  \\ 
        !           418: 
        !           419: \vspace*{11mm}{\tt <==} The {\tt mix2} variable will select either of 2
        !           420:  variations of this statement for a particular student.  The first
        !           421:  leaf is identified as incorrect by {\tt a2a=2}, while the second is correct, with
        !           422:  {\tt a2b=1}. This templates allows up to 4 variations for each statement.\\ 
        !           423: 
        !           424: 
        !           425: \vspace*{24mm}{\tt <==}  The {\tt mix3} variable will select one of the 3
        !           426: variations of this 3rd statement to be given to a particular student. \\ 
        !           427: 
        !           428: 
        !           429: \index{.aux files}
        !           430: \vspace*{10mm}{\tt <==} The {\sl .aux} file randomizes the order and formats 
        !           431: presentation.  Note the names of the statement and answer variables s3a, s3b,
        !           432: a3a, a3b, etc. must correspond to those used in the {\sl Nof3aux} file.\\ 
        !           433: 
        !           434: \index{answer formatting!order and case,sample usage}
        !           435: \vspace*{-2mm}{\tt <==} The three letters in the answer can be in any order
        !           436:  because {\tt str=mc} is selected.
        !           437: 
        !           438: \end{minipage}
        !           439: }
        !           440: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>