AP CSP CodeX - From Code to Flowcharts
From Code to Flowcharts
Students label the four basic flowchart symbols and create flowcharts that visualize Python code.
Overview
Students review the four basic flowchart symbols, then practice matching lines of Python code to those symbols. Next, they create flowcharts for four Python code segments, either by hand on the Activity Guide or with a flowchart website while using the Guided Notes. An optional challenge adds a fifth code segment.
🎯 Mission Goal: Students will create flowcharts from Python code.
Learning Targets
- I can label the four basic symbols used in flowcharts.
- I can make a flowchart that visualizes a process.
Key Concepts
- There are four basic flowchart symbols.
- Each line or lines of Python code can be visualized as a flowchart symbol.
- Sometimes it is convenient to group similar lines of Python code into a single flowchart symbol.
Assessment Opportunities
Success Criteria
- Name the four basic flowchart symbols and what they are used for
- Create a flowchart that visualizes a process from Python code
Digital Resources
- ▸From Code to Flowcharts slides
- ▸From Code to Flowcharts Activity Guide
- ▸From Code to Flowcharts Guided Notes
- ▸draw.io website for drawing flowcharts
- ▸Flowcharts Kahoot! Review
Classroom Materials
- ▸CodeX
- ▸USB-C cable
- ▸Computer
Real-World Applications
Flowcharts turn complex, multi-step processes into clear visual maps that guide decisions.
Extensions & Cross-Curricular
🔤
Vocabulary
▾
🐍
New Python Code
▾
No new Python code in this lesson.
📐
Standards
▾
CSTA Standards - Grades 9-10
CSTA Standards - Grades 11-12
AP CSP Framework
AP CSP Framework - Computational Thinking Practices
- Choose the Activity Guide or the Guided Notes (you do not need both). Print the Activity Guide. Print the Guided Notes or share them digitally.
- If students will use the Guided Notes, choose a flowchart website ahead of time. draw.io is one option.
- Have the slides and the Flowcharts Kahoot! Review ready for the wrap-up.
- This lesson has two options. Select one.
- Option 1: Print the Activity Guide and have students create flowcharts in the space provided.
- Option 2: Print the Guided Notes. Use them for review. Then use a website for flowchart creation. Students can paste an image of their flowcharts in the Guided Notes if desired.
- Students can work in groups of 2 or 3 and do all their work on whiteboards. Students can also work individually and use small whiteboards. Or students can use PowerPoint or Google Slides to create the flowcharts instead of drawing them.
- There are several free websites that have tools for drawing flowcharts. draw.io lets you save charts in a Google Drive or download or export them.
- You can choose to display the Python code on a large screen, print copies for each group, or have students use their own computers to view the code while creating flowcharts.
- All the answer flowcharts given are just samples. Creating a flowchart is a creative process and there are many correct ways to accomplish the task. Praise the creativity of each flowchart and discuss its merits.
Lesson Outline
Use the slides to review flowchart symbols. Start with slides #1-4. Then show slide #5 so students can check their work.
Slide #5 symbols:
- Oval: start or stop
- Parallelogram: input or output
- Rectangle: action or process
- Diamond: decision
- Lines and arrows: flow lines
Use either the Activity Guide or the Guided Notes (you do not need both).
- If using the Activity Guide, it needs to be printed and distributed to students.
- Guided Notes can either be printed or distributed digitally.
Use slides #6-8 to introduce the activity. Take time on slides #7-8 to have students discuss which symbols correspond to Python code.
Students create flowcharts for four different Python code segments.
- If students are using the Activity Guide, the code is on the guide. Students create their flowcharts by hand on the guide.
- If students are using the Guided Notes, they use a website to create the flowcharts. One suggestion is draw.io. Other websites are available. You can even use Google Slides.
✅ The assignment document can also be turned in.
A fifth Python code segment is given that students can use to create a flowchart.
The challenge program is very similar to Python Code #4, but it includes incrementing a variable. Students will do this in the next mission, but they haven't done it yet. You can have them do the challenge as a preview of what is to come, you can help them with it, or you can skip it altogether.
Formative assessment:
- Daily reflection journal
- Flowcharts Kahoot! Review
- Exit ticket