Hint 2: Quiz with arrays: Repeating wrong answers

14 Jun 2024 - 18:23 | Version 1 |
  1. Create a boolean array (the size of the number of questions) and initialize all to false.
  2. When a question is answered correctly, set that element in the boolean array to true.
  3. To find a question that has not been answered correctly:
    1. generate a random integer in the range of questions
    2. while that question has been answered correctly
      1. generate another random integer in the same range
    3. return the random number that allowed the loop to exit
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine