Quiz

Coding with Conditions and Loops Quiz (Grade 6)

Twelve questions on tracing code with variables, loops and if-then-else statements, and making code more efficient. A 12-question online quiz with instant feedback and an explanation for every answer.

12 questions
12 min
Intermediate
Grade 6
Coding with Conditions and Loops Quiz (Grade 6)
Twelve questions on tracing code with variables, loops and if-then-else statements, and making code more efficient. A 12-question online quiz with instant feedback and an explanation for every answer.
12
Questions
12m
Time limit
Question 1 of 12
⏱ 0:00
Score: 0
Question 1
Correct!
Quiz complete
Here's how you did:
0%
Score
Browse more quizzes

About this quiz

Twelve questions on tracing code with variables, loops and if-then-else statements, and making code more efficient. A 12-question online quiz with instant feedback and an explanation for every answer.

Coding with Conditions and Loops Quiz (Grade 6)

Name: Date:

Questions in this quiz

  1. x = 4, then x = x × 3. What is x?
    • A. 4
    • B. 43
    • C. 7
    • D. 12
  2. score = 0; repeat 5 times: score = score + 3. score = ?
    • A. 3
    • B. 8
    • C. 5
    • D. 15
  3. if age ≥ 13 then 'teen' else 'child'. age = 11. Output?
    • A. teen
    • B. nothing
    • C. child
    • D. 11
  4. if n > 10 then n = n − 5. n = 14. New n?
    • A. 19
    • B. 9
    • C. 5
    • D. 14
  5. total = 0; for i = 1 to 3: total = total + i. total = ?
    • A. 4
    • B. 3
    • C. 6
    • D. 9
  6. A variable is…
    • A. a named place that stores a value
    • B. a comment
    • C. a type of loop
    • D. an error
  7. A conditional statement…
    • A. draws a shape
    • B. runs code only when something is true
    • C. repeats forever
    • D. stores a number
  8. Ten copies of 'move 5' are best replaced by…
    • A. move 50 once and stop always
    • B. move 5
    • C. if move then 10
    • D. repeat 10 [move 5]
  9. To make a program jump 8 times instead of 5, change the…
    • A. comments
    • B. loop count
    • C. colour
    • D. variable name
  10. Efficient code is…
    • A. shorter and easier to change
    • B. as long as possible
    • C. never tested
    • D. full of copies
  11. A loop inside another loop is a…
    • A. nested loop
    • B. bug
    • C. variable
    • D. event
  12. repeat 3 [repeat 2 [say 'hi']]. How many times is 'hi' said?
    • A. 5
    • B. 3
    • C. 6
    • D. 2
Show answer key
Answer key — Coding with Conditions and Loops Quiz (Grade 6)
  1. 1. D
  2. 2. D
  3. 3. C
  4. 4. B
  5. 5. C
  6. 6. A
  7. 7. B
  8. 8. D
  9. 9. B
  10. 10. A
  11. 11. A
  12. 12. C
Coding with Conditions and Loops Quiz (Grade 6) — worksheetgalaxy.com