1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
My program is designed for students who are just beginning to study computer science or related fields. One common need for this user is to understand technical acronyms, which can be confusing at first. To meet this need, my program uses a flashcard game structure that makes learning acronyms easier to memorize. The design includes immediate feedback after every step the user does while playing, making the experience fun and with a supportive environment.
Question 1
A condition that would cause this loop to not terminate and lead to an infinite loop would be if I accidentally forgot to update i inside the loop like writing for (var i=0; i < userAnswers.length;). Without i++, i would never increase, and the loop would keep checking the same index forever.
To test this, I would try entering answers until the end of the quiz and see if any errors pop up in the console. I also use feedback like “Incorrect. The correct answer was: “ + correctAnswer to make sure the answer displayed actually matches the user’s question.
This list is used later in the countCorrectAnswers() function to calculate how many answers the user got right. The loop goes through the list and adds one to the count every time isEqual(userAnswers[i], true) returns true. This lets me easily give the user their final score in a flexible, dynamic way, even if I later decided to add more questions.