Conditionals · Modify the Code
Shape — improve or specify
L3 Application
Blocks
~3 min
A rule changes: does 65 qualify?
The pricing rule has changed: people aged 65 and over now get the senior discount (previously only people over 65 did). Modify the condition so the program follows the new rule. You may write the new line of code or describe the change in words.
age = 65
if age > 65:
print("senior discount")
else:
print("full price")
Why this activity was chosen
- Bloom level: L3 Application: Change existing code to meet a new requirement.
- Block Model level: Blocks (step 2 of 4): a logical group of statements read as one unit, such as a loop, a conditional or a function.
- Misconception targeted: shown after you answer, so it does not give the answer away.
Most real programming, and most work with AI output, is changing code that already exists. Students must find the part of the code a new requirement touches and change only that, which is a different skill from writing a solution from scratch.
AI’s role here: AI may suggest which line to look at. It must not supply the changed line.