Component 2.1 - Problem Solving Flashcards
What is computational thinking?
Computational thinking is the process involved in taking a complex program, understand the problem and then developing possible solutions. Then representing these solutions in A way that both computers and humans can understand. (E.g. as a set of steps that can be carried out by both a computer and human)
What is decomposition?
Decomposition is breaking down a complex program into a series of smaller, more manageable sub problems (e.g. allow for adding money to card > add money on internet, add money in bank > add money at cache machine. and these can be broken up further)
What are the advantages of decomposition? (Computational thinking)
- Different people
can work on different sub problems - The sub problems are easy to understand and find solutions for unlike the whole problem so a solution can be made faster
What is abstraction?
Abstraction is a technique used to reduce something to the simplest set of
characteristics that are most relevant to solving the problem.
What are variables used for in computer programming?
In computer programming variables are required to store data that can change
What are constants used for in computer programming?
Constants are used in computer programming to store data that does not change.
What is a local variable?
A local variable is a variable that is defined within a sub procedure and therefore is only
accessible from within that same sub procedure.
What is a global variable?
A global
variable is a variable that has a larger scope as it is defined globally and is therefore
accessible from anywhere within a program.
What are the advantages of local variables over global variables?
It is easier to track changes to a local variable and the reasons for those changes than for a global variable, as it is only used within a sub-procedure.
What are the advantages of global variables over local variables?
Sometimes a global variable can be the most efficient way of ensuring that an important piece of data is accessible to all sub procedures
What are static variables?
Static variables are variables stored in a location in memory and which have a lifespan that lasts the entire time that program is running.
What are dynamic variables?
Dynamic variables are variables that each time they are defined, are assigned a new location in memory and have a lifespan that ends when the sub procedure in which it was defined ends.
What will good computational thinking skills allow a programmer to do?
Good computational thinking skills will help a programmer to break the problem down into manageable chunks to simplify the solution, and therefore write a successful program
Programmers can only write programs for computers to solve if ___
They understand how to solve and the program themselves
What are the four key techniques to computational thinking?
Decomposition, pattern recognition, abstraction, algorithms (apparently for wjec we only need to know decomposition and abstraction)
What does computational thinking enable you to do?
Computational thinking enables you to work out exactly what to tell the computer to do
How can a decomposed program be used to make a working whole program?
The solutions to the sub problems can be brought together to provide a solution to the whole problem
What is the disadvantage of decomposition? (Computational thinking)
The solutions to the sub problems may not come together to provide a solution to the whole problem/program
Why is abstraction useful?
Abstraction allows the programmer to focus on important aspects of the program rather than fine details, so they can get a working, understandable prototype done quickly.
What is pattern recognition? (Computational thinking)
Pattern recognition is looking for similarities among and within problems
What is algorithms in computational thinking?
Algorithms is developing a step-by-step solution to the problem, or the rules to follow to solve the problem. (For solving sub problems)
What are variable identifiers?
Names
What is a self-documenting identifier?
A self documenting identifier is a variable or constant name that implies/reflects what the type of data being stored in it is (e.g. txt_FirstName is a text containing a first name)
All variables should have these
What is a local variable’s scope?
A local variable’s scope is the sub procedure (area) from which it is accessible
What is the difference between a static and dynamic variable?
Static variables are stored in one location in memory but have a lifespan lasting the entire program. Whereas dynamic variables are stored in a new location in memory each time they are defined and end when the sub procedure they are defined in ends