AP CSP CodeX - From Flowcharts to Code
From Flowcharts to Code
Students match flowchart symbols to Python and write Python code from flowcharts.
Overview
Students review the four basic flowchart symbols, then turn flowcharts into Python code. There are six flowcharts in the activity, and you can choose a few that fit your students or give students choices. Each line or lines of Python code can be visualized as a flowchart symbol, and similar lines can be grouped into a single symbol. Students should be able to explain their code without using Python. The Flowcharts and Code Review checks for mastery.
π― Mission Goal: Students will create Python code from flowcharts.
Learning Targets
- I can map a flowchart symbol to Python code.
- I can write Python code from a flowchart.
Key Concepts
- 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 Python code from a flowchart
Digital Resources
- βΈFrom Flowcharts to Code slides
- βΈFrom Flowcharts to Code Activity Guide
- βΈFlowcharts and Code Review
- βΈFlowchart Shapes Kahoot! Review
- βΈCode Solutions and Assignment Answers - Teacher Dashboard > Educator Resources button
- βΈUnit 2 Review and Test Questions
Classroom Materials
- βΈComputer
- βΈFlowcharts to view on a large screen, printed for each group, or on student computers
- βΈFlowcharts and Code Review (printed or digital)
Real-World Applications
Flowcharts turn complex, multi-step processes into clear visual maps that guide decisions.
Extensions & Cross-Curricular
π€
Vocabulary
βΎ
π
Standards
βΎ
CSTA Standards - Grades 9-10
CSTA Standards - Grades 11-12
AP CSP Framework
- Look over the six flowcharts. You may not want to use all of them. Select a few that are suitable for your students, or give them choices (like mild, medium and spicy) and ask them to complete three.
- Decide how students will see the flowcharts: on a large screen, printed for each group, or on their own computers while they write Python code.
- Prepare the Flowchart Shapes Kahoot! Review for the warm-up.
- If you will print the Flowcharts and Code Review, give more room in the first part for drawing shapes.
- This lesson works well individually, with partners, or in groups of three.
- All the solution codes in the answer key are just samples. The programs students create can be different, but should be similar.
- This lesson may take longer than one class period. If so, you have a couple choices. You can cut the lesson short. Not every flowchart needs to be changed to code. Whatever code students get done is fine. Or you can extend the lesson an additional day and use the review. You can decide how much you want to emphasize flowcharts. Students should be able to explain their code without using Python. This is one way to give them practice, but it is not the only way.
- The review is a good way to check for mastery. You can print the review for students and have them write their answers. If you print the document, give more room in the first part for drawing shapes. You can also assign a digital copy of the review. Students can insert the shapes, or describe the shape and text.
Lesson Outline
This outline gives one way to present the lesson.
Slides 2-6: Review the flowchart symbols. Use the Flowchart Shapes Kahoot! Review.
Slides 7-8: Instructions.
Slides 9-14: Students use the flowcharts to create Python code.
π» Slide 15: Summary.
β Formative assessment:
- Daily reflection journal
- Activity Guide completion
- Class discussion on what they learned or difficulties they had
- Exit ticket