💻 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.
Coding test — 5th Grade
What is abstraction?
What is 10 % 3?
What does an assignment do?
Which digits does binary use?
How many values can a Boolean have?
Who do many people consider the first programmer?
What is collision detection?
What is a comment in code?
What does == mean in Python?
What is computational thinking?
What is the address of the center of the Scratch stage?
What does CSS do?
What is a data type?
What is an edge case?
What does an error message show?
What is an event handler?
What does for i in range(5): print(i) show?
What is a function?
What is a function?
What does a game loop do each round?
Name: ____________________ Date: ____________
What is abstraction?
- A. Focusing on what matters and leaving out extra details
- B. Adding as many details as possible
- C. Drawing a detailed picture
- D. Deleting all your code
What is 10 % 3?
- A. 3.33
- B. 1
- C. 30
- D. 3
What does an assignment do?
- A. Creates a loop
- B. Deletes the program
- C. Checks whether two values are equal
- D. Puts a value into a variable
Which digits does binary use?
- A. 0 and 1
- B. 1 to 10
- C. A to Z
- D. 0 to 9
How many values can a Boolean have?
- A. Infinitely many
- B. Two: true and false
- C. One
- D. Ten
Who do many people consider the first programmer?
- A. Grace Hopper
- B. Marie Curie
- C. Ada Lovelace
- D. Margaret Hamilton
What is collision detection?
- A. Saving the game
- B. Checking when two things in a game touch
- C. A computer accident
- D. Deleting sprites
What is a comment in code?
- A. An important command
- B. The name of a variable
- C. Text the computer skips
- D. An error message
What does == mean in Python?
- A. Delete a variable
- B. Are the two values equal?
- C. Add two numbers
- D. Store a value in a variable
What is computational thinking?
- A. Playing computer games
- B. Using a calculator
- C. Doing fast math in your head
- D. An organized way to solve problems like computer scientists
What is the address of the center of the Scratch stage?
- A. x: 480, y: 360
- B. x: 1, y: 1
- C. x: 0, y: 0
- D. x: 240, y: 180
What does CSS do?
- A. Decides how the page looks
- B. Decides what the page says
- C. Runs games
- D. Sends messages
What is a data type?
- A. The computer’s speed
- B. A programmer’s name
- C. The kind of value — a number, text, a Boolean
- D. A kind of keyboard
What is an edge case?
- A. The edge of the screen
- B. A value on the boundary or an extreme situation
- C. An old computer
- D. The end of the file
What does an error message show?
- A. The price of the software
- B. The type of problem and the line number
- C. The name of the computer
- D. A grade for the student
What is an event handler?
- A. A person who fixes computers
- B. Code that runs when an event happens
- C. An error message
- D. A kind of variable
What does for i in range(5): print(i) show?
- A. 5
- B. 0, 1, 2, 3, 4, 5
- C. 1, 2, 3, 4, 5
- D. 0, 1, 2, 3, 4
What is a function?
- A. A bug
- B. A screen
- C. A kind of number
- D. A named group of instructions you can run again and again
What is a function?
- A. A kind of laptop
- B. A mistake in the code
- C. A named group of instructions you can run again and again
- D. A random number
What does a game loop do each round?
- A. Only saves
- B. Checks input, updates and draws
- C. Only plays a sound
- D. Deletes the game
Answer key
- A. Focusing on what matters and leaving out extra details
- B. 1
- D. Puts a value into a variable
- A. 0 and 1
- B. Two: true and false
- C. Ada Lovelace
- B. Checking when two things in a game touch
- C. Text the computer skips
- B. Are the two values equal?
- D. An organized way to solve problems like computer scientists
- C. x: 0, y: 0
- A. Decides how the page looks
- C. The kind of value — a number, text, a Boolean
- B. A value on the boundary or an extreme situation
- B. The type of problem and the line number
- B. Code that runs when an event happens
- D. 0, 1, 2, 3, 4
- D. A named group of instructions you can run again and again
- C. A named group of instructions you can run again and again
- B. Checks input, updates and draws
Answer key
Show the answers and explanations
- A. Focusing on what matters and leaving out extra details — Only what you need. (Abstraction)
- B. 1 — % gives the remainder. (Arithmetic Operators)
- D. Puts a value into a variable — With a single = sign. (Assignment)
- A. 0 and 1 (What Is Binary Code?)
- B. Two: true and false — True and False. (Boolean)
- C. Ada Lovelace — In 1843 she described an algorithm for the Analytical Engine. (Careers in Tech)
- B. Checking when two things in a game touch — Player and coin, ball and wall. (Collision Detection)
- C. Text the computer skips — It’s written for people. (Code Comment)
- B. Are the two values equal? — Two equals signs ask a question. (Comparison Operators)
- D. An organized way to solve problems like computer scientists — You can use it without a computer, too. (Computational Thinking)
- C. x: 0, y: 0 — The center is the zero point. (X and Y Coordinates)
- A. Decides how the page looks — Colors, sizes, layout. (CSS)
- C. The kind of value — a number, text, a Boolean — The type decides what you can do. (Data Type)
- B. A value on the boundary or an extreme situation — That’s where bugs hide. (Edge Case)
- B. The type of problem and the line number — It’s a clue for finding the bug. (Error Message)
- B. Code that runs when an event happens — It’s usually a function. (Event Handler)
- D. 0, 1, 2, 3, 4 — range(5) starts at 0 and ends at 4. (For Loop)
- D. A named group of instructions you can run again and again — Like a recipe with a name. (Function)
- 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)
- B. Checks input, updates and draws — Three steps that repeat. (Game Loop)
Study before the test
- 🗺️ Abstraction
- ➗ Arithmetic Operators
- ⬅️ Assignment
- 0️⃣ What Is Binary Code?
- ⚖️ Boolean
- 🚀 Careers in Tech
- 💥 Collision Detection
- 💬 Code Comment
- 🟰 Comparison Operators
- 🧠 Computational Thinking
- 📍 X and Y Coordinates
- 🎨 CSS
- 🏷️ Data Type
- 📐 Edge Case
- 🚨 Error Message
- 👂 Event Handler
- 🔢 For Loop
- 🧩 Function
- 🧩 Functions: A Recipe With a Name
- 🎮 Game Loop
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.