Triangle Attributes: Help with answer check

After many attempts, I can’t get the choice select and angle measures in the graph to check correctly. Any help would be great.

Here’s the cl in the graph:

readOnly: true

isCorrect=
(choice1.isSelected(1) and right=1)
or (choice1.isSelected(2) and acute=1)
or (choice1.isSelected(3) and obtuse=1)

angle1=graph3.number(A_{1})
angle2=graph3.number(A_{2})
angle3=graph3.number(A_{3})

right= when angle1=90 or angle2=90 or angle3=90 1 otherwise 0
acute= when angle1<90 and angle2<90 and angle3<90 1 otherwise 0
obtuse= when angle1>90 or angle2>90 or angle3>90 1 otherwise 0

Here’s the cl in the choice component:

correct: graph3.script.isCorrect

Thanks in advance for any help!

This is such a cool activity!

It looks like the A, B, and C variables are becoming undefined when you lock the points for the animation, which then causes the distances to be calculated incorrectly. I swapped out the distance calculations with the following:

After making this change, it looks like it was checking triangles correctly! Hope this fixes it for you.

Awesome!

When I made those changes to mine, it gave a bunch of warnings.

Can you share the edited lesson link with me?

Of course!

1 Like

Thanks! This works great! I also updated the text feedback to line up with the question also.

Thanks! Here’s the finished lesson if ya wanna check it out. It includes other slides also to make a complete lesson.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.