# Chemistry Formula

## Description

The Chemistry Formula question allows students to input full or partial chemical formulas into empty response boxes.

Figure 1 - Chemistry Formula question example.

## Create a Question

Enter the question stem in the Compose Question area. Below you will see the Template area. This is where you enter chemistry expressions and response boxes. This is a LaTeX only area and LaTeX can be entered using the LaTeX Keypad.

In order to add a response box you must enter {{response}} in the Template area. This field will indicate the position of an empty response box, but may be left empty in cases where only one response is required from the student. See example in Figure 2.

Figure 2 - Authoring a chemistry formula question.

Follow these steps in order to configure validation:

1. Insert a value in the Point(s) box to define a mark for the question. The default value is set to 1.
2. In the Correct tab, select a scoring method suitable for your question. There are various scoring methods available in chemistry question types. You can learn more about each of them and play with interactive examples on our Formula page. For this example we are going to choose equivLiteral, which will check if the student's response is literally equal to what is set in the validation area.
3. Now insert the correct response into the Value field. See example in Figure 3.

Figure 3 - Chemistry question validation.

4. Each scoring method has additional options that allows authors to set more precise validation conditions. A breakdown of all options associated with certain scoring methods can also be found in our Formula tutorials. When you select a scoring method all extra options will be displayed below the menu.
5. Some more complex chemistry questions will need a second scoring method applied. You can combine several scoring methods to set more strict validation rules. For instance, you may want the system to accept a response that is not only correct but is also given in certain measurement units. In this case, you would need to add another method called isUnit. Click on the +Add button below the first scoring method to add a new scoring method.

### More Options

Additional formatting options can be found under More Options:

#### Scoring

Unscored/Practice usage - Removes all scoring from the question.

Penalty point(s) - The value entered here will be deducted from the student for an incorrect answer.

Minimum score if attempted - Set attempt marks for the question.

Check answer button - Show or hide the Check answer button from the student.

Check answer attempts - The value entered here refers to how many times the student can use the Check answer button, before it is disabled.

#### Layout

Transparent background - If this is enabled, the background of the response area will match the colour of the rest of the background area.

Response minimum width (px) - Enter, in pixels, the minimum width of the response area.

Template font scale - Scales the font relative to the question's font size. The default value is 150%.

Response container (global) and Edit invidiual response containers - Configure the Width and the Height, in pixels, for either all response containers, or for specified response containers.

Show keypad hints - Enable or disable hints on the keypad, such as keyboard shortcuts and symbol group titles that are shown on the top left corner of the keypad when hovering over a symbol group key.

Symbols - Select what symbol groups will be shown to the student, or create custom symbol groups.

#### Text blocks

Use this option when you want to define a list of custom units (such as g, kg, cm, oz, etc.) that will not be rendered as LaTeX.

Example 1 - Chemistry formula question with default response box.

Hint Insert C6H12O6

{
"instant_feedback": true,
"stimulus": "<p>Enter the molecular formula for Glucose<\/p>\n",
"symbols": [
"chemistry"
],
"type": "chemistry",
"ui_style": {
"type": "block-keyboard"
},
"validation": {
"scoring_type": "exactMatch",
"valid_response": {
"score": 1,
"value": [
{
"method": "equivLiteral",
"options": {
"allowDecimal": false,
"inverseResult": false,
"ignoreOrder": false
},
"value": "C_6H_{12}O_6"
}
]
}
}
}

Example 2 - Chemistry Formula question with 1 response box.

Hint The correct answer is CH3(CH2)6CH3

{
"instant_feedback": true,
"stimulus": "<p><img alt=\"\" src=\"\/\/assets.learnosity.com\/organisations\/1\/octane molecule-hi.png\" \/><\/p>\n\n<p>Input the condensed structural formula of the above Octane molecule.<\/p>\n",
"type": "chemistry",
"template": "{{response}}",
"ui_style": {
"response_font_scale": "normal",
"type": "block-keyboard"
},
"validation": {
"scoring_type": "exactMatch",
"valid_response": {
"score": 1,
"value": [
{
"method": "equivLiteral",
"value": "CH_3\\left(CH_2\\right)_6CH_3",
"options": {
"ignoreOrder": false
}
}
]
}
}
}

Example 3 - Chemistry Formula question with customised response box width and height.

Hint 556g is a good answer.

{
"instant_feedback": true,
"response_container": {
"height": "60px",
"width": "200px"
},
"stimulus": "<p>What is the mass of a&nbsp;320cm<sup>3<\/sup> block of Magnesium if its density is 1.738g\/cm<sup>3<\/sup><span>?<\/span><\/p>\n",
"symbols": [
"chemistry",
"qwerty",
"basic",
"units_si"
],
"type": "chemistry",
"ui_style": {
"type": "block-keyboard"
},
"validation": {
"scoring_type": "exactMatch",
"valid_response": {
"score": 1,
"value": [
{
"method": "equivValue",
"options": {
"allowDecimal": false,
"inverseResult": false,
"ignoreOrder": false,
"decimalPlaces": 8
},
"value": "556g\\pm0.2"
},
{
"method": "isUnit",
"value": "g,\\ kg",
"options": {
"ignoreOrder": false
}
}
]
}
}
}

Example 4 - Chemistry Formula - Part of the question is entered into the Latex area with 1 response box.

Hint Insert this into the response box: 6O2(g)+C6H12O6(s)

{
"instant_feedback": true,
"is_math": true,
"stimulus": "<p>Input the product&nbsp;of the supplied reactants to balance this&nbsp;equation&nbsp;for Photosynthesis:&nbsp;<\/p>\n",
"symbols": [
"chemistry",
"qwerty"
],
"template": "6CO_2(g)+6H_2O(l)\\rightarrow{{response}}",
"text_blocks": [],
"type": "chemistry",
"ui_style": {
"type": "block-keyboard"
},
"validation": {
"scoring_type": "exactMatch",
"valid_response": {
"score": 1,
"value": [
{
"method": "equivLiteral",
"options": {
"allowDecimal": false,
"inverseResult": false,
"ignoreOrder": false
},
"value": "6CO_2(g)+6H_2O(l)\\rightarrow6O_2\\left(g\\right)+C_6H_{12}O_6\\left(s\\right)"
}
]
}
}
}