- Foundation
- 15 practice questions
Final self-assessment: Input-Output
Test yourself on the whole course: 15 questions with answers explained.
If something looks wrong, please tell us.
Attempt all 15 questions without looking back at the lessons, then check your answers and read each explanation. The questions are a little harder than the checks after each lesson.
Final self-assessment
-
1. Input: 63 28 91 14 55. Step I: 14 63 28 91 55. Step II: 14 28 63 91 55. What is Step III?
- 14 28 55 63 91
- 14 28 63 55 91
- 14 28 91 63 55
- 14 55 28 63 91
Show answer
Answer: A. The steps show the next smallest number moving to the next place from the left. Step III moves 55 to third place, giving 14 28 55 63 91.
-
2. Same machine (next smallest number to the next place from the left). Input: 85 40 72 13 66. How many steps are needed?
- 3
- 5
- 4
- 2
Show answer
Answer: C. Step I: 13 85 40 72 66. Step II: 13 40 85 72 66. Step III: 13 40 66 85 72. Step IV: 13 40 66 72 85. So 4 steps.
-
3. Rule: one word per step moves to the next place from the left in alphabetical order. Input: mango grape apple lime cherry. What is Step II?
- apple mango grape lime cherry
- apple cherry mango grape lime
- apple cherry grape mango lime
- cherry apple mango grape lime
Show answer
Answer: B. Alphabetical order: apple, cherry, grape, lime, mango. Step I: apple mango grape lime cherry. Step II: cherry moves to second place, giving apple cherry mango grape lime.
-
4. Rule: the largest remaining number moves to the next place from the right each step. Input: 64 31 77 19 52. What is Step II?
- 31 19 52 64 77
- 64 31 19 52 77
- 19 31 52 64 77
- 31 52 19 64 77
Show answer
Answer: A. Step I: 77 goes to the right end, giving 64 31 19 52 77. Step II: 64 goes to the second last place, giving 31 19 52 64 77.
-
5. Rule: one word per step moves to the next place from the left in alphabetical order. Input: chalk board chair book. What is Step III?
- board book chalk chair
- book board chair chalk
- board book chair chalk
- board chalk chair book
Show answer
Answer: C. Order: board, book (a before o), chair, chalk (i before l). Step I: board chalk chair book. Step II: board book chalk chair. Step III: board book chair chalk.
-
6. Rule: at each step the smallest remaining number moves to the next place from the left, and the others keep their order. Input: 90 45 18 72 36. What is Step III?
- 18 36 90 45 72
- 18 36 45 72 90
- 18 45 36 90 72
- 18 36 45 90 72
Show answer
Answer: D. Step I: 18 90 45 72 36. Step II: 18 36 90 45 72. Step III: 45 moves to third place, giving 18 36 45 90 72.
-
7. Odd steps: the smallest remaining number moves to the next place from the left. Even steps: the largest remaining number moves to the next place from the right. Input: 70 35 14 49 28. In how many steps is the line sorted?
- 2
- 3
- 4
- 5
Show answer
Answer: B. Step I: 14 70 35 49 28. Step II: 70 to the right end, giving 14 35 49 28 70. Step III: 28 to second place, giving 14 28 35 49 70, which is sorted. So 3 steps.
-
8. A one-move-per-step sorting machine works on 8 elements. What is the largest number of steps it can need?
- 8
- 6
- 7
- 9
Show answer
Answer: C. At most n - 1 steps are needed, since the last element falls into place by itself: 8 - 1 = 7.
-
9. Rule: the largest remaining number moves to the next place from the left each step (descending order). Input: 6 11 2 9 4. What is Step II?
- 11 6 9 2 4
- 11 9 6 2 4
- 11 9 6 4 2
- 9 11 6 2 4
Show answer
Answer: B. Step I: 11 moves to the front, giving 11 6 2 9 4. Step II: 9 moves to second place, giving 11 9 6 2 4.
-
10. Rule: in each step the first element moves to the end. Input: 4 9 1 7 3. What is Step XIII (step 13)?
- 1 7 3 4 9
- 7 3 4 9 1
- 3 4 9 1 7
- 4 9 1 7 3
Show answer
Answer: B. Five elements return to the input every 5 steps. 13 = 10 + 3, so Step XIII equals Step III. Step I: 9 1 7 3 4; Step II: 1 7 3 4 9; Step III: 7 3 4 9 1.
-
11. Rule: Step I swaps the first and last elements, Step II the second and second-last, and so on. Input: 2 4 6 8 10 12 14. What is Step II?
- 14 12 6 8 10 4 2
- 14 4 6 8 10 12 2
- 14 12 10 8 6 4 2
- 2 12 6 8 10 4 14
Show answer
Answer: A. Step I swaps 2 and 14: 14 4 6 8 10 12 2. Step II swaps 4 and 12: 14 12 6 8 10 4 2.
-
12. Rule: in each step add 5 to the numbers in odd positions and subtract 3 from the numbers in even positions. Input: 12 40 7 25. What is Step III?
- 22 34 17 19
- 27 34 22 19
- 17 37 12 22
- 27 31 22 16
Show answer
Answer: D. After three steps odd positions gain 3 x 5 = 15 and even positions lose 3 x 3 = 9: 12 + 15 = 27, 40 - 9 = 31, 7 + 15 = 22, 25 - 9 = 16.
-
13. Rule: first the words move, one per step, in alphabetical order to the next place from the left; after that, the numbers move, one per step, in ascending order to the next place. Input: 58 rope 16 hat 33 bell. What is Step IV?
- bell hat rope 16 58 33
- bell hat rope 58 16 33
- bell hat rope 16 33 58
- bell hat 16 rope 58 33
Show answer
Answer: A. Steps I-III place bell, hat, rope: bell hat rope 58 16 33. Step IV places the smallest number, 16: bell hat rope 16 58 33.
-
14. Rule: first the words move, one per step, in alphabetical order to the next place from the left; after that, the numbers move, one per step, in ascending order to the next place. Input: 58 rope 16 hat 33 bell. How many steps in all?
- 4
- 6
- 3
- 5
Show answer
Answer: D. Three steps place the words. Step IV places 16 (bell hat rope 16 58 33) and Step V places 33 (bell hat rope 16 33 58), after which 58 is already last. So 5 steps.
-
15. Odd steps: the largest remaining number moves to the next place from the right. Even steps: the smallest remaining number moves to the next place from the left. Input: 27 9 45 18. What is Step II?
- 27 9 18 45
- 9 18 27 45
- 9 27 18 45
- 18 9 27 45
Show answer
Answer: C. Step I: 45 goes to the right end, giving 27 9 18 45. Step II: 9 goes to the left end, giving 9 27 18 45.
Questions 1-3: lesson 1, "What an input-output machine does". Questions 4-6: lesson 2, "Arranging words alphabetically and numbers in order". Questions 7-9: lesson 3, "Finding a given step and the number of steps". Questions 10-12: lesson 4, "Rotation, swapping and arithmetic machines". Questions 13-15: lesson 5, "Mixed rules and pattern questions". Revisit a lesson for the questions you missed.
Sign in to keep track of the lessons you finish.