Skip to the content
Peabody Teach

Share

This page

Peabody is free and has no ads. Sharing it is the best way to help.

Computer Science Education Week: activity sheet, grades 6 to 8

Computer Science Education Week is held in December. A paper sheet on algorithms, loops, conditions and debugging for grades 6 to 8 with a key.

Grades 6 to 8 · 15 minutes · worksheet

Thinking like a programmer

Name ______________ Date ____________

Computer Science Education Week is held in December. A programmer writes an algorithm: exact steps that solve a problem. A computer follows steps exactly, so a missing or wrong step causes a bug. A loop repeats steps, which saves writing. A condition lets a program choose: if the answer is yes, do one thing, and if it is no, do another.

Answer from the reading and your own thinking.

  1. What is an algorithm?a) A kind of bugb) A guess about the answerc) Exact steps that solve a problem
  2. A computer fills in a missing step by guessing.TrueFalse
  3. Start at 0. Repeat 5 times: add 3. What is the result?
  4. What comes next? 3, 6, 12, 24, ___
  5. Goal: start with 4, add 10, then double to get 28. The steps are: 1. Start with 4. 2. Double it. 3. Add 10. How do you fix the bug?a) Swap steps 1 and 2b) Swap steps 2 and 3c) Remove step 1
  6. Rule: if a number is even, divide by 2. If it is odd, add 1. Start with 7 and use the rule twice. What is the result?
  7. You need the same steps to draw 20 squares. What is best?a) Use a loopb) Write the steps 20 timesc) Draw one square

In two or three sentences, explain why a computer needs exact steps.

Made with Peabody Teach, free printables for teachers: teach.peabody.kids. No sign-in, no ads.

Teacher copy with the answer key

Last checked 2026-11-15. Every answer in it was worked out a second time without the key. Something wrong? Tell us.