Determining correct output (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
What is determining correct output?
What is determining correct output?
Figuring out what algorithm/program produces when it runs
What is a dry run?
What is a dry run?
Working through algorithm step-by-step by hand without computer
Why called 'dry' run?
Why called 'dry' run?
Not actually running program - doing it by hand
Main purposes of dry runs
Main purposes of dry runs
Understand algorithms, spot errors, essential for exams
What is a trace table?
What is a trace table?
Structured record of variable values changing during execution
What do trace table columns represent?
What do trace table columns represent?
Different variables or pieces of data
What do trace table rows represent?
What do trace table rows represent?
Steps in the algorithm's execution
First step when creating a trace table
First step when creating a trace table
Set up columns for each variable in algorithm
What does linear search do?
What does linear search do?
Searches through list to find specific target value
Purpose of 'found' variable in linear search
Purpose of 'found' variable in linear search
Boolean tracking whether target found (starts False)
Purpose of 'ndx' variable in linear search
Purpose of 'ndx' variable in linear search
Index position currently being checked (starts at 0)
Key exam tip for trace tables
Key exam tip for trace tables
Read through entire algorithm before starting trace table
