AP CSP CodeX - PT Practice Lesson 1
PT Practice Lesson 1
Students remix the Pixels1_matrix program to meet the requirements of the Create Performance Task.
Overview
Students work on computers in the CodeSpace Sandbox. This lesson is not part of a mission. Students remix the Pixels1_matrix program to meet the requirements of the Create PT, working individually or with a partner. They follow the slides to add a second list, move the code into a function, add a parameter, and use the parameter in the function. Students then brainstorm their own remix ideas in the Activity Guide and complete the wrap-up questions.
🎯 Mission Goal: Students will complete a program that meets the Create PT requirements.
Learning Targets
- I can create and use a list in a meaningful way.
- I can create a function with a parameter, selection and iteration.
- I can use the parameter in an if statement.
Key Concepts
- The Create PT has specific requirements for the program students create.
- The parameter does not have to be used in an if statement, but it should have an effect on the functionality. The easiest way to do this is to use the parameter in an if statement.
Assessment Opportunities
- PT Practice Lesson 1 Activity Guide
- Daily reflection or journal entry
- Wrap-up questions
- Completed program
- Exit ticket
- Optional - a writing prompt from the Create PT Writing Prompts for students to write about their code
Success Criteria
- Create a list
- Use the list in a loop
- Create a function with a parameter
- Create a function that has a loop and if statement
Digital Resources
- ▸PT Practice Lesson 1 slides
- ▸PT Practice Lesson 1 Activity Guide
- ▸Optional: AP CSP Student Handouts
- ▸Optional: Create PT Writing Prompts
- ▸Optional: Survival Guide
- ▸Code Solutions and Assignment Answers - Teacher Dashboard > Educator Resources button
Classroom Materials
- ▸CodeX
- ▸USB-C cable
- ▸Computer
Extensions & Cross-Curricular
📐
Standards
▾
CSTA Standards
The Create PT Prep unit reviews the CSTA Standards for Units 1, 2 and 3.
AP CSP Framework
- Prepare the Activity Guide to give to students. It is used for notes during the lesson, brainstorming remix ideas, and the wrap-up questions.
- Make sure students have the Pixels1_matrix program from Traversing a List #2 completed and accessible, or have the starter code ready to give them.
- Students complete this lesson on the computer, using the Sandbox in CodeSpace for programming. This lesson is not part of a mission.
- Students remix the Pixels1_matrix program to meet the requirements of the Create PT.
- The best experience will come from students modifying their own code. However, we want all students to be engaged, so you can give them the original code to remix if needed. The last version of the Pixels1_matrix program can be found in Traversing a List #2.
- Follow the slides for instructions and guidance. Additional help is provided in the Lesson Outline below.
- Solution code for the final remix is provided.
- Requirements note: The function created by the student needs to have a parameter that has an effect on its functionality. This can be accomplished many ways. But students need to be able to understand how this works, and they may be asked to give two different function calls that run different parts of the function, or why it does not run different parts of the function. The wording has changed a little bit over the last couple of years. From a reader's viewpoint, the easiest way for students to be able to respond to this type of question is to use the parameter in an if statement, and for the if statement to be near the beginning of the function. All the examples in this unit will meet the requirement in this way.
Lesson Outline
This outline gives 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. Slides 2-4:
- Review the requirements for the Create Performance Task.
- Review how the Create PT is like a remix project.
💻 Students can work individually or with a collaborative partner.
Important: Students will use the Pixels1_matrix program from Traversing a List #2. They need to have it completed and accessible. Alternatively, you can give students the code as a starter from the traversing lesson.
turn_pixels(pix_info[index][0], pix_info[index][1]). The final code for this step is on slide 12.The wrap-up reviews their programming process and gives potential writing prompts. If time permits, have students review each other's responses. Or select a couple responses and anonymously display them with the class and discuss if the response answers the question.
✅ Formative assessment:
- Daily reflection or journal entry
- Wrap-up questions
- Completed program
- Exit ticket
- Optional - pull a writing prompt from the Create PT Writing Prompts and have students write about their code