SDD  ·  Software Design & Development

Extension Studio

Independent challenges from SDD5 onwards Choose 30–120 min Python required
Learning intentions
  • Apply familiar programming constructs to unfamiliar problems.
  • Combine analysis, design, implementation, testing and evaluation.
  • Work independently and explain the reasoning behind a solution.
Success criteria
  • I can select a challenge that uses only skills I have already learned.
  • I can produce working code and convincing evidence that it has been tested.
  • I can describe and evaluate my solution using precise technical language.

Challenges up to SDD5 are shown. Change the lesson when you are ready.

0 of 1 complete
Warm up — ready to stretch?

These questions check that you understand how to use the studio.

1. Which activity provides the strongest evidence of deeper programming skill?

2. You have completed SDD8. Which challenges should you attempt?

3. Which is the best evidence that a program is complete?

Key vocabulary

transfer
Applying knowledge learned in one situation to a different situation.
constraint
A rule or limit that a solution must obey.
decomposition
Breaking a larger problem into smaller, manageable parts.
test evidence
Recorded inputs, expected results and actual results showing how a solution was checked.
refactor
Improve the structure or readability of code without changing its required behaviour.
unfamiliar context
A new scenario that still requires programming constructs you already understand.

How the Extension Studio works

Depth before distance

Moving quickly through lessons is useful only when the knowledge remains secure. The Extension Studio gives you a different kind of progress: instead of racing ahead to a construct that has not been taught, you apply familiar constructs to a less familiar problem. A program that combines several existing ideas, copes with awkward inputs and is clearly explained usually demonstrates more understanding than a longer program copied from instructions. Select your latest completed lesson above. The page will show that challenge and every earlier challenge, so you can choose a context that interests you without relying on future content.

Choose Extend, Stretch or Fly

Every challenge has three levels. Extend uses the central skill from one lesson in a new context. Stretch combines it with earlier learning or adds a more demanding requirement. Fly asks you to behave like an independent developer: interpret a specification, make design decisions, test systematically and explain the quality of the result. Begin with Extend unless you can already describe your planned inputs, processes and outputs without help. You do not have to complete all three levels in one sitting. A carefully tested Extend solution is more valuable than an unfinished Fly solution.

ExtendOne lesson skill in a fresh context.
StretchSeveral familiar skills combined.
FlyIndependent development with full evidence.

Follow a development process

Do not begin every challenge by immediately typing Python. First identify the inputs, processes and outputs. Decompose the problem and record a design using pseudocode, a structure diagram or a flowchart when appropriate. During implementation, use meaningful identifiers, indentation, white space and brief comments that explain important decisions. Test small parts as you build them. At the end, compare the complete program against every requirement. This process makes difficult problems easier because it replaces one large unknown task with several smaller decisions.

Make testing convincing

Running a program once is not enough. Where a value has a permitted range, include normal data, values at both extremes and exceptional values outside the permitted range. Predict the expected result before running the test. Record the actual result honestly and repair the program when a test fails. For array algorithms, remember awkward cases such as the target occurring first, last, more than once or not at all. For minimum and maximum algorithms, consider whether negative values or duplicate values change your logic.

Explain, do not merely show

A screenshot or code listing shows what you produced, but an explanation demonstrates why it works. Refer to exact identifiers, conditions or loops in your own code. For example, “the program is robust” is too general. A stronger explanation is: “the conditional loop repeats while rating < 1 or rating > 5, so an out-of-range rating cannot be stored.” When evaluating efficiency, compare a chosen construct with a realistic alternative, such as a loop instead of repeated statements. When evaluating fitness for purpose, connect the evidence to a specific functional requirement.

Use help thoughtfully

If you become stuck, first write down what the program should do next, inspect the current values of important variables and test a smaller example. You may use lesson notes and Python documentation, but you must be able to explain every submitted line. If a tool suggests code, predict its behaviour before running it and annotate how it meets the requirement. The goal is not simply to obtain working output; it is to strengthen your own problem-solving.

Worked examples

Example 1 — extending SDD5

An event sells 48 tickets at £6.50 each and costs £145 to run. Calculate the surplus.

1
Analyse: inputs are tickets, ticket price and cost; processes are multiplication and subtraction; output is the surplus.
2
Calculate: income is 48 * 6.50 = 312.00; surplus is 312.00 - 145.00 = 167.00.
3
Stretch: receive the three values from the keyboard and use meaningful real and integer variables rather than fixed values.
Example 2 — extending SDD10

Plan a number-guessing program that repeats until the secret number is entered.

1
Generate the secret number, set attempts = 0, then receive the first guess before the loop.
2
While the guess is not equal to the secret, increase the attempt count, give a “too high” or “too low” hint, then receive another guess.
3
After the loop, count the successful guess and display the total attempts. Test a first-time success and several incorrect guesses.
Example 3 — extending SDD14

Analyse the array [18, 21, 21, 26, 14] without using Python's min() or max().

1
Initialise both minimum and maximum using the first value, 18. Initialise total and count to 0.
2
Traverse every value. Update the total, compare it with the current minimum and maximum, and increase the count when the value is greater than 20.
3
The verified results are total 100, average 20, minimum 14, maximum 26 and three values greater than 20.
Now you try

A challenge analyses the scores [12, 18, 18, 25]. It must display the total, the maximum and the number of scores at least 18.

Answer the following:

  1. Which completed lesson is the minimum sensible entry point?
  2. What results should a correct program display?
  3. What extra evidence would turn working code into a strong submission?
  1. SDD14, because the task requires traversal, maximum and conditional count algorithms.
  2. Total 73, maximum 25 and count 3.
  3. A design, a test table including expected and actual results, and an evaluation referring to exact parts of the code.
Common mistakes
Choosing unfamiliar syntax instead of a harder problem. Stretch should deepen your reasoning. New Python features are optional and must not replace secure N5 constructs.
Starting with code and no plan. A short IPO analysis and design usually saves time when several constructs must work together.
Testing only friendly values. Include boundaries, invalid values, duplicates, missing search targets and any other case that could expose faulty logic.
Writing a generic evaluation. Name an identifier, condition or loop from your own solution and connect it to a requirement.
Exam tip

Identify normally needs a concise fact. Describe needs relevant characteristics. Explain needs the reason or effect in the question's context. When asked to design or write code, first identify which standard algorithm is required and adapt it to the names, data and conditions in the scenario.

Challenge library

Event Budget Builder

SDD5

Create a calculator that receives ticket quantity, ticket price and event cost, then displays income, cost and surplus or loss.

Extend: Use appropriate integer and real variables with correct arithmetic.
Stretch: Add a 5% transaction fee and calculate the revised surplus or loss.
Fly: Compare two venues and justify which is financially safer at three different attendance levels.
Evidence: IPO analysis, code, three verified calculations and a short conclusion.

Username Workshop

SDD6

Receive a first name, surname and two-digit number, then concatenate them into a consistent username.

Extend: Display a clear confirmation message containing the generated username.
Stretch: Generate two alternative formats and explain exactly how each string is assembled.
Fly: Write a precise specification another developer could implement without seeing your code.
Evidence: Functional requirements, code and examples using short and long names.

Delivery Decision Engine

SDD7

Calculate delivery cost from an order value: orders of £30 or more receive free delivery; smaller orders cost £4.50.

Extend: Implement the decision and display the final total.
Stretch: Add a separate same-day option and design the rules before coding.
Fly: Construct a boundary-focused test table and explain how it proves the selection is correct.
Evidence: Decision design, code, tests below, at and above £30, and an explanation.

Expedition Eligibility Checker

SDD8

Decide whether an applicant is eligible using age, completed training and medical clearance.

Extend: Use AND to require every essential condition.
Stretch: Add an alternative route using OR and a disqualifying condition using NOT.
Fly: Simplify deliberately repeated selection and justify why the revision is more efficient.
Evidence: Truth-table-style tests covering each route and rejection reason.

Five-Round Quiz

SDD9

Create a five-question quiz that uses a fixed loop and maintains a running score.

Extend: Ask the same calculation with five different supplied values.
Stretch: Give immediate feedback and display a percentage score at the end.
Fly: Design a marking scheme with different point values and prove that the maximum score is reachable.
Evidence: Loop design, code and tests for zero, partial and full scores.

Guessing Game Analyst

SDD10

Create a number-guessing game that repeats until the secret value is entered and counts attempts.

Extend: Give “too high” and “too low” feedback.
Stretch: Validate guesses to the permitted range and offer another game after success.
Fly: Compare two loop designs and evaluate which is clearer and less likely to create an infinite loop.
Evidence: Pseudocode, code, trace of one game and loop-condition explanation.

Dice Experiment

SDD11

Simulate repeated six-sided die rolls using the predefined random function.

Extend: Roll six times and display every result.
Stretch: Calculate and display the rounded average roll.
Fly: Keep rolling until a six appears, count the attempts and explain why different runs take different lengths of time.
Evidence: Code, sample output and explanation of why random results vary.

Data Dashboard

SDD12

Store five anonymous scores in an array and display each score with its position.

Extend: Traverse the complete array using a fixed loop.
Stretch: Calculate the average and count how many scores are above it.
Fly: Accept all five values from the keyboard and produce a clearly formatted report with headings and numbered positions.
Evidence: Array design, code and output proving first and last elements were processed.

Lost Property Search

SDD13

Search an array of item codes for a target supplied by the user.

Extend: Report found or not found after traversing the array.
Stretch: Display every matching position when duplicate codes exist.
Fly: Count comparisons and compare the best-case, worst-case and not-found searches.
Evidence: Algorithm design and tests for first, last, duplicate and absent targets.

Tournament Scorekeeper

SDD14

Analyse an array of scores by finding the minimum, maximum and number meeting a qualifying threshold.

Extend: Implement all three algorithms without built-in min, max or count functions.
Stretch: Add total and rounded average, then count values above the average.
Fly: Produce a complete analysis, design, implementation and test table for an unseen score list.
Evidence: IPO table, pseudocode, code and hand-verified expected results.

Robust Data Collector

SDD15

Collect five ratings from 1 to 5, rejecting every out-of-range entry before adding it to a running total.

Extend: Use a conditional loop for every validation.
Stretch: Store accepted ratings and report total, average and count of rating 5.
Fly: Use a sentinel to accept an unknown number of ratings and safely handle the case where none are entered.
Evidence: Design plus normal, extreme and exceptional test data.

Software Forensics

SDD16

Investigate this short program containing syntax, execution and logic errors:

scores = [12, 18, 25] total = 0 for position in range(3) total = scores[position] average = total / 0 print("Average:", average)
Extend: Classify and repair at least one example of each error type.
Stretch: Predict behaviour and construct a test table before making any repair.
Fly: Create your own faulty program and an evidence-based diagnostic guide for another developer.
Evidence: Predictions, original fault, repair, actual results and explanation.

Code Refactoring Clinic

SDD17

Improve a working but repetitive, fragile and difficult-to-read program without changing its required output.

Extend: Improve identifiers, indentation, white space and commentary.
Stretch: Replace repeated statements or inefficient selection with appropriate loops or ELSE IF.
Fly: Write a comparative evaluation covering fitness for purpose, efficiency, robustness and readability.
Evidence: Before-and-after code, regression tests and references to exact changes.

Independent Mini Assignment

SDD18

Choose a fresh context such as a quiz, tournament, journey analyser or stock checker and develop a complete solution.

Extend: Receive and validate values, store them in an array, analyse them and display a clear summary.
Stretch: Adapt at least two standard algorithms to the chosen context.
Fly: Complete analysis, design, implementation, testing and evaluation with no step-by-step code guide.
Evidence: One organised development report containing every phase and the final code.
Task Set — developer quality checkpoint

Complete this checkpoint while working through the studio. Questions 1–5 are auto-checked; questions 6–9 are self-marked planning and practical tasks.

1. Free delivery applies when an order total is £30 or more. Which condition correctly includes the £30 boundary? TYPE 1

2. A rating must be from 1 to 5 inclusive. Which condition should keep a validation loop repeating? TYPE 1

3. A linear search must report every occurrence of a duplicate target. What must the algorithm avoid? TYPE 1

4. What is the safest initial value for a minimum algorithm processing a non-empty array? TYPE 1

5. Which evaluation statement gives the strongest evidence of robustness? TYPE 1

6. Design three functional requirements for the Expedition Eligibility Checker. Each requirement should describe what the program will do. TYPE 2

Examples: (1) The program will receive the applicant's age. (2) The program will receive whether training and medical clearance have been completed. (3) The program will display whether the applicant is eligible and, if not, a suitable rejection message.

7. A valid quantity is an integer from 1 to 10 inclusive. Give one normal value, both extreme values and two exceptional values. TYPE 2

Normal: 5 (other values from 2–9 are acceptable). Extremes: 1 and 10. Exceptional: 0 and 11. Other out-of-range integers are also acceptable exceptional values.

8. Refactor the repeated code so it uses a fixed loop, then test that the same five lines are displayed. TYPE 3

print("Practice carefully") print("Practice carefully") print("Practice carefully") print("Practice carefully") print("Practice carefully")
for count in range(5):
    print("Practice carefully")


The loop is more efficient because one print statement is repeated five times. A suitable test confirms that the output still contains exactly five identical lines.

9. Select one visible challenge. Before coding, record its inputs, processes, outputs, planned construct and at least three tests. Then implement the Extend level. TYPE 3

A strong response names the chosen challenge; gives context-specific inputs, processes and outputs; identifies appropriate constructs; predicts results for normal and awkward cases; and records whether the final implementation met every Extend requirement.
Teacher notes — Shift+T to hide

Suggested use: Introduce the studio in 10 minutes, model how to choose an appropriate level, then use it for early-finisher periods or planned extension blocks. A challenge may span several lessons.

Progression: Pupils should select their latest genuinely completed lesson. The selector and passport are stored only in that browser's local storage and collect no personal information.

Evidence checkpoint: Before accepting a completed challenge, ask the pupil to explain one loop or condition, show one awkward test and identify one improvement. This keeps the activity focused on understanding.

Teacher-generated variants: Change the context or dataset while retaining the same constructs. Particularly useful variants include negative values for min/max, duplicate search targets and validation boundaries.

Optional Higher bridge: After secure completion of SDD17/18, invite pupils to restructure one project using user-defined functions, parallel arrays or records. Label this clearly as beyond National 5.

SQA command words covered: identify, describe, explain, design, implement, test and evaluate.