How do I use dictionary as answer key

I try this but it always show as correct even if it not corresponding to the keys. sorry for my bad english.

working fine for me

(Keep in mind, As per your logic, Both Key an Value must be same orelse tell us really what you want) I dont think so, you will will use the same

1 Like

I only make the key and value the same to make it easy for me to test it first but I am planning to replace it witth question and answers.

Then there is a problem with your blocks. You are comparing the value of the answer (?) (Textbox1.Text), when trying to get the the value of the answer (Textbox1.Text) as a key (this will not work). In your getValueForKey socket you need to put the question (label/textbox ?) in order to return the value (answer) to compare with the answer in Textbox1.Text.

Alternatively, if Textbox1.Text is your question, then you need to put the answer (other textbox/label) in the first compare socket.

if the answers are numbers, then it's ok.
but if the answers are long sentences, do they have to be exactly same?

1 Like

the answer are short, my questions are very simple like what color is a apple or what year is the moon landing.

1 Like

Then while calling the key value don't use the answer text box text , instead use the value of question lable text

1 Like

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