CompSci 06/101, Fall 2011, QUIZ HOWTO

Main Quiz interface

The quiz might run as follows: Welcome to Quizzer to test your facts! Which quiz would you like to take? a - state capital quiz b - multiplication/division quiz c - vocabulary quiz d - Exit Enter letter(a, b, c or d): a How many questions do you want?: 2 What is the capital of North Carolina? a - Raleigh b - Durham c - Asheville d - Charlotte Enter letter of answer: a That is correct! What is the capital of TN? a - Knoxville b - Bristol c - Memphis d - Nashville Enter letter of answer: a That is not correct, Nashville is the capital. You answered 1 of 2 questions correct. ------------------------------------- Your total is 1 of 2 questions correct. Which quiz would you like to take? a - state capital quiz b - multiplication/division quiz c - vocabulary quiz d - Exit Enter letter(a, b, c or d): b How many questions do you want?: 5 5 * 8 = 36 That is not correct, 5 * 8 = 40 3 * 1 = 3 That is correct! 14 / 2 = 7 That is correct! 2 * 8 = 16 That is correct! 81 / 9 = 9 That is correct! You answered 4 of 5 questions correct. ------------------------------------- Your total is 5 of 7 questions correct. Which quiz would you like to take? a - state capital quiz b - multiplication/division quiz c - vocabulary quiz d - Exit Enter letter(a, b, c or d): d Thanks for taking the quiz!

Math quiz

In the math quiz you want to ask any multiplication fact that uses the digits 0-12 or the corresponding division fact. For example 3*4, 4*3, 12/3 and 12/4 are all related. You could ask either 3*4 or 4*3 but not both in a quiz. You could ask both 12/3 or 12/4 in a quiz. Questions should be randomly generated and no question should be repeated in one quiz. Since questions cannot be repeated, you may want to generated a list of all possible questions. Then choose questions randomly from the list and remove them after they have been used. Since 4*3 is considered the same problem as 3*4 you could generate both but when one is used, remove the other one also. Or you could randomly generate just one of them each time. You should not always ask 3*4 and never ask 4*3. Since this leads to more division problems than multiplication problems you could force the problems to be about half multiplication problems and half division problems. You can do this for each question by randomly deciding if it will be a multiplication problem or a division problem. Someone pointed out that this approach for large quizzes may end up with mostly division questions at the end. That is fine. If you don't like this it is fine to just randomly pick the problems from both math and division. At any rate, be sure not to give the same problem twice. Document which approach you do in your Analysis file.

For this quiz, the user will type in the answer to the math problem and it needs to be checked with the correct answer. This is NOT a multiple choice question.

Vocabulary quiz

The vocabulary quiz will be a multiple choice question. The format of the data file is five words (or phrases) on each line with the first phrase/word the questions, the second one the answer, followed by three distractors. Here are sample lines from the file.

checkup:medical examination:commemorative:restriction:boaster aid:help:couch:robber:ship accuse:blame:frighten:laugh softly:slap assist:help:say:catch:menace

For example, checkup and medical examination mean the same thing, aid and help mean the same thing, accuse and blame mean the same thing, and assist and help mean the same thing.

Each quiz question should be randomly picked and the choices should be randomly shuffled. The same question should not be asked again in a quiz.

State Capitals quiz

The state capitals quiz will also be a multiple choice quiz. The format of the data file is one state and state information per line. Each line is in the format:

state:state abbreviation:capital city:other city:other city:other city where there can be 0 or more other cities listed. Here is a sample of a few lines in a data file. South Dakota:SD:Pierre Ohio:OH:Columbus:Toledo:Cleveland South Carolina:SC:Columbia:Charleston:Aiken:Spartanburg:Myrtle Beach:Edgefield:Cheraw:Anderson:Gaffney New York:NY:Albany:New York

If there are no other cities, you would need to look in the file of all the cities and randomly pick 3 distractor cities that are different. If there is one to two other cities listed, use them and pick 1-2 distractor cities to make 3 distractor cities total. If there are exactly three other cities listed use them. If there are more than three other cities listed for a state, randomly pick from those cities associated with that state.

In the example above for South Dakota, there are no other cities so three random cities from anywhere in the file are choosen, though they must be distinct. For Ohio, there are two other cities from Ohio listed. One city must be choosen randomly from the list of all cities. For SC, there are many other SC cities listed, so three random cities will be choosen from the SC other cities. For NY, there is one other city from NY which will be choosen. Two additional cities will be choosen randomly from the list of all cities.