Professional Documents
Culture Documents
Fop XP 06
Fop XP 06
Algorithms
Pre-assessment Questions
Answer 1: True
Answer 2: The value of a variable is stored in the computer’s internal memory, RAM.
Answer 3: When you declare a variable, a defined memory location is allocated to the
variable. The declaration of a variable assigns a name to the
variable and specifies the type of data stored by the variable.
Answer 5: The order of precedence can be changed using the parenthesis “()” operator.
Objectives
Introducing Input
• Input is the data that is provided to a computer for processing and generating the
output.
• To receive accurate results from a process, you need to provide the correct input.
Representing Input
Introducing Output
• A computer requires input to generate the output.
• After accepting the input, the computer processes it and displays the result. This
result is called the output.
Representing Output
• There are different ways of representing the output in an algorithm. Some
examples specifying the representation of output are given below:
• In a flowchart, output is represented using the display symbol.
• In pseudocode, the output is represented using a keyword, display.
Documenting an Algorithm
• Documentation is the process of maintaining a record of all the algorithms that are
created during problem solving.
Comments in an Algorithm
• Comments are used in an algorithm as a reference to explain the logic of the
algorithm.
Standards of Documentation
• Certain documentation standards should be strictly followed with details to ensure
consistency in the documentation process.
Advantages of Documentation
Standards
• Documentation standards are important for completing the documentation process
successfully due to the following reasons:
• They help to determine whether or not all the requirements have been met.
• They ensure that the same format and style is followed throughout a
document.
Summary
In this lesson, you learned:
Summary (Contd.)
• Output can be represented in different ways:
• In pseudocode, the output is represented using the keyword, display.
• In a flowchart, the output is represented using the display symbol.
• Some of the output devices of a computer are a printer, a VDU, and a speaker.
• The dry run helps you to evaluate the output of a program with a set of sample
values.
• Documentation is the process of maintaining a record of all the algorithms created
during the process of problem solving.
• Comments should be used to explain the logic of each block in an algorithm.
Comments are not translated by a processor but are only used for reference.
• Certain documentation standards should be strictly followed with details to ensure
consistency in the documentation process.