# Advanced Variables for Scoring Questions

Feb 10, 2016

I have a question about a current course I'm working on. It has three drag and drop interactions. I want the learners to be able to retry each if they get it wrong before moving on to the next level. My question is... can I use variables to give them a score based on the number of attempts at each level?

###### 3 Replies

Perhaps you could try do something like this:

1. Create variables,  let’s say,  Attempt1, Attempt2, Attempt 3
2. Set the values to False.
3. When the learner completes the drag and drop activity, Attempt1 ‘s value turns to ‘True’. This change in value will take place irrespective of whether or not the answers are right or wrong.
4. You can have a button called ‘Attempt Again’.  This button will get activated only if the learner has got an answer wrong.
5. When the learner clicks this button, change the value of ‘Attempt2’ to true and that of Attempt 1 to False.
6. You could then perhaps assign score like Attempt1= 10, Attempt2= 8.
7. The Attempt whose value is True can be used to give score.

Let me know if this worked.  I hope I understood your question correctly.

That's exactly what I needed! Your instructions make sense. I'll try it out and let you know. Thank you!