Event Budget Builder
SDD5Create a calculator that receives ticket quantity, ticket price and event cost, then displays income, cost and surplus or loss.
Challenges up to SDD5 are shown. Change the lesson when you are ready.
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?
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.
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.
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.
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.
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.
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.
An event sells 48 tickets at £6.50 each and costs £145 to run. Calculate the surplus.
48 * 6.50 = 312.00; surplus is 312.00 - 145.00 = 167.00.Plan a number-guessing program that repeats until the secret number is entered.
attempts = 0, then receive the first guess before the loop.Analyse the array [18, 21, 21, 26, 14] without using Python's min() or max().
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:
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.
Create a calculator that receives ticket quantity, ticket price and event cost, then displays income, cost and surplus or loss.
Receive a first name, surname and two-digit number, then concatenate them into a consistent username.
Calculate delivery cost from an order value: orders of £30 or more receive free delivery; smaller orders cost £4.50.
Decide whether an applicant is eligible using age, completed training and medical clearance.
AND to require every essential condition.OR and a disqualifying condition using NOT.Create a five-question quiz that uses a fixed loop and maintains a running score.
Create a number-guessing game that repeats until the secret value is entered and counts attempts.
Simulate repeated six-sided die rolls using the predefined random function.
Store five anonymous scores in an array and display each score with its position.
Search an array of item codes for a target supplied by the user.
Analyse an array of scores by finding the minimum, maximum and number meeting a qualifying threshold.
Collect five ratings from 1 to 5, rejecting every out-of-range entry before adding it to a running total.
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)
Improve a working but repetitive, fragile and difficult-to-read program without changing its required output.
Choose a fresh context such as a quiz, tournament, journey analyser or stock checker and develop a complete solution.
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
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
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")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
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.