KS3 Computing · Real programs keep data in lists, take text apart as strings, split work into subroutines, check their input, save to files, and get tested on purpose.
Use a stand-up to say what you did, what you will do and what is blocking you.
Create your part of the project in small steps, testing after each one.
Write a log entry with what you did, what went wrong and what comes next.
Success criteria
I can give my stand-up update in about 30 seconds.
I can show my part working at the end of the lesson, even if it is small.
I can write a log entry that a teammate could follow.
Key words
Say each word, then read what it means. Every one is in the glossary too.
List
One name holding many values in order. Also called an array.
Index
An item's position in a list, counting from 0.
Subroutine
A named block of code you can call when needed.
Function
A subroutine that returns a value.
Parameter
A placeholder in a subroutine for a value passed in.
Validation
Checking input is reasonable before using it.
Boundary data
Test data at the very edge of what's allowed.
The explanation
Read it here, or open the study page below to go one step at a time with things to try.
Sprints and stand-ups
A sprint is a short, fixed block of time. The team builds the parts it chose for that sprint.
Each sprint starts with a stand-up: a quick meeting where everyone stands, so it stays short. Each person answers three questions:
What did I do last time?
What will I do today?
What is blocking me?
A blocker is anything that stops you: a bug, a missing part, or a question.
★Remember
Speak for about 30 seconds each. Solve problems after the stand-up, not during it.
e.g.Example
Then the guild asks for one mini-lesson on what it is stuck on. Good requests: 'How do we keep asking until the input is valid?' 'How do we read a sensor every second?'
Build in small steps: an example
Leo owns 'reject bad input and ask again'. He builds and tests it on its own first.
def get_number(prompt):
while True:
text = input(prompt).strip() # strip() removes spaces at each end
if text.isdigit() and int(text) <= 255:
return int(text) # valid: hand the number back
print("Please type a whole number from 0 to 255.")
print(get_number("What is 101 in denary? "))
while True: keeps asking, until a return ends the function.
isdigit() is True only if every character is a digit. A blank, '-1' or 'five' gives False.
int(text) <= 255 checks the range. Python only checks it if isdigit() was True.
The last line is a quick test. Leo deletes it once the part works.
★Remember
Test each small step at once. Type 5, then 255, then 256, then a blank, then 'five'.
Keep the log
At the end of every sprint, each person writes a short log entry.
Lesson
What I did
Problem
Next
2
get_number works for 5, 0 and 255
'5 ' with a space was rejected. Fixed with strip().
Join it to Ana's question function
?Why?
Why log?
Next lesson you know where to start. In lesson 5 your evaluation needs evidence, and the log is that evidence.
e.g.Worked example
Ana writes ask(binary, answer). It must use Leo's get_number, and return 1 for a right answer and 0 for a wrong one. How does it work?
Ana's function takes two parameters: the binary number to ask about, and the right answer.
It calls get_number("What is " + binary + " in denary? ") to get a valid number from the player.
If guess == answer, it prints 'Correct!' and returns 1.
If not, it prints the right answer and returns 0.
So the main program can write score = score + ask("101", 5). The score goes up by 1 for each right answer.