Home‎ > ‎

Post-Quiz Tutorial Worksheet

Post-Quiz Tutorial Worksheet


0. What variables do you define for the President's Quiz app?
  • First you define a variable called "currentquestionindex" in order to index each question. You also define variables for the images, questions, and answers.



1. The app has a Next button but not a previous button to let the test taker go backwards. Sketch the blocks for the PreviousButton.Click event-handler (Assume you have a list variable QuestionList , and index QuestionIndex and a PreviousButton for the user to navigate through the questions.





2. Suppose you have an AnswerList variable with answers corresponding to each question, an AnswerTextBox in which the user enters an answer, an AnswerButton that the user clicks to submit the answer, and a StatusLabel where the app tells the user if they are right or wrong. Show the event handler for the AnswerButton.Click event so that the user is notified if they are right or wrong.






3. In the President's quiz tutorial of the book (chapter 8) how exact must a user's answer be to get it correct? How could you modify the app so that it "grades" more flexibly. To answer this question, check out the operations in the "Text" palette within the App Inventor blocks editor.

  • A user's answer must be exact because the blocks are case sensitive. By adding a "downcase" text operation in front of the "AnswerTextBox.Text," this will allow the answer to be case-insensitive.




4. Explain how you would modify the app into a multiple choice quiz in which the user chooses from answer choices a-d.

  • Modifying this app into a multiple choice quiz requires adding a list picker that allows the user to open a separate screen that shows the possible answers. You must define a new variable of answer choices and essentially insert lists within this list. Each question in the quiz will have a list within the defined list "answerchoices."



5. Does the President's quiz have fixed data or user generated data? How useful is the app because of this. How could you fix
  • This quiz uses fixed data which does not allow the user to create questions. This could be fixed by adding text boxes that allow the user to create questions and then add them to the list list of questions with an index for each answer.
this?
Comments