Skip to content

Basic Coding Concepts Quiz for Grades 5–7 – Algorithms, Loops, Variables and Debugging

A beginner coding quiz for grades 5–7: algorithms, sequences, loops, conditionals (if/else), variables, bugs and debugging, with examples like those in Scratch and Python. 12 questions with answers and explanations.

  • Grades 5–7
  • 12 questions
  • About 6 min

Free. It's copied to your account, and you can edit it anytime.

Questions

Correct answers aren't marked here, so you can use this page as a test. You'll see them in your account after you use the quiz.

  1. 1Single choice

    What is an algorithm?

    • A step-by-step set of instructions to solve a problem
    • A type of computer screen
    • A computer virus
    • A programming language
  2. 2Single choice

    In programming, what is a loop used for?

    • Deleting a program
    • Saving a file
    • Drawing a circle only
    • Repeating instructions
  3. 3Single choice

    What is a bug in a program?

    • A mistake that makes the program behave wrongly
    • A feature that makes it faster
    • A type of loop
    • A picture in the program
  4. 4Single choice

    What does a variable do in a program?

    • Turns the computer off
    • Stores a value that can change, such as a score
    • Repeats code forever
    • Connects to Wi-Fi
  5. 5Single choice

    A program says: if it is raining, show "Take an umbrella", else show "Enjoy the sun". It is sunny. What is shown?

    • Take an umbrella
    • Nothing
    • Both messages
    • Enjoy the sun
  6. 6Type answer

    What do we call the process of finding and fixing errors in code?

    Written answer:

  7. 7True / False

    The order of instructions in a program usually matters.

    • True
    • False
  8. 8Single choice

    score = 5, then score = score + 3. What is the value of score now?

    • 3
    • 5
    • 8
    • 53
  9. 9Single choice

    A robot starts facing north and runs: turn right, turn right. Which way is it facing now?

    • North
    • East
    • South
    • West
  10. 10Multiple choiceMore than one correct answer

    Which of these are programming languages? Select all that apply.

    • Python
    • Scratch
    • Google Chrome
    • JavaScript
    • Microsoft Word
  11. 11True / False

    A computer can understand instructions even if they are vague, just like a person.

    • True
    • False
  12. 12Single choice

    How many times is "Hello" printed by: repeat 3 times { print "Hello" }?

    • 1
    • 3
    • 4
    • Forever

Create your free account and use any quiz

Run live quizzes with a game PIN, plus polls and Q&A, all from one account. No card, nothing to install.

Create free account