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: teacher copy

For the teacher

Hand out the sheet and read the short text aloud. Students read, solve seven problems and explain one idea in writing. Allow about 15 minutes, and check answers together using the key. Say that computer scientists test their steps and fix bugs, and that no computer is needed today.

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 Answer: Exact steps that solve a problem
  2. A computer fills in a missing step by guessing.TrueFalse Answer: false
  3. Start at 0. Repeat 5 times: add 3. What is the result? Answer: 15
  4. What comes next? 3, 6, 12, 24, ___ Answer: 48
  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 Answer: Swap steps 2 and 3
  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? Answer: 4
  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 Answer: Use a loop

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