Browse all quizzes
MathematicsGrade 7en

💻 Coding and Computational Thinking

Master the fundamentals of writing, reading, and modifying code with nested loops and events. This quiz covers sequential logic, conditionals, input handling, and computational problem-solving aligned with Ontario Grade 7 mathematics standards. **What you'll learn:** - How to read and understand code with nested loops and conditionals - How sequential logic and order of operations affect code output - How to trace through code and predict results - How to use input to solve simple computational problems - How conditionals and loops work together to control program flow

17 questions · play in your browser
No signup required — try it for free.

Questions in this quiz

Answers hidden — play to find out.

  1. Question 1

    Look at the following code that calculates the sum of numbers from 1 to nn. What is the final value of total when n=5n = 5?

  2. Question 2

    Which of the following best describes the purpose of a conditional statement (if/else) in a program?

  3. Question 3

    In a nested loop, the inner loop completes all of its iterations before the outer loop advances to its next iteration.

  4. Question 4

    Look at the following code. How many times does the inner loop execute in total?

  5. Question 5

    What is the output of the following code?

  6. Question 6

    A program reads a student's test score and prints 'Pass' if the score is 60 or higher, otherwise 'Fail'. Which code segment correctly implements this logic?

  7. Question 7

    In the sequence of code execution, statements are always executed one at a time from top to bottom unless a loop or conditional changes that order.

  8. Question 8

    Look at the following code. What value does result have after execution?

  9. Question 9

    Which statement best explains what 'tracing through code' means?

  10. Question 10

    Look at the following code. What is printed?

  11. Question 11

    A program needs to check if a number is even. Which condition correctly identifies an even number?

  12. Question 12

    A loop can contain another loop inside it, but a conditional statement cannot contain a loop.

  13. Question 13

    Look at the following code. What does it print?

  14. Question 14

    A program receives a user's age as input and must determine if they are eligible to vote (18 or older). What is the correct comparison operator to use?

  15. Question 15

    The order of operations in code is always the same regardless of whether parentheses are used.

  16. Question 16

    Look at the following code that counts how many times a certain condition is met. What is the value of counter at the end?

  17. Question 17

    Which of the following best describes the benefit of using a loop in a program?