Goal: I want students to enter values into a table then hit a submit button. Upon hitting the button, I want the table to provide checks and x’s to show correct and incorrect input as well as change the button text. I only want this to happen when the button is hit each time.
Problem: This works EXCEPT if you change a number in the table, the check or x with change before you hit the button again (which could allow kids to randomly guess until they just check a check mark).
Any advice is greatly appreciated!
Here’s what I have so far:
Screen 7 on this activity: 7.1.7 Scale Drawings (Y) ⢠Activity Builder by Desmos
TABLE:
a = table1.cellNumericValue(2,2)
b = table1.cellNumericValue(2,3)
c = table1.cellNumericValue(2,4)
d = table1.cellNumericValue(2,5)
capture(“a”): a
capture(“b”): b
capture(“c”): c
capture(“d”): d
t= button1.timeSincePress()
button = button1.pressCount()
cellSuffix(2,2):
when t<20 and button >0 and a = 28 “”
when t<20 and button >0 and a > 28 “”
when t<20 and button >0 and a < 28 “”
otherwise “”
cellSuffix(2,3):
when t<20 and button >0 and b = 15 “”
when t<20 and button >0 and b > 15 “”
when t<20 and button >0 and b < 15 “”
otherwise “”
cellSuffix(2,4):
when t<20 and button >0 and c = 24.8 “”
when t<20 and button >0 and c > 24.8 “”
when t<20 and button >0 and c < 24.8 “”
otherwise “”
cellSuffix(2,5):
when t<20 and button >0 and d = 1 “”
when t<20 and button >0 and d > 1 “”
when t<20 and button >0 and d < 1 “”
otherwise “”
BUTTON:
a = table1.cellNumericValue(2,2)
b = table1.cellNumericValue(2,3)
c = table1.cellNumericValue(2,4)
d = table1.cellNumericValue(2,5)
capture(“a”): a
capture(“b”): b
capture(“c”): c
capture(“d”): d
disabled: button1.pressCount = 4
label: when button1.pressCount = 1 “Check Answers: Try #2”
when button1.pressCount = 2 “Check Answers: Try #3”
when button1.pressCount = 3 “Check Answers: Try #4”
when button1.pressCount = 4 “No more tries”
otherwise “Check Answers: Try #1”