
5.6. Quiz App Projects Loops with Lists¶
This lesson reinforces the use of if/else statements and lists to keep accurate score in the Quiz app and introduces loops with lists by adding a search function which also uses a procedure with a parameter. Students are also given an opportunity to express their creativity by creating their own version of a quiz app on a different topic, and by adding an enhancement of their choosing to the app. The AP CSP pseudocode for lists is also reviewed.
CSP Framework | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||||||||||
Enduring Understanding AAP-2: The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values. | |||||||||||||||||||||||||||||||||||||||||
Learning Objective AAP-2.N.a: For list operations: a. Write expressions that use list indexing and list procedures. Learning Objective AAP-2.N.b: For list operations: b. Evaluate expressions that use list indexing and list procedures. | |||||||||||||||||||||||||||||||||||||||||
Learning Objective AAP-2.O.a: For algorithms involving elements of a list: a. Write iteration statements to traverse a list. Learning Objective AAP-2.O.b: For algorithms involving elements of a list: b. Determine the result of an algorithm that includes list traversals. | |||||||||||||||||||||||||||||||||||||||||
Professional Development
The Student Lesson: Complete the activities for Mobile CSP Unit 5: Lesson 5.6 Quiz App Projects.
Materials
- Presentation system (LCD projector/Interactive whiteboard)
- Access to computer, laptop, or Chromebook (install the Companion app on Chromebooks)
- Access to mobile device with the Companion app installed or access to the emulator installed on the computer or laptop.
- Loops with Lists Video
- Loops with Lists Slides
5.6.1. Learning Activities¶
Estimated Length: 90 minutes
- Hook/Motivation (10 minutes): The previous lesson focused on using a ListPicker component and creating lists to manage data. Recall with an elbow partner how you designed your app to manage the question and answer data in the Quiz tutorial. What component did you use and how did you represent the questions and answers in this lab? What are some possible enhancements you could do?
- Experiences and Explorations (25 minutes): Show the intro and loops with lists videos or present the information using the slides. Direct students to the Quiz App Mini Projects. Students work in pairs to complete the mini projects on their own.
- For mini project #1, keeping score accurately, you could demonstrate how the app can be "hacked" to earn higher scores if you only add a score variable without keeping track of whether a question has already been answered. (Hint: Answer any question correctly then click the Answer button repeatedly.)
- For mini project #2, talk about how a loop can be used to iterate through a list.
- As they work on their own quiz and enchancement (mini project #3), students should share and test their quizzes with each other to get feedback.
- Rethink, Reflect and/or Revise (10 minutes): Students make a new entry in their portfolios where they describe the modifications and enhancements that they made to the Quiz app. Also, ask the students to reflect on their programming experience. Discuss the the solutions to the mini projects as a class, especially the use of a list and the algorithm for keeping score and the loop for a search. Students should check their understanding by completing the interactive exercises. Any unfinished work should be completed as homework.
5.6.2. Professional Development Reflection¶
Discuss the following questions with other teachers in your professional development program.
-
I am confident I can teach this lesson to my students.
- 1. Strongly Agree
- 2. Agree
- 3. Neutral
- 4. Disagree
- 5. Strongly Disagree