Variables, Conditionals, and Functions - Lesson 4: Variables Make

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 which can be assessed using a provided rubric.

Goals

Students will be able to:

  • Recognize the need for programming patterns with variables as part of developing a functioning app
  • Implement programming patterns with variables to develop a functioning app
  • Write comments to clearly explain both the purpose and function of different segments of code within an app
  • Use debugging skills as part of developing an app

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.

Resources

Activity Guide

Teaching Tip

This is the first official "Make" lesson in the EIPM model. Review the EIPM model in the EIPM: A Short Introduction (Teacher Resource).

Make Lessons 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 are able to independently decide when and how to use the new concept in the context of a larger project.

Watch the following videos:

A sketch portraying several completed apps.

Getting Started (2 minutes)

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.
Teaching Tip

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)

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 run the Unit 4 Lesson4_ExampleApp project, or run the app and display it to the class.

Discuss: If students are not working in pairs they should still discuss these prompts with a neighbor:

  • What does this app do?
  • What are the inputs?
  • What are the outputs?
  • What's one piece of information that might be stored in a variable?
Discussion Goal

See Unit4AnswerKey for the solutions to this discussion.

Teaching Tip

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:

  • Use output 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 this app. The screen has been provided 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 open the Lesson4_ProjectTemplate project 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.

Wrap Up (5 minutes)

Remarks

  • Awesome work today! Make sure to submit your project when you're done with it!
Teaching Tip

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.

Standards Alignment

  • CSTA K-12 Computer Science Standards (2017): 2-AP-11, 2-AP-19

Next Tutorial

In the next tutorial, we will discuss CSP Unit 4 Lesson 5 Conditionals Explore, which describes Explore booleans and conditonals.