Difference: CSC121F2025Lab09Hint01 ( vs. 1)

Revision 12025-09-03 - CathyBareiss

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CSC121F2025Lab09"

Hint 1: picking the next question to ask

  • This task is easiest done with a boolean array. Each element is initially set to false (indicating that specific question has not yet been answered correctly). When a question is answered correctly, that entry in the boolean array is set to true.
  • To pick a question, use a while loop (that is primed with a question number picked randomly) that continues to pick new random numbers until that entry in the array is false (i.e. not answered correctly). Eventually it will find one
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback