Lesson 4: Variables Make
45 minutes
Overview
Using Programming Patterns and a step-by-step approach students make their own version of a Photo Liker app. At the beginning of the lesson students are able to explore a working version of the app. They are then given the design elements of the app but begin with a blank screen. A progression of levels guides students on the high level steps they should use to develop their app but leaves it to them to decide how to write the code. At the end students submit their apps and answer a free-response question in the style of a Create performance task written response prompt. Student apps and written responses can be assessed using a provided rubric.
Purpose
This lesson is an opportunity for students to take on the "blank screen" and build the code that runs an app entirely from scratch. Guidance provided throughout the lesson helps students break down the large task of "building an app" into more incremental steps that they can use on future projects, including this unit's final project and the Create PT.
Standards
AP - Algorithms & Programming
- 2-AP-11 - Create clearly named variables that represent different data types and perform operations on their values.
- 2-AP-19 - Document programs in order to make them easier to follow, test, and debug.
Agenda
Objectives
Students will be able to:
- Implement programming patterns with variables to develop a functioning app
- Recognize the need for programming patterns with variables as part of developing a functioning app
- Use debugging skills as part of developing an app
- Write comments to clearly explain both the purpose and function of different segments of code within an app
Preparation
- Review the different steps students will be asked to complete as they build the app
- Review the information covered in the slides
- Review the Free-Response Supports and consider which, if any, supports are suitable for your classroom.
- Check the "Teacher's Lounge" forum for verified teachers to find additional strategies or resources shared by fellow teachers
- If you are teaching virtually, consider checking our Virtual Lesson Modifications
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the teachers
- Guide to EIPM Lessons - Video
- Guide to Make Lessons - Video
- Variables Make - Slides
For the students
- CSP Variables Make - Photo Liker App - Activity Guide
Teaching Guide
Set Up
This is the first official "Make" lesson in the EIPM model. Review the EIPM model in the EIPM One Pager.
Make Lessons:
[pull-right]
[/pull-right]
Overview: Students make a target app for which they are given the screen elements but little to no starter code.
- Students are provided high-level steps to break down the project
- Teacher supports students by directing them towards notes, previous work, and debugging strategies practiced in earlier lessons.
Goal: Students can independently decide when and how to use the new concept in the context of a larger project.
Watch the following videos:
Warm Up (2 minutes)
Intro the Project
Remarks
For the past few days, we've learned a lot about storing and updating information in variables. Today you are going to have an opportunity to demonstrate your learning by making an app.
Short Intro: The Warm Up today is short and light. Students should spend the maximum amount of time working on their projects.
Activity (38 minutes)
Build the Photo Liker
Group: Make a determination as to whether this project will be completed in pairs or individually. You may even choose to let students decide.
Do This: Have students explore the working Photo Maker App in Level 1.
If students are not working in pairs they should still discuss with a neighbor.
Discuss:
- What does this app do?
- It lets a user "like" an image and add comments to it.
- What are the inputs?
- The thumbs up and thumbs down button, the text input for adding a new comment, and the button to add the comment.
- What are the outputs?
- The number showing how many thumbs up the image has.
- What's one piece of information that might be stored in a variable?
- The number of likes and all the comments added so far.
Supporting Students: While students are working on their apps, circulate the room and check in with students who need a little help. Encourage students to collaborate and discuss bugs with each other.
Debugging: Review with students steps they can use to debug if they get stuck:
- Run the code on turtle mode
- Add the variables to the watcher
- Use console.log() to get output from the app
- Explain the code to a friend
- Read the code carefully line by line, trying to decide which one is causing the error.
Remarks
Now let's build the this app. The screen has been set up for you - it's your job to add the code!
Distribute: Give students copies of CSP Variables Make - Photo Liker App - Activity Guide if you will be using it during the class.
Do This: Direct students to level three where they complete the Photo Liker App. Given this is students first Make project, it is highly recommended that students practice with this guide the first time. In future Make lessons they may opt not to use this guide. For students who need more detailed guidance once they've started programming, Step 3 includes step by step instructions that the student can follow.
Based on the needs of your classroom decide whether you will collectively go through the activity guide or have students complete it individually.
Submit: Encourage students to check the rubric on the last page of the Activity Guide before submitting.
Adapting Make Lessons - You may decide that you'd like to have your students write the code for a modified or entirely different app using the same skills. This might help you differentiate your instruction or provide you with a way to reassess students. Check out the [r customizemakelessons_how-to-guide/csp/2024] for guidance on how to get started with this.
Wrap Up (5 minutes)
Remarks
Great work on your Photo Liker app today. Before wrapping up, we will practice writing for the style of questions that are asked as part of the Create performance task on the AP exam. Respond to the question in Step 5 in your activity guide, and submit it along with your project.
Do This: Complete the written response in Step 5 of the Activity Guide.
Each student, in every classroom, will come to the written response with a different level of comfort, ability, and familiarity with writing for these style of questions. As such, consider offering one or more of the following supports:
Writing Support: Provide students with these sentence starters for guiding their response.
App Interface Support: For students who did not fully complete their app, direct them to the completed app in Level 1 in order to respond to the question
Student responses can be used as a formative assessment to evaluate their understanding of connections between user interface features and functionality. Review their explanations for clarity, accuracy, and alignment with the AP exam’s expectations. The provided rubric can be used to guide this review, and to help provide students with feedback to guide their learning and improvement.
Awesome work today! Make sure to submit your project when you're done with it!
Maximize Work Time: The wrap up is short to allow the maximum amount of time for students to complete the activity.
Assessment: Make Project
Use the rubric provided with the project to assess student projects.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.