💻 Coding Practice Test — 5th Grade

20 questions from 20 coding articles. Take it online for an instant score, or print it with the answer key.

Free · US Letter · no sign-up
Google Classroom Save to Pinterest Email me

Coding test — 5th Grade

  1. What is abstraction?

  2. What is 10 % 3?

  3. What does an assignment do?

  4. Which digits does binary use?

  5. How many values can a Boolean have?

  6. Who do many people consider the first programmer?

  7. What is collision detection?

  8. What is a comment in code?

  9. What does == mean in Python?

  10. What is computational thinking?

  11. What is the address of the center of the Scratch stage?

  12. What does CSS do?

  13. What is a data type?

  14. What is an edge case?

  15. What does an error message show?

  16. What is an event handler?

  17. What does for i in range(5): print(i) show?

  18. What is a function?

  19. What is a function?

  20. What does a game loop do each round?

Answer key

Show the answers and explanations
  1. A. Focusing on what matters and leaving out extra details — Only what you need. (Abstraction)
  2. B. 1 — % gives the remainder. (Arithmetic Operators)
  3. D. Puts a value into a variable — With a single = sign. (Assignment)
  4. A. 0 and 1 (What Is Binary Code?)
  5. B. Two: true and false — True and False. (Boolean)
  6. C. Ada Lovelace — In 1843 she described an algorithm for the Analytical Engine. (Careers in Tech)
  7. B. Checking when two things in a game touch — Player and coin, ball and wall. (Collision Detection)
  8. C. Text the computer skips — It’s written for people. (Code Comment)
  9. B. Are the two values equal? — Two equals signs ask a question. (Comparison Operators)
  10. D. An organized way to solve problems like computer scientists — You can use it without a computer, too. (Computational Thinking)
  11. C. x: 0, y: 0 — The center is the zero point. (X and Y Coordinates)
  12. A. Decides how the page looks — Colors, sizes, layout. (CSS)
  13. C. The kind of value — a number, text, a Boolean — The type decides what you can do. (Data Type)
  14. B. A value on the boundary or an extreme situation — That’s where bugs hide. (Edge Case)
  15. B. The type of problem and the line number — It’s a clue for finding the bug. (Error Message)
  16. B. Code that runs when an event happens — It’s usually a function. (Event Handler)
  17. D. 0, 1, 2, 3, 4 — range(5) starts at 0 and ends at 4. (For Loop)
  18. D. A named group of instructions you can run again and again — Like a recipe with a name. (Function)
  19. C. A named group of instructions you can run again and again — Write it once, call it as many times as you like. (Functions: A Recipe With a Name)
  20. B. Checks input, updates and draws — Three steps that repeat. (Game Loop)

Study before the test

Other grades: 3rd Grade4th Grade6th Grade7th Grade

What is on this coding test?

20 multiple-choice questions taken from 20 coding articles written for 5th grade readers.

Can I print it?

Yes. Use the print button: the test and the answer key come out on separate pages, no sign-up needed.