Could Someone Give me with Creating Custom Interactive Desmos Activity Using Computation Layer?

Hello there,

I am fairly new to creating interactive Desmos activities and am looking for some guidance on how to best utilize the Computation Layer (CL) to enhance my lessons. I have gone through the basics; but I am still struggling with a few aspects of CL; and I wouldd really appreciate some help from more experienced users.

I want to provide real time feedback to students as they input their answers. For example; if they answer correctly; a text box displays Great job! and if the answer is incorrect, it says; Try again.

What is the best way to conditionally display this type of feedback based on their responses? :thinking:

Also, I have gone through this post; https://cl.desmos.com/t/using-the-mod-function-to-marks-school-work-minitab/ which definitely helped me out a lot.

I have a multi slide activity where students input a value on one slide, and I want that value to appear on a later slide. Is there an efficient way to pass data between slides? :thinking: I have read about using variables; but I am unclear on how to reference them across different screens.

Thank you in advance for your help and assistance. :innocent:

Welcome @komyash! In general, you can reference any variable from any named component using the following format. We also recommend naming components at the beginning of your CL to easily update a component’s name throughout the code by just changing it once. I’m just using an input as an example, but can be any component type

in = input
myVar = in.script.variableNameHere
inAString = "My variable is ${myVar}."  #similar for any latex or string like in numericValue

Some rules regarding referencing components. It is okay to have multiple components in an activity with the same name. Referencing a component with a shared name will default to the component on the same screen. If there isn’t one on the same screen, you’ll get an error and will need to give the components unique names.

For feedback, a basic setup is to define what correct is, then use that to define a string (e.g. in a note, an input suffix, or table cell suffix). You can also use that correct variable to define the correct sink (which helps determine the dashboard symbol)

correct = this.numericValue = 10
suffix: when isBlank(this.latex) "" when correct "✅" otherwise "❌"
correct: correct

There is a LOT of variation depending on what you’re looking for. There are many samples in the forum. Searching simply “correct” I see many threads right away that may be helpful to you. Enjoy your journey!