A recipe has correct steps but in the wrong order. Will it work? Why?
Not necessarily; sequencing requires the correct order.
“If score ≥ 40 → Pass, otherwise Fail.” What structure is this?
It chooses between paths; it does not repeat instructions.
A loop repeats an action 5 times. What programming concept is this?
Iteration.
Expected: 50. Actual: 0. What should you investigate first?
The program's logic/instructions causing the wrong output.
Why does placing a repeat block inside another repeat block change the behaviour?
The inner actions repeat for every outer repetition.
In swapping two values, what happens if the first value isn't stored before replacement?
Its original value can be lost.
A program checks a condition and then repeatedly performs an action. Which two structures are combined?
Selection + Iteration.A task says “keep repeating while the condition is true.”
A task says “keep repeating while the condition is true.” Which loop fits?
While loop.
The code runs without crashing but gives the wrong result. Can it still have a bug?
Yes; bugs can be logical errors.
Outer loop = 4; inner loop = 3. If one inner action occurs each repetition, how many actions?
12.
Why can't the steps “turn → move → turn → move” simply be rearranged?
Changing the sequence changes the result.
A robot repeats “move forward” until it reaches a wall, then chooses left or right. Identify the two structures.
Iteration + Selection.
When would replacing repeated blocks with a loop make an algorithm better?
When the same instructions occur repeatedly.
A loop never ends. What two things should you inspect?
The loop condition and whether the value controlling it changes.
A 3-row pattern has 5 actions per row. Which loop controls 3 and which controls 5?
Outer = 3; inner = 5.
A rectangle algorithm repeats “draw → turn” four times. Which part can be replaced without changing the required sequence?
The repeated set of instructions can be placed inside a loop.
Can Selection occur inside Iteration? Give the idea, not an example.
Yes; each repetition can make a decision based on a condition.
Why is a while loop risky if its controlling condition never changes?
It can continue indefinitely.
Find the error:
if i == 3
print(i)
Missing : after i == 3.
Why does moving an inner repeat block outside the outer repeat block change the result?
It no longer repeats once for every outer iteration.
A sequence contains 8 steps, but steps 3–6 are identical repetitions. What should replace them?
A loop containing the repeated steps.
A program must “repeat until done” and “choose an action when a condition occurs.” Which two structures are needed?
Iteration + Selection.
A student uses a for loop when the number of repetitions depends on a condition. Why should they reconsider?
while loop is more appropriate.
Find the error:
for i in range(1,6):
if i == 3:
continue
print(i
Missing ) in print(i). After fixing it, 3 is skipped because of continue.
You need a 4×4 block pattern. If the outer loop controls rows and inner loop controls blocks per row, what happens if you change only the outer loop from 4 to 6?
he pattern becomes 6 rows × 4 blocks per row.