C
C#3y ago
cipro

❔ Comparing an answer to a question stored in a list

hi, so im doing a spanish learning program and was stuck on this bit. i basically want to store the question and answer of the question in either 2 lists of 2 seperate arrays. and then i want to make a variable for the user input, lets say UserInput and i want to compare each word in the variable to each element in the list/array, and the score then incrememnts for each word that is correct in a sense. can someone help pls.
10 Replies
phaseshift
phaseshift3y ago
Sure. What did you try, and where are you stuck?
cipro
ciproOP3y ago
im just really stuck on how to actually code it to be honest. its my first time doing such a project on windows forms so i wanted to ask for some help
bookuha
bookuha3y ago
Why not dictionary?
cipro
ciproOP3y ago
okay yeah that would work too its just how would i do it for 10 different questions and how do i output it?
phaseshift
phaseshift3y ago
Use console writeline to output stuff. If you want 10 questions, have 10 entries in the dictionary
cipro
ciproOP3y ago
console writeline in window forms? i tried that and when i ran the program, nothing was outputted on the form
phaseshift
phaseshift3y ago
Oh, wf? Use a text box or something?
cipro
ciproOP3y ago
yeah but like how do i get a user input and compare it to the real answer
phaseshift
phaseshift3y ago
Also from a text box
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?