0% found this document useful (0 votes)
12 views

Algorithm

Pseudocode is a way of planning the structure and function of a program in a clear and precise way without a defined syntax. There is no single pseudocode language that is universally used. Pseudocode can differ depending on an individual's purpose and experience. It is used when planning or designing algorithms and is language independent so anyone should be able to understand it. Pseudocode contains command words, assignment symbols, and mathematical symbols.

Uploaded by

vashishth sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Algorithm

Pseudocode is a way of planning the structure and function of a program in a clear and precise way without a defined syntax. There is no single pseudocode language that is universally used. Pseudocode can differ depending on an individual's purpose and experience. It is used when planning or designing algorithms and is language independent so anyone should be able to understand it. Pseudocode contains command words, assignment symbols, and mathematical symbols.

Uploaded by

vashishth sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Display the word ‘pseudocode’ and define it as:

a way of planning the structure and function of a program in a short, clear and
precise way.

It is also important to emphasise that there is no defined pseudocode that everyone uses.
The pseudocode that is written and used will differ depending upon an individual’s purpose
and experience.

Example- INPUT value1


INPUT value2
OUTPUT value1 + value2

value1 = INPUT
value2 = INPUT
result = value1 + value2
print(result)

value1 ← ReadLineFromUser
value2 ← ReadLineFromUser
Printout value1 + value2
 What is pseudocode?
Answer: A form of representing an algorithm without a set syntax.
 When is pseudocode used?
Answer: When planning or designing algorithms.
 Why is pseudocode used?
Answer: It is language independent so anyone should be able to understand it.
 What features does pseudocode contain?
Answer: Command words, assignment symbols, mathematical symbols.

What is selection?
Elicit that selection is an instruction within an algorithm where a decision is made about
whether to run a piece of code or not. Then ask:
How is selection usually written in programming?
Elicit that it is usually written as a question, or a comparison, that results in ‘true’ or ‘false’.

Ask:
What are the key words used in conditional statements in programming?
Answer: IF, THEN, ELSE
What are the different symbols that can be used for comparisons?
Answer: >, <, >=, <=, <> =

IF statement-
if condition:
Code to run if true
else:
Code to run if false

What is the format of a pseudocode conditional statement?


Answer: IF THEN ELSE, or if condition: else:
What are the three component parts of a conditional statement?
Answer: the condition; the code to run if true; the code to run if not true

What is decomposition?
Answer: Splitting a problem into smaller problems.
How does decomposition help you solve a problem?
Answer: Smaller problems are easier to solve and then join together.
How does decomposition help a team build a program?
Answer: Tasks can be split between individual team members.

What is a searching algorithm?


Answer: a series of steps that looks for specific data in a set of data
Why are searching algorithms needed?
Answer: to find data within a set of data
Give an example of a searching algorithm.
Answer: a linear search
How does a linear search work?
Answer: each item is checked in turn, starting with the first

You might also like