F. Creating a dynamic multiple choice story problem question
Previous Topic  Next Topic 

The only new part in this rather long title is “story problem”.  We will start with typical percentage story problems involving money (so we can round to two decimal places).  For instance:

“Last year Igor paid $2,745.35 for school fees.  This year, the fees have increased by 3.3%.  How much will it cost Igor this year for fees?

   or

“Jane is to get a 12.3% pay increase. If her new paycheck is $345.24, what was her old paycheck?” 

    or

“The price of a car has been reduced from $12,345.21 to $10,678.32. What is the percent of discount?

In addition to making the values dynamic, we would like to be able to make the names and perhaps other words in the questions dynamic.  We will do this in Step 2 by using lists.

Step 1: Reorder the questions.

We are working on creating a dynamic question from:

Last year Igor paid $2,745.35 for school fees.  This year, the fees have increased by 3.3%.  How much will it cost Igor this year for fees?

This is a problem similar to question 1, so we will duplicate question 1.  Then we will move this duplicated question from its position in question 2 to its required position as question 4.

The Reorder Questions dialog box will open.

(Do this by positioning the mouse pointer over question 2. Then press and hold down the left mouse button. While holding the mouse button down, move (drag) the mouse down. As you drag, a gray dotted line will first form between question 3 and question 4. As you continue to drag, this line will form under question 4.  Release the mouse button.

The questions are now reordered.

Step 2: Create and use a list.

In this step we will define three variables, which use predefined EVP functions, namely the special function list( ), the math function rand( ) and the special function choose( ).  As with all predefined functions, details about their use can be found in the EVP Help.

With this variable, we have defined the list of possible names that will appear in place of Igor in our question.  We now set up the mechanism for choosing a name from this list.

Now for the variable which actually chooses a name.

The function rand(10) chooses a random number between 1 and 10 when calculating the dynamic values of this question. Recall that we placed 10 names in our NameList.  With this, any of the 10 names can be chosen. Lets say it chooses the value 4.

In our hypothetical calculation, the function choose(whichName,NameList)  will choose the fourth name from our NameList so that the (string) value of  Name = “Carmen”.

Step 3: Edit the algorithm definitions to fit the question.

The variables a, p, and b.

    1. Since our problem involves money, we must make sure that our variables a and b have two fixed decimal places and that the numbers are written with commas at the thousands.
    2. Secondly, our values for a and p must reflect reasonable values.  Lets say that a can be in the range from $50 to $1,000 and p can be in the range from 0.1% to 35%.
    3. With these definitions, we do not need the condition on b.
    4. In these problems we are using the formula:

so that it is a good idea to define the variable S.

Before reading on, see if you can edit the definitions of the three variables and define S.

In the Edit Algorithm Definitions box, double-click on the variable to edit (or click once and then click on Edit). Edit as below.  Then click on OK and start editing the next variable in the same way.

A Caution dialog box will open asking us if we are sure that we want to delete this algorithm.

Our answer variables: AnsA, AnsB, AnsC and AnsD.

    1. We change the format of these variables to number: #,###,### and 2 fixed decimal places. 
    2. The correct answer is: S (recall S=a+b=a+a*/100).

           So AnsA = round(S,2) 

Our choices for incorrect multiple choices are:

AnsB= round(a*p,2)

(forget to divide by 100 and to add a)

AnsC= round(b,2)

(forget to add a)

AnsD= round(a+a*(p+5)/100,2)

(add 5% to the value of p)

Here is our question:

Step 4: Save the file


Parking Place