Lesson 12: Traversals Make
45 minutes
Overview
Using Programming Patterns and a step-by-step approach students make their own version of a Random Forecaster 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. Students use an Activity Guide to go through 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.
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
- 3A-AP-14 - Use lists to simplify solutions, generalizing computational problems instead of repeated use of simple variables.
- 3B-AP-10 - Use and adapt classic algorithms to solve computational problems.
Agenda
Objectives
Students will be able to:
- Implement programming patterns with traversals to develop a functioning app
- Recognize the need for programming patterns with traversals 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
- If time allows, try to build all or part of the Random Forecaster app yourself to understand the challenges involved
- Review the debugging practices you intend to reinforce and resources you'll direct students towards as they get stuck
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the teachers
For the students
- CSP Traversals Make - Random Forecaster App - Activity Guide
Teaching Guide
Lesson Modifications
Attention, teachers! If you are teaching virtually or in a socially-distanced classroom, please read the full lesson plan below, then click here to access the modifications.
Warm Up (2 minutes)
Intro the Project
Remarks
For the past few days, we've learned a lot about using traversals to make apps that manipulate large amounts of information. In today's Make Project you'll be practicing processing lists and using programming patterns with traversals to create a functioning Random Forecaster 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)
Try the Random Forecaster App
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 Random Forecaster app in Level 1.
Discuss: If students are not working in pairs they should still discuss the prompts with a neighbor.
- What information is needed to create this app?
- What list filtering patterns might be used?
Discussion Goal:
- What information is needed to create this app?
- The weather forecast for tomorrow for random cities, including the weather condition, high and low temperatures, and a weather icon.
- What list filtering patterns might be used?
- The List Filter Pattern: Filtering Multiple Lists is used.
Make the Random Forecaster App
Remarks
Now let's build this app. The screen has been set up for you - it's your job to add the code!
Do This: Direct students to level three where they complete the Random Forecaster app. An optional Activity Guide is provided if students would like guidance in creating the app. The most relevant programming pattern is displayed on a slide. Review this pattern quickly with students, if needed.
Submit: Encourage students to check the rubric on the last page of the Activity Guide before submitting.
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
- Explain the code to a friend
Wrap Up (5 minutes)
Remarks
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.