💻 Coding Practice Test — 6th Grade

20 questions from 11 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 — 6th Grade

  1. What do you do at each step of binary search?

  2. What does a compiler do?

  3. What is a game engine?

  4. What does an interpreter do?

  5. What does JavaScript do on websites?

  6. What is a library in programming?

  7. What is machine code made of?

  8. What is open source?

  9. What is a parameter?

  10. What does return do?

  11. When does a runtime error show up?

  12. At most, how many guesses do you need for a number from 1 to 100?

  13. Who developed one of the first compilers?

  14. What is the advantage of a game engine?

  15. Which language is usually run by an interpreter?

  16. Who created JavaScript?

  17. How do you add a library in Python?

  18. Why don’t people write in machine code?

  19. Which of these is open source?

  20. If def square(n): return n * n, what does square(4) give?

Answer key

Show the answers and explanations
  1. B. Check the middle and throw away half — The range is cut in half each step. (Binary Search)
  2. D. Translates all the code into machine code ahead of time — Like a translator for a whole book. (Compiler)
  3. A. Software that provides ready-made drawing, sound and physics — Creators can focus on the game itself. (Game Engine)
  4. D. Runs code line by line as it goes — Like a live translator. (Interpreter)
  5. A. It makes the page respond and change — Buttons, games and search boxes — all JavaScript. (First Steps in JavaScript)
  6. C. A collection of ready-made functions — Other people wrote and tested them. (Library)
  7. B. 0s and 1s — The computer runs it directly. (Machine Code)
  8. D. Software whose code anyone can see — You may learn from and improve it, following the license. (Open Source)
  9. D. Information that goes into a function — It gets filled fresh on every call. (Parameter)
  10. A. Gives an answer back from the function — You can store the answer in a variable. (Return Value)
  11. D. While the program is running — The code is written correctly, but something goes wrong partway through. (Runtime Error)
  12. C. 7 — 2 to the 7th power is 128, which is more than 100. (Binary Search)
  13. B. Grace Hopper — In the early 1950s. (Compiler)
  14. D. You don’t have to write the shared parts from scratch — Drawing, sound and collisions come ready. (Game Engine)
  15. D. Python — JavaScript too. (Interpreter)
  16. A. Brendan Eich — He wrote it in 1995. (First Steps in JavaScript)
  17. D. import — For example, import random. (Library)
  18. A. It’s very hard to read and write — It’s easy to make mistakes in long strings. (Machine Code)
  19. D. Python — Volunteers around the world improve it. (Open Source)
  20. C. 16 — 4 times 4. (Parameter)

Study before the test

Other grades: 3rd Grade4th Grade5th Grade7th Grade

What is on this coding test?

20 multiple-choice questions taken from 11 coding articles written for 6th 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.