Save
Computer science OCR A Level
2.1.4 Thinking Logically
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Aanya Sinha
Visit profile
Cards (6)
Decision
A result reached
after
some consideration
Decision making in problem solving
Many
decisions
have to be made when solving problems and designing programs
Examples include choosing the programming paradigm used and deciding how different information is collected from the user
To simplify the decision making process, we limit the
solutions
we can pick from
When deciding on a programming
language
, you should consider what is suited to the task and your understanding of the
language
Identifying where
decisions
need to be made early allows us to gather enough information about our
options
Flow chart
A decision is shown by a
diamond
shaped icon. It can have
two
results, yes or no (true/false)
Conditions that affect the outcome of a decision
What is most
effective
?
What is most
convenient
?
Is this option
reasonable
?
Evaluating conditions
To make an
appropriate
decision, you need to evaluate these
conditions
It is also helpful to order them from most important to
least
important
Decisions affecting the flow of a program
Decisions are made to determine how
different
parts of the program are completed
Examples:
designing
a simple runner game to be endless or level-based
These decisions produce
different
routes through the program
It is also important to identify where
decisions
need to be made within the program, and
plan
out the outcomes of the decision made