Jim Dougherty

  • IM / Open Up Grade 6
    • Grade 6: Unit 1 Area and Surface Area
    • Grade 6: Unit 2 Introducing Ratios
    • Grade 6: Unit 3 Unit Rates and Percentages
    • Grade 6: Unit 4 Dividing Fractions
    • Grade 6: Unit 5 Arithmetic in Base Ten
    • Grade 6: Unit 6 Expressions and Equations
    • Grade 6: Unit 7 Rational Numbers
    • Grade 6: Unit 8 Data Sets and Distributions
    • Grade 6: Unit 9  Putting it All Together
  • IM / Open Up Grade 7
    • Grade 7: Unit 1 Scale Drawings
    • Grade 7: Unit 2 Introducing Proportional Relationships
    • Grade 7: Unit 3 Measuring Circles
    • Grade 7: Unit 4 Proportional Relationships and Percentages
    • Grade 7: Unit 5 Rational Number Arithmetic
    • Grade 7: Unit 6 Expressions, Equations and Inequalities
    • Grade 7: Unit 7 Angles, Triangles, and Prisms
    • Grade 7: Unit 8 Probability and Sampling
    • Grade 7: Unit 9 Putting it All Together
  • IM / Open Up Grade 8
    • Grade 8: Unit 1 Rigid Transformations and Congruence
    • Grade 8: Unit 2 Dilations, Similarity, and Introducing Slope
    • Grade 8: Unit 3 Linear Relationships
    • Grade 8: Unit 4 Linear Equations and Linear Systems
    • Grade 8: Unit 5 Functions and Volume
    • Grade 8: Unit 6 Associations in Data
    • Grade 8: Unit 7 Exponents and Scientific Notation
    • Grade 8: Unit 8 – Pythagorean Theorem and Irrational Numbers
    • Grade 8: Unit 9 – Putting It All Together

How to use the “correct:” sink to auto-grade a Desmos problem

posted on January 28, 2021

One of the neat features of programming in the Desmos Computation Layer (CL) is the ability to see whether a student’s answer is correct or incorrect in the activity dashboard. To see this, you need to identify the “correct” answer in the CL.

The command for this is “correct:” and an example of its use would be:

correct: input.numericValue=2

This command would show the correct check when a student types the equivalent of the number `2` in the input (in this case it would be a math input). Note that any equivalent expression like 4/2 would also be interpreted correct answer in this example.

You can also identify multiple answers as correct using “or.” For example:

correct: input.numericValue=2 or input.numericValue=4

If there are multiple inputs for a slide, you can use “and” to set those parameters with the “correct:” sink. For example:

correct: input1.numericValue=5 and input2.numericValue=10

When you have multiple correct answers, it is important to use the “readOnly:true” command in the CL of the input that does not identify the “correct:” parameters. Otherwise, you will see a dot instead of a check when the inputs are correct. In the example above, if the “correct:” command is used in the CL of input1, in the CL of input2 you would write:

readOnly:true

You can use the “correct:” command only in the following inputs:

  • Math Input
  • Multiple Choice (This is unnecessary if you mark the correct answer in the choice box)
  • Checkboxes (This is unnecessary if you mark the correct answers in the choice box)
  • Graph
  • Table

Filed Under: Desmos Computation Layer