Desmos Math Drills | Desmos I cant figure out why a bug is happening… the second (lower) number isnt updating properly. when switching the amount of digits, the second number doesn’t change digits until the second time it’s run(command in line 62+61), and the second number refuses to comply to the condition that it has to be less than the first number (command in line 50) (you have to click new equation a few times to find one that happens to have the top number small than the bottom number). What am I doing wrong?? I scoured my equations and i got no clue. please help!! So so sorry if that explanation made zero sense… hopefully my graph will help fill in holes in my explanation.
Maybe there’s a hidden condition??
I’m not sure your explanation of the bug was pretty confusing
Everything in an action is run at the same time, so when S_{econdNum} is updated, S_{range} is defined by the value of F_{irstNum} before the action is run. In other words, it doesn’t update F_{irstNum} followed by updating S_{econdNum} (which depends on S_{range}) .
Instead of updating S_{econdNum} with an action, you can directly define it as S_{econdNum} = range(S_{range}). Since S_{range} is dependent on F_{irstNum}, it will automatically be re-calculated when the action updates F_{irstNum} and thus re-roll a new random S_{econdNum}.
1 Like
ohh that makes so much sense thank you
ugh you are a lifesaver