# Multiple "checks" in one component possible?

Is there a way to do multiple “checks” for multiple variables in ONE component? I’ve only been doing one per component. I use these in grade calculations at the end.

“check = when isCorrect2 1
otherwise 0.5”

Here’s the Activity:

Your activity gave me some wonderful ideas for organizing work. Thank you!

Check is a variable you’re creating, so it can really be called anything. You can remove all references for all checks in all other components and put this in your component on page 4:

#SUMMING POINTS
pointsEarned = numericValue(${this.script.checkiA} +${this.script.checkiB} + ${this.script.checkiC} +${this.script.checkgraph1X} + ${this.script.checkgraph1C_C} +${this.script.checkgraph1A_C})
pointsPossible = 8

percentScore = numericValue(\operatorname{round}\left(100*${pointsEarned}/${pointsPossible},1\right))

cellContent(1,1): ${pointsEarned} cellContent(1,2): ${pointsPossible}
cellContent(1,3): \${percentScore}

checkiA = when iA.latex = “x=-1” 5 # key & points worth here
when iA.latex = “x=” 0 # note QUOTATION for this one, key & points worth here
otherwise 2.5 #BECAREFUL I’ve accidentally used Capital X instead of lowercase x and “when” can’t distinguish.
checkiB = when iB.latex = (-1,-8) 5 # key & points worth here
when iB.latex = “(,)” 0 # note QUOTATION for this one, key & points worth here
otherwise 2.5
checkiC = when iC.latex = (0,-6) 5 # key & points worth here
when iC.latex = “(0,)” 0 # note QUOTATION for this one, key & points worth here
otherwise 2.5
checkgraph1X = when graph1.number(“X”)=1 1 #like a nested if statement. Do I only need ONE otherwise?
otherwise 0.5 #BE
checkgraph1C_C = when graph1.number(“C_C”)=1 1
otherwise 0.5
checkgraph1A_C = when graph1.number(“A_C”)=1 1 #like a nested if statement. Do I only need ONE otherwise?
otherwise 0.5 #BE

Thank you very much. You’re very thorough and concise. Have a nice Holiday.