Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Revision flashcards

Section 2 – Problem-solving and Program Design

Problem-solving Stage 1 Problem-solving Stage 2


The stages of general problem-solving are: The stages of problem-solving using computers
 Define the problem are:

 Analyse the problem  Define the problem

 Suggest possible solutions  Analyse the problem

 Evaluate and choose the best solution  Suggest possible solutions and choose the

 Implement and review best solution


 Create algorithm
 Test and validate the algorithm
 Implement the algorithm in a programming
language to become a program
 Run the program
 Document and maintain the program

Problem-solving Stage 3 Variables, Constants, Literals and Data


 Analysing the problem involves breaking Types
down the problem into inputs, processing,  Variables are identifiers of storage
storage needed and outputs. locations in memory that can store any
 An IPO diagram can be used to break down value.
the problem  Constants are fixed values.
 Literals are constants that are written
literally in a program
 Data types determine the type of data a
variable can store
 The data types are: integers, floating
point, characters and string.

1
© Owned by or under licence to Pearson Education Limited 2009 1
Algorithms Ways to Represent Algorithms 1
 Step-by-step definition of a task or problem  Narrative – instructions are written in plain
 The characteristics of algorithms are: English.
precise, unambiguous, finite steps,  Pseudocode – instructions resemble
terminate. programming language instructions
 The ways to represent algorithms are:  Flowchart – diagrammatic representation
narrative, pseudocode and flowchart of algorithms using special symbols

Ways to Represent Algorithms 2 Program Constructs or Control Structures


Words/phrases used in pseudocode:  Three types – sequencing, selection and
 for accepting data use read and input iteration.

 for storage use store and   Sequencing is putting instructions in the

 for output use write, output, display order it should take place

Symbols used in flowcharts:  Selection is making a choice between two


or more options by using the decision
 Oval – input/output or terminal symbol
making capabilities of computer
 Rectangle – processing
 Selection statements used in pseudocode
 Rhombus or diamond – decision
are if-then, if-then-else
 Arrows – flow of control
 Repetition or iteration is used to repeat a
 Small circles – connectors for sections of
certain process a number of times
flowchart
 Iteration or loop statements used in
pseudocode are for-endfor and while-
endwhile.

2
© Owned by or under licence to Pearson Education Limited 2009 2

You might also like