Use math inputs to satisfy equation

Students input math values for A, B, C and D. I want to give them feedback as to whether or not their values satisfy the equation: A^2C + B^2D = 297. Can you help me, please?

Which option do you want the formatting of the equation to be, the first or second one in this image? I’m guessing the first, but I don’t want to assume. :grin:


The second. Sorry. I should have made that clear.

Hi. I’m trying to do the second way you wrote. I suppose either way would be beneficial in that I am trying to learn how to use Demos and am not sure about how to do so much in the CL. I don’t know how to take what the student types as inputs and make an equation out of it… And compare that against a number. The problem originates by me giving two adjacent rectangles on the y axis, and rotating them to form a composite of two cylinders. Students have to give the dimensions of the rectangles that would result in a volume of 297 pi. Both the terms have pi in them, so I dropped the pi from the equation I gave you. Sorry to be so wordy and not be more clear to begin with.

Is this what you are envisioning? (At least, the functionality.)

There are MANY ways to break that, but just seeing if that’s your idea.

1 Like

Thanks so much. I learned a lot from your input. Here is what I came up with:

1 Like

Be sure to rename components when you copy screens! You have identically named components (the inputs) a, b, c, d on screens 1 and 2 now.

It’s okay to have duplicate component names. Any CL code will assume you intend the component on the current slide. It will only have a problem if duplicate names are both on other slides.

Oh, interesting. Mark’s version didn’t work for me until I renamed the components on his screen 2… but now it does work (he didn’t change a thing). I must have done something wrong :slight_smile:

It does make sense CL to assume you are referencing something on the same screen unless you try to reference components on other screens!