Problem Solving5
Problem Solving5
syllabus
2022-23
Chapter 5
Problem Solving
When designing an algorithm there are two main areas to look at:
• the big picture - What is the final goal?
• the individual stages – What hurdles need to be overcome on
the way to the goal?
4. Decision
A diamond represents a decision or branching point. Lines
coming out from the diamond indicates different possible
situations, leading to different sub-processes.
5. Data
It represents information entering or leaving the system. An input
might be an order from a customer. An output can be a product to
be delivered.
6. Flow
Lines represent flow of the sequence and direction of a process.
Representation of
algorithm using
flowchart
E.g. Flowchart for
addition
of two numbers
Representation of
algorithm using
flowchart
Example- Flowchart for
finding largest of two
numbers
Pseudo-code
Pseudocode is not a programming language, it is a simple
way of describing a set of instructions that does not have
to use specific syntax.
There is no strict set of standard notations for pseudocode, but some
of the most widely recognised are:
INPUT/READ – indicates a user will be inputting something
OUTPUT/WRITE – indicates that an output will appear on the screen
WHILE – a loop (iteration that has a condition at the beginning)
FOR – a counting loop (iteration)
REPEAT – UNTIL – a loop (iteration) that has a condition at the end
IF – THEN – ELSE – a decision (selection) in which a choice is made
any instructions that occur inside a selection or iteration are usually
indented
Coding :
coding is basically implementing
logic/algorithm/pseudocode (derived from
requirement analysis/problem definition)
in one of the preferred programming
language(C,C++ Java, Javascript, python
etc) as per the protocols/rules/syntactic
grammar of the choosen language by
following the design decisions.
Testing :
Software Testing is a method to check whether
the actual software product matches expected
requirements and to ensure that software
product is Defect free.
Testing is Important because if there are any bugs
or errors in the software, it can be identified early
and can be solved before delivery of the software
product. Properly tested software product
ensures reliability, security and high
performance which further results in time saving,
cost effectiveness and customer satisfaction
Visit : python.mykvs.in for regular updates
Problem Solving