Others
Assessment
CenterForComputing
ChatGPT
Search
Close
Log in
Register
CenterForComputing
You are here:
CenterForComputing
»
Syllabi
»
SyllabiFall2024
»
CSC121SylF2024
»
CSC121F2024Lab10
»
CSC121F2024Lab10Hint2
Hint 2: Quiz with arrays: Repeating wrong answers
14 Jun 2024 - 18:23
|
Version
1
|
UnknownUser
Create a boolean array (the size of the number of questions) and initialize all to false.
When a question is answered correctly, set that element in the boolean array to true.
To find a question that has not been answered correctly:
generate a random integer in the range of questions
while that question has been answered correctly
generate another random integer in the same range
return the random number that allowed the loop to exit
Attachments
($count)
Show options
Search:
Sort by:
Name
Date
Author
Size
Type
Results per page:
6
12
24
48
all
Display hidden:
More actions
Create link(s)
Embed
Download
Hide
Unhide
Move
Delete
0
attachment(s)
Select all
Clear all
Copyright © 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