Table assessment for correctness

I am working with that now, but I am struggling a bit on how to reassign some of the code with a button missing. The button was capturing the inputs and then telling the table to assess. Without the button, how do I still capture the inputs?

my code, found only in the notes section:

figure1number = table3.cellNumericValue(1,3)
figure2number = table3.cellNumericValue(2,3)
figure3number = table3.cellNumericValue(3,3)
figure4number = table3.cellNumericValue(4,3)
figure5number = table3.cellNumericValue(5,3)

correct = when (figure1number =7 or figure1number=2)
and (figure2number = 5 or figure2number = 9)
and (figure3number = 15 or figure3number = 3)
and figure4number = 9
and (figure5number = 13 or figure5number = 4) “Correct” otherwise “Not there yet, keep working”

content:

"Complete the table by writing in which angle will make the statement true

Your answer: ${correct}."


His code:
table section:
check1=when this.cellContent(1,2)=“1” 1
otherwise 0

check2=when this.cellContent(2,2)=“2” 1
otherwise 0

check3=when simpleFunction(this.cellContent(3,1)).evaluateAt(2)=simpleFunction(this.cellContent(3,2)).evaluateAt(2) 1
otherwise 0

check4=when this.cellContent(4,2)=“4” 1
otherwise 0

cellContent(1,3): when Button3.lastValue(“r_1”)=1 “:white_check_mark:
when Button3.lastValue(“r_1”)=0 “:x:
otherwise “”

cellContent(2,3): when Button3.lastValue(“r_2”)=1 “:white_check_mark:
when Button3.lastValue(“r_2”)=0 “:x:
otherwise “”

cellContent(3,3): when Button3.lastValue(“r_3”)=1 “:white_check_mark:
when Button3.lastValue(“r_3”)=0 “:x:
otherwise “”

cellContent(4,3): when Button3.lastValue(“r_4”)=1 “:white_check_mark:
when Button3.lastValue(“r_4”)=0 “:x:
otherwise “”

Button section:
#Conditional label with limited number of button presses

pressLeft=simpleFunction(“5-x”,“x”).evaluateAt(this.pressCount)

disabled: this.pressCount=5

label: when this.pressCount =0 “Check Your Answer (5 left)”
otherwise “Check Again (${pressLeft} left)”

capture(“r_1”): Table3.script.check1
capture(“r_2”): Table3.script.check2
capture(“r_3”): Table3.script.check3
capture(“r_4”): Table3.script.check4