Your project for this week
You will design, build and test a Python program for a leisure centre. This is a consolidation project: it brings together the skills you have already learned in SDD1–SDD8. You are not expected to learn any new programming techniques.
This page is your workbook for all three periods. Keep your design evidence, test results and evaluation together in OneNote. Your Python program is created and saved separately in PyCharm.
- Apply the stages of software development to a complete practical problem.
- Combine variables, input, output, arithmetic, string operations and selection in Python.
- Use evidence from testing to debug and evaluate a working program.
- I can produce analysis and design evidence before coding.
- I can create a working Python solution using only techniques from SDD1–SDD8.
- I can run all six compulsory tests, record the results and evaluate my solution.
Your three-period route
Analyse the problem, identify variables and create a complete design.
Implement the program carefully in PyCharm and run it often.
Test, debug, improve and evaluate the finished solution.
Project brief
The scenario
A local leisure centre needs a Python program that helps a visitor choose an activity and calculates the correct price. The program will ask for a fictional visitor name, age, height, membership status and chosen activity. It will then decide whether the visitor is eligible, apply any discount and display a clear booking summary.
Use fictional test data only. Do not enter your own name or anyone else’s personal information.
Activity and price rules
| Activity | Standard price | Entry rule |
|---|---|---|
| Swimming | £8 | Open to everyone |
| Climbing | £12 | At least 10 years old AND at least 140 cm tall |
| Skating | £10 | At least 8 years old |
Discount and output rules
Visitors aged 15 or under OR aged 65 or over receive £2 off.
Other eligible visitors who are members receive £1 off.
Use the first three letters of the fictional name in uppercase, followed by the age.
TestUser, age 14, becomes TES14.An activity other than swimming, climbing or skating must produce a clear error message.
Techniques you may use
Variables, strings, integers, real numbers, Booleans, arithmetic, input(), print(), casting, concatenation, len(), slicing, upper(), lower(), if, elif, else, comparisons, and, or and not.
Analyse and design
Today’s goal: produce enough planning evidence that another programmer could understand what your solution must do.
1. State the purpose
Write one precise sentence explaining what the finished program will do. Start with: The purpose of the program is to…
2. Identify the inputs, processes and outputs
Complete the IPO table. Be specific: “calculate price after discount” is better than simply writing “calculate”.
| Inputs | Processes | Outputs |
|---|---|---|
3. Write the functional requirements
Write at least eight statements describing what the program must do. Each should begin The program must…
4. Create a variable table
Include every important value your program must store. Choose from string, integer, real and Boolean.
| Variable name | Data type | Purpose |
|---|---|---|
| visitor_name | String | Stores the fictional visitor name |
5. Design the algorithm
Create a structure diagram and either a flowchart or numbered main-steps-and-refinements pseudocode. Your design must include the activity rules, eligibility checks, discounts, booking code and final output.
Create diagrams in draw.io and insert screenshots into this OneNote page. If writing pseudocode, type or ink it below.
- I have a purpose, IPO table and at least eight functional requirements.
- My variable table includes sensible names and data types.
- My design shows every decision and calculation before I begin coding.
Implement in Python
Today’s goal: turn yesterday’s design into a clear, working Python program.
1. Set up the file
- Open your usual SDD project in PyCharm.
- Create a Python file named
leisure_centre.py. - Add a heading as a comment, then save the file.
- Keep this OneNote workbook open beside PyCharm so you can follow your design.
2. Build in a sensible order
- Receive the fictional visitor name, age, height, membership status and activity.
- Cast age and height to integers.
- Convert membership status and activity to lowercase.
- Set starting values for price and eligibility.
- Use selection to set the activity price and determine eligibility.
- Apply the correct discount only when appropriate.
- Create the booking code using slicing, uppercase conversion and concatenation.
- Display either an invalid/ineligible message or a clear booking summary.
3. Core implementation checklist
- My prompts clearly tell the user what to enter.
- I used
int()for age and height. - I used
lower()so activity and membership inputs are consistent. - I used an
if/elif/elsechain. - I used at least one complex condition with
and. - I used at least one complex condition with
or. - I used arithmetic to calculate the final price.
- I used slicing and
upper()to create the booking code. - The final output is readable and labels every value.
4. Record today’s progress
Paste a screenshot of your latest program run into OneNote. Under it, state what works and what still needs attention next period.
- My file is saved as
leisure_centre.py. - The program runs without a syntax error for at least one valid activity.
- I recorded evidence of my current result in OneNote.
Test, debug and evaluate
Today’s goal: prove that your program works across all important routes, correct any errors and evaluate the finished solution.
1. Run all compulsory tests
Use the fictional name TestUser for every test. Record the actual result and mark each test pass or fail. For eligible tests, the booking code should begin TES and end with the test age.
| # | Age | Height | Member | Activity | Expected result |
|---|---|---|---|---|---|
| 1 | 14 | 145 | no | climbing | Eligible · £10 · code TES14 |
| 2 | 14 | 135 | yes | climbing | Not eligible |
| 3 | 30 | 170 | yes | swimming | Eligible · £7 · code TES30 |
| 4 | 70 | 160 | no | skating | Eligible · £8 · code TES70 |
| 5 | 7 | 130 | no | skating | Not eligible |
| 6 | 25 | 175 | no | bowling | Invalid activity message |
| Test | Actual result | Pass / fail | Correction made, if needed |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 |
2. Debug and retest
If a test fails, find the cause, correct the program and run that test again. Describe at least one error you encountered—even if it was corrected before the formal tests.
3. Evaluate the finished solution
Answer in full sentences:
- Which functional requirements did your program complete successfully?
- What evidence shows that the eligibility and discount rules work?
- What part of your program works particularly well?
- What would you improve in a future version?
- OneNote contains my analysis, requirements, variable table and designs.
- OneNote contains my six test results, debugging evidence and evaluation.
- My final
leisure_centre.pyfile is saved in the required location. - I have submitted or shared both pieces of work as instructed.
Extensions — only after the core project passes all six tests
Extension 1 — Safer names
Use len() and selection to display a clear message if the fictional name contains fewer than three characters.
Extension 2 — Weekend promotion
Ask for the day. On Saturday OR Sunday, reduce the price by a further £1 for eligible visitors.
Extension 3 — Better presentation
Improve prompts, spacing and headings so the final booking summary is exceptionally clear. Add a personalised activity message without changing the original rules.
Extension 4 — Extra evidence
Update your design to show any extension you added, then create and record suitable additional test cases.
Purpose: This is consolidation of SDD1–SDD8. Pupils should not use loops, arrays, lists or user-defined functions.
Period 1 checkpoint: analysis and design evidence should be complete before implementation. A structure diagram plus either a flowchart or pseudocode is required.
Period 2 checkpoint: the program should run for at least one valid activity. Encourage frequent small runs rather than writing the whole solution before testing.
Period 3 expected prices: Test 1 £10, Test 3 £7 and Test 4 £8. Tests 2 and 5 are ineligible; Test 6 is invalid. These values have been checked against the published rules.
Common issues: missing int(); using = instead of ==; capital AND/OR; incorrect indentation; applying the £1 member discount after the £2 age discount; and displaying a price for an ineligible visitor.
Submission: pupils need their OneNote workbook evidence and the separate leisure_centre.py file. Extensions are optional and should begin only after all six tests pass.