Practice Sequence in CS Thinking
Use these practice problems to test your method after reviewing the concept explanation and worked examples.
Quick Recap
Executing a series of instructions one after another in a fixed, specific order. In sequential execution, each instruction must complete before the next one begins, and the order in which statements appear determines the order in which they run.
Do this, then that, then the next thingβorder matters and each step must finish before the next.
Example 1
easyWhat is the output of this sequence of instructions? SET x = 5. SET y = 3. SET z = x + y. OUTPUT z.
Example 2
easyRearrange these steps into the correct sequence for logging into a website: (A) Click 'Login'. (B) Enter password. (C) Open browser. (D) Navigate to website. (E) Enter username.
Example 3
easyWhat is the output? SET a = 10. SET b = a * 2. SET a = 0. OUTPUT b.
Example 4
easyTrace this pseudocode: SET x = 2. SET y = x + 4. SET x = y * 2. OUTPUT x, y.