**Introduction**

LodeStar Web Journal entries emphasize the importance of practice and immediate feedback. The Word Problem widget helps you put that tenet into practice. With the Word Problem Widget, you can construct a word problem with both sentences and variables. You define a variable, such as {principle} and fill in details about how large a number can be randomly assigned to this variable. The variable is used in an expression (formula) that calculates the correct answer and matches it against the student’s submitted answer.

All of this is difficult to understand in the abstract. We’ll make this concrete.

For example, you enter the following word problem:

John Smith opens a savings account with a {rate}% interest rate, compounded annually. How much will his account be worth in {time} years after he makes this one-time deposit of ${pv}.

The variables in the above word problem are {rate}, {time} and {pv}.

**Note that variables are surround by curly braces {}. Variables cannot begin with numbers; they are case sensitive; and they must be ***one* word.

In the widget, you define the range that can be used for each of these variables. {rate} might be a decimal number ranging from .01 to .05. {time} might an integer (a whole number) from 1 to 10 years. {pv} might be 1000 to 10000.

The expression is:

{pv} * (1 + {rate})**{time}

Where,

each variable is surrounded by {}

* is the multiplication operator

( ) controls order of precedence

** is the exponent operator

One student might see:

John Smith opens a savings account with a 0.01 interest rate, compounded annually. How much will his account be worth in 8 years after he makes this one-time deposit of $1545.

The next student might see:

John Smith opens a savings account with a 0.05 interest rate, compounded annually. How much will his account be worth in 5 years after he makes this one-time deposit of $1000.

We’ll cover how to do this step by step.

**Getting Started**

**STEP ONE**

Start with a Text Page. Place your cursor somewhere on the Text page and then select the black sprocket from the HTML Editor Tool Bar.

**STEP TWO**

Select a widget type. For the purposes of this article, I’ll choose the Word Problem Widget.

Widget Menu

**STEP THREE**

Type in the word problem.

John Smith opens a savings account with a {rate} interest rate, compounded annually. How much will his account be worth in {time} years after he makes this one-time deposit of ${pv}.

The words John Smith will never change. They are constants. {rate} will be replaced with a value in the range that you specify.

Word Problem Widget Dialog

Assign this word problem a number of points by filling in the Point Value at the top right.

**STEP FOUR**

Type in one of the variables that you used in the ‘Variable’ field. Our first variable is ‘rate’. Give rate a min value of .01 and a max value of .05. Rate is not an integer. Select ‘no’ for the Integer field. Rate needs a precision of two decimal places.

Click on the ‘+’ button to add more variables.

**STEP FIVE**

Type the expression in the expression field. There is only one expression per question.

Type in the following:

PV * (1 + rate)**time

That reads PV times 1 + rate raised to the power of time.

Here are the most common operators, which follow W3C standards for JavaScript operators:

( ) Expression grouping (3 + 4)

! Logical not !(x==y)

** Exponentiation 10 ** 2

* Multiplication 10 * 5

/ Division 10 / 5

% Modulo division 10 % 5

+ Addition 10 + 5

– Subtraction 10 – 5

**STEP SIX**

Once you have added as many variables as you need, click on the ‘Ok’ button.

After you click on ‘Ok’, you will see a placeholder for the widget activity. The placeholder will always be some content surrounded by a round-cornered border.

Author’s view of the Word Problem Widget

This is not what the student will see. You must click on the ‘Preview’ button at the top left to see the widget converted into a word problem.

Student view of a Word Problem.

You can add as many widgets to a page as you wish.

**Conclusion**

This Widget allows you to present a word problem with values substituted for variable names. Once the student submits the answer to the problem, the Widget evaluates the answer with the help of the expression that you designed.

Each time the student refreshes the browser page, s/he will be presented with a different problem. Problems will also vary between students.

The Word Problem widget enables you to support student practice with math problems and provide immediate feedback. Early activities can be simpler to solve. Later items can be more challenging.