Example: Use algorithmic values in an accounting question
Updated 28 Aug 2023
This example guides you through the steps to create a question that calculates the debt ratio of a company.
To begin, design your question and its algorithms on paper. Start with the static question and then convert the values to algorithmic.
Static question:
Here are key figures from the balance sheet of Conway Associates, Inc., at the end of 2012:
Total assets | $160,000 |
Current liabilities | 30,000 |
Total liabilities | 40,000 |
Retained earnings | 75,000 |
Total liabilities and stockholders' equity | 160,000 |
Net income | 5,000 |
What is Conway's debt ratio at the end of 2012? (Round your answer to two decimal places.)
Total liabilities/Total assets = $40,000/$160,000 = .25
Algorithmic question:
Here are key figures from the balance sheet of ~comp Associates, Inc., at the end of 2012:
Total assets | $~assets |
Current liabilities | ~cl |
Total liabilities | ~tl |
Retained earnings | ~re |
Total liabilities and stockholders' equity | ~assets |
Net income | ~netinc |
What is ~comp's debt ratio at the end of 2012? (Round your answer to two decimal places.)
Total liabilities/Total assets = ~tl/~assets= ~dr
The algorithmic values are defined in the following table:
Value | Type | Constraints | Notes |
---|---|---|---|
comp | Text | =("Conway", "Augusta", "Phoenix") | Company name |
assets | Integer | =(100000,120000,140000) | Total assets |
netinc | Integer | =(20000,15000,35000) | Net income |
dr | Decimal | =( .4, .5, .25) | Debt ratio |
tl | Integer | = ~assets * ~dr | Total liabilities |
cl | Integer | < ~tl =(50000,40000,30000) | Current liabilities |
re | Integer | < ~assets - ~tl =(60000,10000,25000) | Retained earnings |
Now that you have designed the question and the algorithms, you are ready to create your question and enter the algorithms.
- Open the Custom Question Builder.
- In the Create Custom Question wizard, select Start with an empty template and click Next.
- In the Choose Layout window, select Top/Bottom, and then click Next to open the Custom Question Builder with a blank problem.
- Click Show Algorithmic Values List to open the Algorithmic Values List window.
You use the Algorithmic Values List window with the Edit Algorithmic Values window to create the algorithmic values that you have defined. Use the table you created in the first section to help you enter the values.
To enter your algorithmic values:
- Click Add to bring up the Edit Algorithmic Values window, where you can enter your algorithmic values.
- Using the table of values, enter the value ~comp and its constraints:
- In the Algorithmic Value Name box, replace the default name
V1
withcomp
. - In the Select Type of Algorithmic Value section, select Text or Symbol.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
"Conway"
. Be sure to put quotes around the entry. - For the second constraint, select = from the Relational Operator dropdown list and enter
"Augusta"
as the constraint value. - For the third constraint, select = from the Relational Operator dropdown list, and enter
"Phoenix"
as the constraint value. - Click the Options tab and in the Authoring Notes box, enter the note:
Company name
. - Click Save to enter your value in the Algorithmic Values List. Your entry looks like this:
- In the Algorithmic Value Name box, replace the default name
- Click Add and enter the value ~assets and its constraints:
- In the Algorithmic Value Name box, replace the default name with
assets
. - In the Select Type of Algorithmic Value section, select Integer.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
100000
. Do not enter commas. - For the second constraint, select = from the Relational Operator dropdown list, and enter
120000
as the constraint value. - For the third constraint, select = from the Relational Operator dropdown list, and enter
140000
as the constraint value. - Select the Use commas or spaces between periods box so the amount displays in the correct format (for example, 100,000).
- Click the Options tab and in the Authoring Notes box, enter the note:
Total assets
. - Click Save.
- In the Algorithmic Value Name box, replace the default name with
- Because ~netinc is similarly defined, you can duplicate ~assets and edit the algorithmic values to define ~assets:
- Make sure your cursor is in the row for the algorithmic value ~assets and then click Duplicate.
- Click Edit at the beginning of the row of the new algorithmic value to bring up the Edit Algorithmic Value window.
- In the Algorithmic Value Name box, replace the default name with
netinc
. - In the List Values or Set Up Constraints section, replace each variable with the correct net income selection (20000, 15000, and 35000).
- Click the Options tab, delete the notes already there, and enter
"Net income"
in the Authoring Notes box. - Click Save to enter your value in the Algorithmic Values List. Your entries looks like this:
The entries in the Value column of your version of the question might vary from this example because they are algorithmically generated.
- Click Add and enter the value ~dr and its constraints:
- In the Algorithmic Value Name box, replace the default name with
dr
. - In the Select Type of Algorithmic Value section, select Decimal.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
.4
. - For the second constraint, select = from the Relational Operator dropdown list, and enter
.5
as the constraint value. - For the third constraint, select = from the Relational Operator dropdown list, and enter
.25
as the constraint value. - Click the up arrow after Number of Decimal places to show two decimal places.
- Click the Options tab and in the Authoring Notes box, enter the note:
Debt ratio
. - Click Save.
- In the Algorithmic Value Name box, replace the default name with
- Click Add and enter the value ~tl and its constraints:
- In the Algorithmic Value Name box, replace the default name with
tl
. - In the Select Type of Algorithmic Value section, select Integer.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
~assets * ~dr
. Be sure to precede algorithmic value names with a ~ (tilde), such as ~assets. - Select the Use commas or spaces between periods box so the amount displays in the correct format (for example, 100,000).
- Click the Options tab and in the Authoring Notes box, enter the note:
Total liabilities
. - Click Save.
- In the Algorithmic Value Name box, replace the default name with
- Click Add and enter the value
~cl
and its constraints:- In the Algorithmic Value Name box, replace the default name with
cl
. - In the Select Type of Algorithmic Value section, select Integer.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
50000
. Do not enter commas. - For the second constraint, select = from the Relational Operator dropdown list, and enter
40000
as the constraint value. - For the third constraint, select = from the Relational Operator dropdown list, and enter
30000
as the constraint value. - For the fourth constraint, select < from the Relational Operator dropdown list, and enter
~tl
. Be sure to precede algorithmic value names with a ~ (tilde). Selecting < ensures that the value of current liabilities is always less than total liabilities. - Select the Use commas or spaces between periods box so the amount displays in the correct format (for example,100,000).
- Click the Options tab and in the Authoring Notes box, enter the note:
Current liabilities
. - Click Save.
- In the Algorithmic Value Name box, replace the default name with
- Click Add and enter the value
~re
and its constraints:- In the Algorithmic Value Name box, replace the default name with
re
. - In the Select Type of Algorithmic Value section, select Integer.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
60000
. Do not enter commas. - For the second constraint, select = from the Relational Operator dropdown list, and enter
10000
as the constraint value. - For the third constraint, select = from the Relational Operator dropdown list, and enter
25000
as the constraint value. - For the fourth constraint, select < from the Relational Operator dropdown list, and enter
~assets - ~tl
. Be sure to precede algorithmic value names with a ~ (tilde). Selecting < ensures that the value of total liabilities + retained earnings is always less than the total assets (which allows for the common stock value). - Select the Use commas or spaces between periods box so the amount displays in the correct format (for example,100,000).
- Click the Options tab and in the Authoring Notes box, enter the note:
Retained earnings
. - Click Save.
When you have finished, your Algorithmic Values List looks like this:
The entries in the Value column of your version of the question might vary from this example because they are algorithmically generated.
If you see an ERROR! message telling you that a value could not be found, click Regenerate algorithmic values to update the constraint definitions in the table.
- In the Algorithmic Value Name box, replace the default name with
- Click Close in the Algorithmic Values List window to return to your question.
First enter your problem statement and then the answer.
Entering the problem statement
To enter the problem statement:
- In the problem statement area, remove the default text and type the problem statement:
Here are key figures from the balance sheet of
- Add a space and then click the Algorithmic Values button in the left menu to view a list of algorithmic variables and their current values.
- Select the entry for comp.
The current value of comp is inserted in the problem statement highlighted in lavender to show that it's algorithmic. If you click Show Algorithmic Value Names in the Algorithmic Values toolbar, the algorithmic value name now appears instead of the current value. You can toggle between the value and name by clicking this button.
- Add a space after the value you just inserted and continue entering the problem statement:
Associates, Inc., at the end of 2012
Total assets $
Current liabilities
Total liabilities
Retained earnings
Total liabilities and stockholders' equity
Net income
- Place your cursor after the $ in total assets then click Algorithmic Values and select the entry for assets to insert it into your question. Do this for each value in the table.
- Continue entering the problem statement:
What is
- Add a space, click Algorithmic Values, and select the entry for comp to insert that value in your question.
- Finish entering your problem statement as follows:
's debt ratio at the end of 2012? (Round your answer to two decimal places.)
Entering the student interaction
To enter the student interaction (answer):
- On the Interaction area (under the blue line), enter the answer text:
The debt ratio at the end of 2012 is
- With your cursor at the end of the line, add a space and then click Short Answer under Student Interactions in the left menu. This option opens the Edit Answer Definition window, where you define your answer.
- In the Edit Definition window, click on Step 1.
- Select Accept any unsimplified or simplified equivalent answers and then click Next to go to Step 2.
- On the Define Answers page, click the first row under Value box in the table. When your cursor is visible in the row, right-click and select Editing Options from the menu.
- Select Algorithmic Values from the menu.
- Select ~dr from the list of algorithmic values to insert it in the Value box. Then click Next to go to Step 3.
- If you want to set up tolerance or any other answer acceptance conditions, do so here. Otherwise leave all setting in their default state. Then click Next to go to Step 4.
- On the Edit Feedback page, enter this message in the Incorrect Feedback box:
Recall the formula to calculate the debt ratio. Check your calculation carefully and round your answer to two decimal places.
- Click Save to close the Edit Answer Definition window.
If you are showing algorithmic value names, your question looks something like this:
- Click Regenerate Values several times to verify that your algorithms are working correctly.
- Click Preview Exercise and enter an incorrect answer.
- Check your answer to see the feedback message.
- Regenerate the question several times to make sure your algorithms work as intended.
You can regenerate the question by clicking Similar Exercise on the bottom right of your preview window.
- Close the Preview window.
- When you are sure that your question is working correctly, click Save.
- Give the question a name and select Algorithmic as the format.
- Optionally add a textbook association and keywords.
- Click OK to save your question.
After you have saved your question, you can add it to an assignment.