Grades 4–5 reading level
CS Fundamentals — Course E
Adapted with AI from the original open resource by Code.org. Nothing is invented — only the reading level changes.
Course E
This course is made for fourth grade students. It starts with a quick review of ideas from Courses C and D. This helps beginners learn the basics and reminds experts how amazing computer science can be.
Students will practice coding using algorithms (step-by-step instructions), loops, conditionals, and events before learning about functions. At the end of the course, students will build a final project to share with friends and family.
Journaling
The lessons in this course include journal writing. A journal is also great for scratch paper — you can use it to build ideas, fix problems, and plan your next steps. Journals can help you look back at old answers when you're stuck on a hard problem later.
Think Spot Journal – Student Handout
Debugging
Debugging means finding and fixing mistakes in your code. Everyone from beginners to professional programmers needs to debug! In fact, most of your coding time will probably be spent fixing bugs, not writing new code. To help students practice this skill on their own, we give them a handy guide to use while coding. Check the "Debugging" section of our CS Fundamentals Curriculum Guide for more tips and classroom ideas.
Debugging Guide – Student Handout
Chapter 1: Ramp Up
Lesson 1: Sequencing in the Maze
In this lesson, you will learn how to write your very own programs!
Lesson 2: Drawing with Loops
In this lesson, loops help you make even cooler pictures with Artist!
Lesson 3: Conditionals in Minecraft: Voyage Aquatic
Here you will learn about conditionals in the world of Minecraft.
Lesson 4: Conditionals with the Farmer
You will tell the computer what to do under certain conditions in this fun and challenging set of puzzles.
Chapter 2: Sprites
Lesson 5: Simon Says
Play a game and think about what commands are needed to get the right result.
Lesson 6: Swimming Fish with Sprite Lab
Learn how to create and edit sprites (characters or objects you can program to move and act).
Lesson 7: Alien Dance Party with Sprite Lab
Create an interactive project you can share with your classmates.
Chapter 3: Digital Citizenship
Lesson 8: Private and Personal Information
The internet is fun and exciting, but staying safe is important too. This lesson teaches you the difference between information that is safe to share and information that should stay private.
Lesson 9: About Me with Sprite Lab
Use Sprite Lab to make an interactive poster. This lets you show what you've learned about sharing personal and private information online.
Chapter 4: Impacts of Computing
Lesson 10: Designing for Accessibility
In this lesson, students learn about accessibility (making things usable for everyone, including people with disabilities) and the importance of empathy. You will brainstorm and design accessible solutions for pretend apps.
Chapter 5: Nested Loops
Lesson 11: Nested Loops in Maze
Loops inside loops inside loops — what does that mean? This lesson teaches you what happens when you put a loop inside another loop.
Lesson 12: Fancy Shapes using Nested Loops
More nested loops! This time, you'll make amazing drawings with them.
Lesson 13: Nested Loops with Frozen
Anna and Elsa are great ice skaters, but they need your help making patterns in the ice. Use nested loops to create something super cool.
Chapter 6: Functions
Lesson 14: Songwriting
Even rock stars need programming skills! This lesson teaches you about functions (reusable blocks of code) using song lyrics.
Lesson 15: Functions in Minecraft
Can you figure out how to use functions to write the most efficient code?
Lesson 16: Functions with Harvester
Functions will save you lots of work as you help the farmer with her harvest!
Lesson 17: Functions with Artist
Make complex drawings more easily using functions!
Chapter 7: End of Course Project
Lesson 18: End of Course Project
Big projects take time and planning. Find your inspiration, make a plan, and let your creativity shine!
If you are interested in licensing Code.org materials for commercial purposes, contact us.
Lesson 1: Sequencing in the Maze
Overview
In this set of puzzles, students will start with an introduction (or review, if your class has done this before) to Code.org's online workspace. Short videos will show the basic tools, including the Run, Reset, and Step buttons. The videos also show how to drag, delete, and connect coding blocks called Blockly blocks.
Next, students will practice sequencing (putting steps in the right order) and debugging in the maze. Debugging is a key skill for learning to program. Some puzzles will already be "solved," but incorrectly! Students must step through the code to find mistakes, such as wrong loops, missing blocks, extra blocks, or blocks in the wrong order.
Purpose
Every classroom has students with different levels of experience. Some students may already be great with computers, while others have barely used one. To make learning fair for everyone, we created these "ramp-up" lessons. Teachers can use them to introduce or review how to use Code.org and basic computer science ideas.
Some students might feel frustrated during this lesson because debugging can be tricky. But debugging is a very important skill in computer programming. Computer scientists must get good at finding and fixing bugs in their own code. Debugging helps students learn to recognize problems and solve them — building strong thinking and problem-solving skills along the way.
Agenda
- Warm Up (15 min): Introduction, Vocabulary
- Main Activity (30 min): Online Puzzles
- Wrap Up (5–10 min): Journaling
- Extended Learning
Objectives
Students will be able to:
- Put movement commands in the correct order to make a program.
- Fix mistakes in an existing program.
- Break a long list of steps into the largest pattern that repeats.
- Predict where a program will go wrong.
- Fix errors in a program.
- Think and write about the debugging process in a way that fits their age.
Preparation
- Try the puzzles yourself first to spot any tricky spots for your class.
- (Optional) Pick a few puzzles to solve together as a class.
- Make sure every student has a journal.
- Review the Debugging Recipe student handout with the class.
Links
Heads Up! Please make your own copy of any documents you plan to share with students.
For the Students:
- Unplugged Blocks (Courses C–F) – Manipulatives
- Debugging Recipe – Student Handout
Vocabulary
- Bug – The part of a program that does not work correctly.
- Debugging – Finding and fixing problems in an algorithm or program.
- Program – A set of step-by-step instructions (an algorithm) that has been turned into code a machine can run.
- Programming – The skill of creating a program.
Teacher Tip: Show students the right way to help a classmate:
- Don't sit in the classmate's chair.
- Don't use the classmate's keyboard.
- Don't touch the classmate's mouse.
- Make sure the classmate can explain the solution out loud before you walk away.
Teaching Guide
Warm Up (15 min)
Introduction
Ask students to think about problems they solve in everyday life.
- How do you fix something that isn't working?
- Do you follow certain steps to fix it?
Explain: Some puzzles in this lesson have already been "solved" for you — but they don't work quite right! We call these mistakes bugs, and your job will be to debug them, or fix them.
Since students may be learning new ideas or reviewing old ones, use your judgment on how much vocabulary to cover. Try using each word in a sentence, even if you don't explain every definition in detail.
Vocabulary
This lesson has four important new words:
- Program (say it: PRO-gram) – A set of instructions turned into code a machine can run.
- Programming (say it: PRO-gram-ing) – The skill of creating a program.
- Bug (say it: bug) – A mistake in a program that keeps it from working the way it should.
- Debugging (say it: dee-BUG-ing) – Finding and fixing mistakes in programs.
Say to your class:
"Debugging is a process. First, you notice there's a mistake in your program. Then you go through the program step by step to find it. Try the first step — did it work? Try the second step — how about now? If you check each step in order, you'll find the exact spot where something goes wrong. That's your bug! Once you find it, you can fix, or 'debug,' it."
To make things fun, you could introduce the character from today's puzzles, Scrat from Ice Age. If students don't know Scrat, show them a short video of the silly squirrel getting into trouble.
Main Activity (30 min)
Online Puzzles
Teachers play an important role in computer science class by keeping the classroom friendly and helpful. During online activities, your main job is to encourage and support — not to jump in and solve problems for students. Online lessons work best when students figure things out themselves. Here are some tips:
- Use Pair Programming (working with a partner) whenever possible.
- Encourage students to ask their partner first when they have a question.
- If a pair is still stuck, they can ask a nearby group who might already know the answer.
- Remind students to use the debugging process before asking a teacher.
- Ask students to describe the problem: What is it supposed to do? What does it actually do? What does that tell you?
- Remind frustrated students that feeling stuck is part of learning, and that sticking with it pays off.
- If a student is still stuck, ask questions that help them find the mistake on their own, instead of just telling them the answer.
Before students start on the computer, remind them how helpful Pair Programming can be, and encourage them to ask classmates for help. Have students sit in pairs, and tell them to ask at least two classmates for help before asking a teacher.
As mentioned earlier, let students know they might feel frustrated during these puzzles — and that's okay! It's important to keep trying and ask for help when needed. As students work, walk around the room to make sure no one feels too stuck to keep going.
Wrap Up (5–10 min)
Journaling
Have students write about what they learned, why it matters, and how they felt about it. This helps them remember what they learned and gives them a resource to look back on later.
Journal Prompts:
- What was today's lesson about?
- How did you feel during today's lesson?
- What kind of bugs did you find today?
- Draw a bug you found in one of the puzzles.
Original licensed under CC BY-NC-SA 4.0. This adaptation is provided free by OER.ai.