AP CSP CodeX - Mission 7: Personal Billboard (Obj. 1-6)
Mission 7: Personal Billboard (Obj. 1-6)
Students program the CodeX buttons to scroll through a list of images, and use nested if statements to avoid an index out of range error.
Overview
Mission 7 is divided into two lessons. In this first lesson (Objectives 1-6), students use the CodeX display and buttons to build a billboard that shows a mood, a fun picture, or an occasion. They program the buttons to select an image, scroll through a series of images in both directions, and use nested conditional statements to avoid an index out of range error. Then they store the images in a list, which makes it easy to add lots more. The Mission 7 Obj 1-6 Assignment guides students with notes and questions along the way.
🎯 Mission Goal: Students will use images to display a mood or occasion by pressing a CodeX button.
Learning Targets
- I can create a list to make my code more efficient.
- I can use if statements to scroll through a list.
- I can use a nested if/else conditional statement to prevent an index out of range error.
Key Concepts
-
In Python,
==is used to compare two values for equality. - CodeSpace lets you inspect variables in the debugger.
- A Python list is a powerful way to hold a collection of objects.
Assessment Opportunities
- Mission 7 Obj 1-6 Assignment
- Quiz after Mission 7 Objective 3
- Quiz after Mission 7 Objective 6
- Billboard program (through Objective 6)
Success Criteria
- Program the buttons to select from a series of images to show
- Create a list of images
- Use conditional statements to scroll through a list
- Use nested conditional statements to avoid index out of range errors
- Change the code to make it easy to add more images and items to a list
Digital Resources
- ▸Mission 7 Obj 1-6 Assignment
- ▸Code Solutions and Assignment Answers - Teacher Dashboard > Educator Resources button
- ▸Mission 7 Kahoot! Review
Classroom Materials
- ▸CodeX
- ▸USB-C cable
- ▸Computer
Real-World Applications
Extensions & Cross-Curricular
🔤
Vocabulary
▾
🐍
New Python Code
▾
LAST_INDEX is a constant. Its value does not change, so it is written in ALL CAPS.
📐
Standards
▾
CSTA Standards - Grades 9-10
CSTA Standards - Grades 11-12
AP CSP Framework - Learning Objectives
AP CSP Framework - Computational Thinking Practices
- The assignment is best completed digitally. Prepare the assignment to give through your LMS.
- If you have a word wall, or another form of vocabulary presentation, prepare the new terms.
- Have the Mission 7 Kahoot! Review ready in case you have time at the end of the lesson.
- Mission 7 may take a little over a class period, so it is divided into two lessons. This page covers Objectives 1-6.
- Objective 4 introduces the term "nested condition," which is not specifically mentioned in the CodeSpace instructions, but it is a topic covered on the AP exam. You may want to emphasize this.
- Objective 6 introduces the term "data abstraction," which is not specifically mentioned in the CodeSpace instructions, but it is a topic covered on the AP exam. You may want to emphasize this.
- After Objective 6 and the quiz, students continue the assignment by adding more than five items to their list. Here is a list of all the built-in images:
- pics.HEART
- pics.HEART_SMALL
- pics.MUSIC
- pics.HAPPY
- pics.SAD
- pics.SURPRISED
- pics.ASLEEP
- pics.TARGET
- pics.TSHIRT
- pics.PLANE
- pics.HOUSE
- pics.TIARA
- pics.ARROW_N
- pics.ARROW_NE
- pics.ARROW_E
- pics.ARROW_SE
- pics.ARROW_S
- pics.ARROW_SW
- pics.ARROW_W
- pics.ARROW_NW
- If you have time at the end of the lesson, use the Mission 7 Kahoot! Review. All questions on the review are covered in the first 6 objectives.
- Refer to the lesson plans in the Python with CodeX Mission Pack Curriculum for additional challenges, cross-curricular suggestions, and additional information.
Lesson Outline
This outline gives the narration for one way to present the lesson.
Use a discussion strategy, like journaling, working at boards, selecting random students, or a form of think-pair-share.
Topic: Ask students about lists. What are some lists you use in everyday life (playlist, contact list, grocery list, to-do list, etc.)? When might you want to use a list in a program?
Randomly group students into pairs for pair programming (or they can work individually).
Students log in to one computer. Two computers can be used if they want to have the activity guide open on one computer and CodeSpace on the other.
Students go to make.firialabs.com and should be at the beginning of Mission 7.
✅ The assignment is complete and ready to turn in. You can decide if you want students to turn in the program up to this point, or wait until the end of Mission 7.
Use a formative assessment for the wrap-up.
Formative assessment:
- Daily reflection journal
- Mission 7 Kahoot! Review (in class or individual). All questions can be answered during Objectives 1-6.
- Exit ticket on lists or nested if statements
- Group review on lists or nested if statements