Question 1
The steps in an algorithm to build a picnic table are given:
Measure and mark the lumber cuts that need to be made.
Buy the needed materials.
Determine the needed materials.
Cut the lumber to the proper dimensions.
Assemble the pieces and paint.Which two steps of the algorithm should be switched to make the algorithm successful?
Comprehensive and Detailed Explanation From Exact Extract:
To build a picnic table, the steps must be performed in a logical order. According to foundational programming principles (e.g., Certiport Scripting and Programming Foundations Study Guide), algorithms require correct sequencing to achieve the desired outcome. We analyze the steps to identify the logical order and find which steps are misplaced.
Current Order:
Measure and mark lumber cuts.
Buy the needed materials.
Determine the needed materials.
Cut the lumber to the proper dimensions.
Assemble the pieces and paint.
Logical Order Analysis:
Determine the needed materials (Step 3) must come first, as you need to know what materials are required before purchasing them.
Buy the needed materials (Step 2) follows, as you purchase the materials identified.
Measure and mark the lumber cuts (Step 1) comes next, as you need the materials on hand to measure and mark.
Cut the lumber to the proper dimensions (Step 4) follows marking.
Assemble the pieces and paint (Step 5) is the final step.
Issue: Step 3 (determine materials) is after Step 2 (buy materials), which is illogical because you must know what to buy before purchasing. Switching Steps 2 and 3 corrects this:
New order: 1, 3, 2, 4, 5.
Option A: '1 and 3.' Incorrect. Switching Step 1 (measure/mark) and Step 3 (determine materials) places measuring before determining materials, which is illogical since you need materials first.
Option B: '1 and 2.' Incorrect. Switching Step 1 (measure/mark) and Step 2 (buy materials) places buying before determining materials (Step 3), which remains out of order.
Option C: '2 and 3.' Correct. Switching Step 2 (buy materials) and Step 3 (determine materials) results in: 1, 3, 2, 4, 5, where materials are determined before buying.
Option D: '2 and 4.' Incorrect. Switching Step 2 (buy materials) and Step 4 (cut lumber) places cutting before determining materials, which is illogical.
Certiport Scripting and Programming Foundations Study Guide (Section on Algorithms and Sequencing).
General Algorithm Design Principles (logical step ordering).

