Computational Thinking
Through this lesson, students will be introduced to the basics of computational thinking including decomposition, abstraction, algorithms, testing and debugging, and pattern recognition. This lesson can be done as one large lesson or in four mini-lessons.
OVERVIEW
Activity Overview:
Through this lesson, students will be introduced to the basics of computational thinking including decomposition, abstraction, algorithms, testing and debugging, and pattern recognition. This lesson can be done as one large lesson or in four mini-lessons.
Meta description
- Subject Area: Computer Science
- Grade Level : 3-5, 6-8
- Computer Science Domains:
- Algorithms and Programming
- Computer Science Principles:
- Fostering an Inclusive Computing Culture, Collaborating Around Computing, Recognizing and Defining Computational Problems, Developing and Using Abstractions, Creating Computational Artifacts, Testing and Refining Computational Artifacts, Communicating About Computing
- Materials:
- Website, scratch.mit.edu
- Considerations:
- It is important to set up educator and students Scratch accounts in advance. If students haven’t used Scratch previously, you should do a lesson teaching the parts of the program. There are some pre-created tutorials or you can do a full class program to learn the basics.
Lesson Plan
Overview
Through this lesson, students will be introduced to the basics of computational thinking including decomposition, abstraction, algorithms, testing and debugging, and pattern recognition. This lesson can be done as one large lesson or in four mini-lessons.
ASSESSMENT PRE/POST-TEST
- What does decomposition in computer science mean?
- How does a computer scientist use abstraction?
- Why is pattern recognition important to creating algorithms?
OBJECTIVES
- Define decomposition, abstraction, pattern recognition, and testing and debugging;
- Create an unplugged algorithm; and
- Use Scratch to program your unplugged algorithm.
CATCH/HOOK
To hook the students, you will begin by performing this mathematical magic trick on the students (created by Dr. William Futrell, aka Dr. Wonderful):
- Choose a number between 1 and 10.
- Double the number.
- Add 2 to the result.
- Divide the sum in half.
- Subtract your original number.
- Your answer is 1! *You will perform variations of this trick throughout the lesson.
ACTIVITY INSTRUCTIONS
(3 minutes) Using the slide deck, introduce yourself and perform the mathematical magic trick. Some students may want to talk about how and why it works and that is okay. Be sure to recognize that as algorithmic thinking.
(1 minute) Introduce the objectives and standards found on Slide 6.
(5 minutes) Provide students time to answer the three questions from the pretest on Slide 7. It is recommended that you use a slideshare software so students can directly type their answers but paper/pencil will work as well.
(2 minutes) Share the vocabulary found on Slide 8 and remind students this is the language you will be using and you would like them to incorporate this language as well.
(1 minutes) Perform the mathematical magic trick again found on Slides 9-10.
(10 minutes) Issue the challenge for students (Slide 11-14) and then explain that it is a big problem that can be broken down into smaller parts. This is called DECOMPOSITION. Use the video and the Computational Thinking Resource poster to explain decomposition using visual, written, and sign language references.
(8 minutes) Provide students the Decompose It! Organizer to break down the computer algorithm into smaller parts. Students work on their own for one minute, with a partner for two minutes, and as a class for 4-5 minutes. Use Slides 15-16 to guide this (slide 16 features possible answers).
*This is the time to discuss variables and why they’re important in computer science.
(2 minutes) Explain that creating these small manageable steps in human language is a PSEUDOCODE. Computer scientists use pseudocode to guide their programming. Show what would happen if students used this pseudocode to create a Scratch program of the trick on Slide 17.
*There are many variables in this sample program; be sure to point them out and explain why we’re using them.
**If breaking this lesson down over multiple days, end with this slide on the first day and start with this slide the second day to review and bridge.
(10 minutes) After showing the sample program, explain that right now, the computer is just doing a magic trick on itself. We need to pull out the important details to make the computer the magician and the user does (most) of the math. This is called ABSTRACTION. Use the video and the Computational Thinking Resource poster to explain abstraction using visual, written, and sign language references (slides 18-20).
(8 minutes) Provide students the Abstract It! organizer to pull out the important details for the computer and the user. Students work on their own for one minute, with a partner for two minutes, and as a class for 4-5 minutes. Use slides 21-22 to guide this (slide 22 features possible answers).
*Compare the variables from the Decompose It! activity and this activity. Students should notice that there will be less variables but the trick hasn’t changed. The computer no longer needs to organize all the information as the user will now do that.
(10 minutes) Using slides 23-26, explain that following our decomposition and abstraction, we are ready to put steps in order to complete our task, or create an ALGORITHM. Use the video on slide 24 to explain algorithms. Ask for examples of algorithms in real life. Then explain that not all algorithms work the first time (or second, third, or fourth…) and a computer scientist is constantly testing the algorithm as she builds it. Little mistakes in a program are called “bugs” and finding and fixing those bugs is known as debugging. Use the Computational Thinking Resource poster to explain testing and debugging using visual, written, and sign language references.
*If breaking the lesson into smaller parts, stop here.
(10 minutes) Have students begin to create their algorithms in Scratch. Be sure you have a classroom account so you have access to their projects (while free, this needs to be requested from Scratch in advance). Remind them to use their Decompose It! and Abstract It! organizers to guide their programming and to test and debug after each step. Allow them to work individually for about ten minutes (this time includes logging in and setting up). Use slide 27 for a direct link to Scratch.
(10 minutes) At this point, some students may have created an algorithm while others may be frustrated. Show the video on Slide 28 so they can see an example of the working program. Then have students work side by side with a partner to continue creating their program.
(10 minutes) Bring students back together and share the sample code on slide 29. Then ask students to share their code. While they are sharing, ask students to look for PATTERNS, things that repeat that can help simplify our programming moving forward. Use slides 30-34 and the Computational Thinking Resource poster to explain pattern recognition using visual, written, and sign language references. Then guide back to a sharing discussion.
*If breaking the lesson into smaller parts stop here.
(10 minutes) Review the entire process for creating the math magician program emphasizing the language. Allow students to continue to share if necessary.
(5 minutes) Have students take the post-test on slide 35. This can be done on paper or using a slideshare software like PearDeck or NearPod. These are the same questions from the pretest.
(5 minutes) Have students discuss how their answers have changed throughout the lesson. Look for any misconceptions they may still have.
Close the discussion with slide 36.
Supplements
Any items in this section are the property & under the license of their respective owners.
REVIEW
Students will have their computer magicians perform the trick on other audiences (teachers, family members, younger students).
STANDARDS
| Type | Listing |
|---|---|
| CS Domains | Algorithms and Programming |
| CS Principles | Fostering an Inclusive Computing Culture, Collaborating Around Computing, Recognizing and Defining Computational Problems, Developing and Using Abstractions, Creating Computational Artifacts, Testing and Refining Computational Artifacts, Communicating About Computing |
| Other Content Standards | 8.AP.A.01 - Create flowcharts and pseudocode to design algorithms to solve complex problems. 8.AP.M.01 - Using grade appropriate content and complexity, decompose problems and sub-problems into parts to facilitate the design, implementation, and review of programs. 8.AP.M.02 - Using grade appropriate content and complexity, create procedures with parameters to organize code and make it easier to reuse. 8.AP.PD.03 - Systematically test and refine programs using a range of test cases. 8.AP.PD.04 - Using grade appropriate content and complexity, document programs in order to make them easier to follow, test, and debug. |