Lists, Loops, and Traversals - Lesson 8: Loops Make
Overview
Using Programming Patterns and a step-by-step approach students make their own version of a Lock Screen Maker 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 minimal starting code. 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 loops as part of developing a functioning app
- Implement programming patterns with loops 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
Supplimental Code.org material
Getting Started (2 minutes)
Teaching Tip
Short Intro: The Warm Up today is short and light. Students should spend the maximum amount of time working on their projects.
Remarks
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.
Open a Project: Direct students to open and run the Lesson8_ExampleApp project.
Explore: Have students explore the working Lock Screen Maker app. If students are not working in pairs they should still discuss these prompts with a neighbor:
Discuss:
- Where (if at all) do you think this app is using a loop?
- Where (if at all) do you think this app is using a list?
Discussion Goal
Where (if at all) do you think this app is using a loop?
- It's more important that students justify their answers. However, students may reconize that the different icons are likely being chosen from a list.
Where (if at all) do you think this app is using a list?
- Students will hopefully recognize that with many different icons to be updated by each button there is almost certainly a loop being used by each of those button.
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 Loops Make - Lock Screen Maker (Activity Guide) if you will be using it during the class.
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:
- Build small parts of the program at a time and test them to make sure they work
- Add output statements to check variables at specific points
- Explain the code to a friend and clarify the differences between what they expect to happen and what is actually happening
Open a Project: Direct students to open Lesson8_ProjectTemplate.
Do This: Students should complete the Lock Screen Maker app from the template. Based on the needs of your classroom decide whether you will collectively go through the activity guide or have students complete it individually. Afterwards give them time to work on their projects and circulate the room to offer support. Students who finish early can work on the extensions suggested in the activity guide.
Submit: Encourage students to check the rubric on the last page of the Activity Guide before submitting.
Wrap Up (5 minutes)
Teaching Tip
Maximize Work Time: The wrap up is short to allow the maximum amount of time for students to complete the activity.
Remarks
- Awesome work today! Make sure to submit your project when you're done with it!
Assessment: Make Project
Category | Extensive Evidence | Convincing Evidence | Limited Evidence | No Evidence |
---|---|---|---|---|
Input | onEvents are created for all the required inputs. | onEvents are created for most of the inputs. | onEvents are created for some of the inputs. | onEvents are not created for any inputs. |
Variables and Lists | Variables and lists are created and appropriately used for all pieces of information used in the app. | Variables and lists are created and appropriately used for most pieces of information used in the app. | Some information is stored in variables and lists and appropriately updated throughout the app. | There are no variables or lists which store the necessary information for the app to work correctly. |
Loops | The program correctly uses loops for all three buttons to generate the expected output. | The program correctly uses a loop for two of the buttons to generate the expected output. | The program correctly uses lists for one of the buttons to generate the expected output. | The program does not include or correctly use any loops. |
Output | All three buttons work as expected to move icons, change their colors, and change their icon to a random new icon. | Only two of the buttons work as expected. | Only one of the buttons work as expected. | None of the buttons work as expected. |
Code runs without errors. | No errors are present in the required code. | Some errors are present in the required code. | Many errors are present in the required code. | The code does not run. |
Code runs without errors. | No errors are present in the required code. | Some errors are present in the required code. | Many errors are present in the required code. | The code does not run. |
Use the rubric below or (optionally) the one provided with the project to assess student projects.
Standards Alignment
- CSTA K-12 Computer Science Standards (2017): 3A-AP-15
Next Tutorial
In the next tutorial, we will discuss Code.Org Unit 5 Lesson 9, which describes Explore list traversals.