C
C#2y 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
phaseshift2y ago
Sure. What did you try, and where are you stuck?
cipro
ciproOP2y 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
bookuha2y ago
Why not dictionary?
cipro
ciproOP2y 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
phaseshift2y ago
Use console writeline to output stuff. If you want 10 questions, have 10 entries in the dictionary
cipro
ciproOP2y ago
console writeline in window forms? i tried that and when i ran the program, nothing was outputted on the form
phaseshift
phaseshift2y ago
Oh, wf? Use a text box or something?
cipro
ciproOP2y ago
yeah but like how do i get a user input and compare it to the real answer
phaseshift
phaseshift2y ago
Also from a text box
Accord
Accord2y 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.
Want results from more Discord servers?
Add your server