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

COMPROG (1)

The document provides an introduction to computers, detailing their components, functionalities, and classifications, as well as an overview of software types. It specifically covers Microsoft Excel, explaining its features, how to perform basic arithmetic operations, and best practices for using the program. Additionally, it includes a brief introduction to HTML, its structure, and a simple document example.

Uploaded by

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

COMPROG (1)

The document provides an introduction to computers, detailing their components, functionalities, and classifications, as well as an overview of software types. It specifically covers Microsoft Excel, explaining its features, how to perform basic arithmetic operations, and best practices for using the program. Additionally, it includes a brief introduction to HTML, its structure, and a simple document example.

Uploaded by

Mark Arellano
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Understanding Data, 19.

Electronic Whiteboard
Information, and Knowledge
 Note: The most common keyboard is the
QWERTY keyboard, which generally has
Chapter One Introduction to Computer 104 keys.
Computer
Central Processing Unit (CPU)
A computer is an electronic device that operates
under the control of instructions stored in its The CPU is the brain of a computer, responsible for
memory. It can: all functions and processes. It consists of three main
parts:
 Accept data (input)
 Process the data according to specified rules 1. Arithmetic Logic Unit (ALU): Executes
 Produce information (output) arithmetic and logical operations.
 Store the information for future use o Arithmetic calculations: addition,
subtraction, multiplication, division.
Functionalities of a computer o Logical operations: comparing
numbers, letters, or special
Any digital computer carries out five main characters.
functions. 2. Control Unit (CU): Controls and
coordinates computer components.
o Reads the next instruction to be
Computer Components executed.
o Increments the program counter to
Computers consist of HARDWARE and point to the next instruction.
SOFTWARE. o Reads data required from memory.
o Provides necessary data to the ALU
Hardware or register.
o Instructs hardware to perform
 Computer hardware refers to the physical requested operations.
parts of a computer system. 3. Registers: Store data that is to be executed
 Examples include: next; they are a "very fast storage area."
o Monitor
o Mouse Primary Memory
o Keyboard
o Hard drive disk (HDD) 1. RAM (Random Access Memory):
o System unit (includes graphic cards, o Temporary storage for data that can
sound cards, memory, motherboard, be quickly accessed by the processor.
and chips) o Volatile: data is erased when power
is turned off.
Input Devices o Allows random access to any
memory cell.
An input device is any peripheral that provides data 2. ROM (Read Only Memory):
and control signals to a computer. It translates data o Permanent storage that remains
from a human-readable form to a format the active regardless of power supply.
computer can work with. o Data stored cannot be modified.

Examples of Input Devices: Secondary Memory


1. Keyboard Stores data and programs permanently, retained
2. Mouse (pointing device) after power is turned off.
3. Microphone
4. Touch screen 1. Hard Drive (HD):
5. Scanner o Stores large amounts of data on an
6. Webcam
electromagnetically charged surface.
7. Touchpadsnb
2. Optical Disk:
8. MIDI keyboard
o Uses laser light to read/write data.
9. Gamepad
o Types include CDs, DVDs, and Blu-
10. Graphics Tablets
ray discs.
11. Cameras
o Storage capacities:
12. Pen Input
 CDs: up to 700 MB
13. Video Capture Hardware
 DVDs: up to 8.4 GB
14. Microphone
 Blu-ray discs: up to 50 GB
15. Trackballs
3. Flash Disk:
16. Barcode reader
o Made of flash memory chips, with
17. Digital camera
no mechanical parts.
18. Joystick
o Data accessed as if on a hard drive. 2. A software package (e.g., a
spreadsheet system)
3. A software suite (e.g., Microsoft
Output Devices Office)
4. A software system (e.g., a database
An output device communicates the results of data
management system)
processing in a human-readable form.
 Examples of application software include:
Examples of Output Devices:
o Web browsers (e.g., Opera)
o Word processors (e.g., Microsoft
1. Monitor
2. LCD Projection Panels Word)
3. Printers (all types) o Spreadsheet software (e.g., Microsoft
4. Computer Output Microfilm (COM) Excel)
5. Plotters o Database software (e.g., MySQL)
6. Speakers o Presentation software (e.g.,
7. Projector Microsoft PowerPoint)
o Graphics software (e.g., Adobe
 Basic types of monitors: Photoshop)
o Cathode Ray Tube (CRT)
o Liquid Crystal Displays (LCD) Comparison: Application
o Light-emitting diode (LED)
 Printer types: Software vs. System Software
1. Laser Printer  Interaction:
2. Ink Jet Printer o Users typically interact with
3. Dot Matrix Printer application software.
o System software operates in the
background.
Software  Dependency:
o System software can run
Software is a collection of computer data and independently.
instructions, divided into two major categories: o Application software requires system
software to function.
 System Software: Provides basic non-task-
specific functions of the computer.
 Application Software: Used by users to
accomplish specific tasks.
Unit of Measurements
Storage Measurements
Computer Software
 The basic unit of computer data storage is a
bit (binary digit).
System Software  Bits are used to represent data in binary
form (0s and 1s).
 System software acts as a bridge between  Common storage units include:
the hardware and the user.
 It allows other software and users to interact o Bit (BIT): 0 or 1
with the computer without needing to o Kilobyte (KB): 1024 bytes
understand low-level details. o Interaction:
 Examples of system software include:
 Users typically interact with
o Operating systems (e.g., Microsoft
application software.
Windows, Linux)  System software operates in
o Utilities (e.g., disk formatters, file
the background.
managers, display managers) o Dependency:
o User authentication tools
 System software can run
o Networking and device control
independently.
software  Application software requires
system software to function.
Application Software
 Application software is designed to help Unit of

users perform specific tasks.
It can be: Measurements
1. A single program (e.g., an image Storage Measurements
viewer)
o The basic unit of computer data What is Microsoft Excel?
storage is a bit (binary digit).
o Bits are used to represent data in
 Microsoft Excel is a spreadsheet program.
binary form (0s and 1s).
 It is used to record and analyze numerical
o Common storage units include:
and statistical data.
 Bit (BIT): 0 or 1
 Features include:
 Kilobyte (KB): 1024 bytes
o Calculations
 1 Hz: 1 cycle per second
o Pivot tables
o 1 MHz: 1 million cycles per second
o Graph tools
(1000 Hz)
o Macro programming
o 1 GHz: 1 billion cycles per second
 Compatible with multiple operating systems:
(1000 MHz)
Windows, macOS, Android, and iOS.
 An Excel spreadsheet consists of:
Computers o Columns (labeled with letters)
o Rows (labeled with numbers)
Classification o Cells (intersection of a column and a
row, identified by their address, e.g.,
A1)
 Computers can be classified by size and
power:
o Personal Computer: A small, Why Should I Learn Microsoft
single-user computer.
o Workstation: A powerful, single-
Excel?
user computer with enhanced
 Useful for managing personal finances
capabilities.
(income vs. expenditure).
o Minicomputer: A multi-user
 Helps in recording, analyzing, and storing
computer supporting 10 to hundreds
numeric data.
of users.
o Mainframe: A powerful multi-user
computer for hundreds or thousands Where can I get Microsoft
of users.
o Supercomputer: Extremely fast,
Excel?
performing hundreds of millions of
 Purchase from a hardware computer shop or
instructions per second.
software retailer.
 Part of the Microsoft Office suite.
Laptop and Smartphone  Download from the Microsoft website
(requires a license key).
Computers
 Laptop: A portable personal computer that Topics Covered in This Tutorial
can run the same software as a desktop.
 Netbook: A smaller, cheaper laptop  How to Open Microsoft Excel
designed for portability, mainly for internet  Understanding the Ribbon
access.  Understanding the Worksheet
 Mobile Device: Handheld computers like  Customization of the Microsoft Excel
tablets and smartphones, designed for Environment
portability.  Important Excel Shortcuts

Tablet Computers How to Open Microsoft Excel?


 Tablets are portable and use a touch-  For Windows with GUI (e.g., Windows XP,
sensitive screen instead of a keyboard or Vista, 7):
touchpad. 1. Click on the Start menu.
2. Point to All Programs.
Microsoft Excel 3. Point to Microsoft Excel.
4. Click on Microsoft Excel.
Basics and Features  For Windows 8.1:
1. Click on the Start menu.
2. Search for Excel (results will appear
Introduction to as you type).
3. Click on Microsoft Excel.
Microsoft Excel 101:
Understanding the Ribbon
Notes About MS Excel
 The ribbon provides shortcuts to commands
in Excel.
 A command is an action performed by the
user (e.g., creating a new document). Excel Arithmetic
 Ribbon Components:
o Ribbon Start Button: Access Operations Tutorial
commands like creating new
documents, saving, printing, etc.
o Ribbon Tabs: Group similar
commands (e.g., Home tab for basic
How to Do Addition,
formatting).
o Ribbon Bar: Groups similar
Subtraction,
commands (e.g., Alignment ribbon Multiplication &
bar for aligning data).
Division in Excel
Understanding the Worksheet
(Rows and Columns, Sheets, How To Perform Arithmetic
Workbooks) Operations in Excel
 A worksheet is made up of rows and In this tutorial, we are going to perform basic
columns. arithmetic operations: addition, subtraction,
 Cells are used to record data and are division, and multiplication. The following table
identified by cell addresses. shows the data that we will work with and the
 A workbook is a collection of worksheets results that we should expect.
(default has three sheets).
 Sheets can be renamed to meaningful names S/NARITHMETIC OPERATORFIRST
(e.g., Daily Expenses, Monthly Budget). NUMBERSECOND NUMBER1Addition
(+)1332Subtraction (-)2193Division
(/)33124Multiplication (*)73
Important Excel Shortcuts
Let’s now use Microsoft Excel to achieve the above
1. Ctrl + P: Open print dialogue window. results.
2. Ctrl + N: Create a new workbook.
3. Ctrl + S: Save the current workbook.
4. Ctrl + C: Copy contents of the current Step 1) Create an Excel Sheet
selection. and Enter the Data
5. Ctrl + V: Paste data from the clipboard.
6. SHIFT + F3: Display the function insert  Create a folder on your computer in the My
dialog window. Documents folder and name it "Guru99
7. SHIFT + F11: Create a new worksheet. Excel Tutorials".
8. F2: Check formula and cell range covered.  For this tutorial, we will be using Microsoft
Excel 2013. The good news is that even if
Best Practices when working you have Microsoft Excel 2007 or 2010, you
will still be able to follow the tutorial and
with Microsoft Excel get the same result.
 Open Excel. You will get a window similar
1. Save workbooks with backward to the one shown below. The outlook of
compatibility in mind (use 2003 *.xls format Excel will depend on your version.
if not using latest features).  Enter the data in your worksheet as shown in
2. Use descriptive names for columns and the image above.
worksheets.  We will now perform the calculations using
3. Avoid complex formulas with many the respective arithmetic operators.
variables; break them down into manageable
parts. Important Note:
4. Use built-in functions instead of writing
your own formulas.
When performing calculations in Excel, you should
always start with the equal (=) sign.
Summary
 Let’s start with the one for addition. Write
 Introduction of MS Excel: A powerful the following formula in cell E2 (Result
spreadsheet program for recording, column):
manipulating, and storing numeric data, o =C2+D2
customizable to user preferences.
 The Ribbon: Used to access various Here:
commands in Excel.
o “=” tells Excel to evaluate whatever
follows after the equal sign.
o “C2” is the cell address of the first  The quick and easy way of doing it is by
number (C represents the column using the following shortcut commands:
letter and 2 represents the row o Ctrl + P
number).  You will get the following print preview.
o “D2” is the cell address of the Press the Esc button to exit print preview
second number (D represents the mode.
column letter and 2 represents the  The page setup ribbon bar has a number of
row number). options, i.e., orientation, size, etc. Try to
 Press the enter key on the keyboard when apply the different settings and use $Ctrl +
done. You should get 16 as the result. P$ shortcut to preview the effects on the
worksheet.
Using the knowledge gained in the above example,
try to write the formulas for subtraction, division,
and multiplication.
Summary
In this article, we have learned how to perform
Step 2) Format Data in basic arithmetic operations using Excel, formatting
data, how to set the print area, and printing (Print
Microsoft Excel View).
We all love beautiful things, don’t we? Formatting
in Excel helps us achieve exactly that. We can make
our spreadsheets more presentable. We will use the
HTML
data in the arithmetic operations table. We will
make the column names:
INTRODUCTION
 Bold What is HTML?
 Align serial numbers to the left
 Enclose the data in boxes.  HTML stands for Hyper Text Markup
Language.
HTML is the standard markup language for
Step 3) Make Column Names 
creating Web pages.
Bold  HTML describes the structure of a Web
page.
 Highlight the cells that have the column  HTML consists of a series of elements.
names by dragging them.  HTML elements tell the browser how to
 Click on the bold button represented by the display the content.
B command.  HTML elements label pieces of content such
 Your workbook should now appear as as "this is a heading", "this is a paragraph",
follows. "this is a link", etc.

Step 4) Align Data to the Left A Simple HTML Document


Example
 We will align the serial numbers to the left.
 Highlight all the data in the S/N column. <!DOCTYPE html>
 Click on align left as shown below. <html>
<head>
<title>Page Title</title>
Step 5) Enclose Data in Boxes </head>
<body>
 Highlight all the columns and rows with <h1>My First Heading</h1>
<p>My first paragraph.</p>
data. </body>
 On the font ribbon bar, click on the borders </html>
command as shown below.
 You will get the following drop-down menu. Example Explained
 Select the option “All Borders”. Your data
should now look as follows.  The <!DOCTYPE html> declaration defines
that this document is an HTML5 document.
Using the knowledge gained above, try to change  The <html> element is the root element of
the font color and try out other options available on an HTML page.
the Home tab.  The <head> element contains meta
information about the HTML page.
Step 6) Set the Print Area, Print  The <title> element specifies a title for the
HTML page (which is shown in the
Preview & Page Layout browser's title bar or in the page's tab).
 The <body> element defines the document's
 The print area is the part of the worksheet body and is a container for all the visible
that you would like to print out on paper.
contents, such as headings, paragraphs, 3. 1993: Dave Raggett drafted HTML+.
images, hyperlinks, tables, lists, etc. 4. 1995: HTML Working Group defined
 The <h1> element defines a large heading. HTML 2.0.
 The <p> element defines a paragraph. 5. 1997: W3C Recommendation: HTML 3.2.
6. 1999: W3C Recommendation: HTML 4.01.
What is an HTML Element? 7. 2000: W3C Recommendation: XHTML 1.0.
8. 2008: WHATWG HTML5 First Public
Draft.
An HTML element is defined by a start tag, some
9. 2012: WHATWG HTML5 Living Standard.
content, and an end tag:
10. 2014: W3C Recommendation: HTML5.
<tagname> Content goes here... </tagname> 11. 2016: W3C Candidate Recommendation:
HTML 5.1.
The HTML element is everything from the start tag 12. 2017: W3C Recommendation: HTML5.1
to the end tag: 2nd Edition.
13. 2017: W3C Recommendation: HTML5.2.
<h1>My First Heading</h1>
<p>My first paragraph.</p>
HTML Editors
 Note: Some HTML elements have no
content (like the <br> element). These
elements are called empty elements. Empty
A simple text editor
elements do not have an end tag!
 A simple text editor is all you need to learn
HTML.
Web Browsers  Recommended editors:
o Notepad (PC)
The purpose of a web browser (Chrome, Edge, o TextEdit (Mac)
Firefox, Safari) is to read HTML documents and
display them correctly. A browser does not display Using a simple text editor is a good way to learn
the HTML tags but uses them to determine how to HTML.
display the document:

 Start tag
Steps to create your first web
 Element content page
 End tag
Step 1: Open Notepad (PC)
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<br> none none  Windows 8 or later:
o Open the Start Screen (the window
symbol at the bottom left on your
HTML Page Structure screen).
o Type Notepad.
Below is a visualization of an HTML page  Windows 7 or earlier:
structure: o Open Start > Programs >
Accessories > Notepad.
<html>
<head>
<title>Page title</title> Step 1: Open TextEdit (Mac)
</head>
<body>  Open Finder > Applications > TextEdit.
<h1>This is a heading</h1>
<p>This is a paragraph.</p>  Change some preferences to save files
<p>This is another paragraph.</p> correctly:
</body> o In Preferences > Format, choose
</html> "Plain Text".
o Under "Open and Save", check the
 Note: The content inside the <body> section box that says "Display HTML files
(the white area above) will be displayed in a as HTML code instead of formatted
browser. The content inside the <title> text".
element will be shown in the browser's title  Open a new document to place the code.
bar or in the page's tab.
Step 2: Write Some HTML
HTML History
 Write or copy the following HTML code
Since the early days of the World Wide Web, there into Notepad:
have been many versions of HTML:  <!DOCTYPE html>
 <html>
 <body>
1. 1989: Tim Berners-Lee invented www.  <h1>My First Heading</h1>
2. 1991: Tim Berners-Lee invented HTML.  <p>My first paragraph.</p>
 </body> o <h1> defines the most important
 </html>
heading.
o <h6> defines the least important
Step 3: Save the HTML Page heading.

 Save the file on your computer: Example


o Select File > Save as in the Notepad
menu. <h1>This is heading 1</h1>
o Name the file "index.htm" and set <h2>This is heading 2</h2>
the encoding to UTF-8 (the preferred <h3>This is heading 3</h3>
encoding for HTML files).
 Tip: You can use either .htm or .html as the HTML Paragraphs
file extension. There is no difference; it is up
to you.  HTML paragraphs are defined with the <p>
tag.
Step 4: View the HTML Page in Your
Browser Example
 Open the saved HTML file in your favorite <p>This is a paragraph.</p>
browser: <p>This is another paragraph.</p>
o Double click on the file, or right-
click and choose "Open with". HTML Links
HTML Document  HTML links are defined with the <a> tag.

Structure and Elements Example


<a href="https://www.w3schools.com">This
HTML Basics is a link</a>

 The link's destination is specified in the href


HTML Documents attribute.
 Attributes are used to provide additional
 All HTML documents must start with a information about HTML elements. You
document type declaration: <!DOCTYPE will learn more about attributes in a later
html>. chapter.
 The HTML document itself begins with
<html> and ends with </html>.
 The visible part of the HTML document is
HTML Images
between <body> and </body>.
 HTML images are defined with the <img>
tag.
Example  The source file (src), alternative text (alt),
<!DOCTYPE html> width, and height are provided as attributes.
<html>
<body> Example
<h1>My First Heading</h1>
<p>My first paragraph.</p> <img src="w3schools.jpg"
</body> alt="W3Schools.com" width="104"
</html> height="142">

The <!DOCTYPE> Declaration How to View HTML Source


 The <!DOCTYPE> declaration represents  Have you ever seen a Web page and
the document type and helps browsers to wondered "Hey! How did they do that?"
display web pages correctly. o View HTML Source Code: Right-
 It must only appear once, at the top of the click in an HTML page and select
page (before any HTML tags). "View Page Source" (in Chrome) or
 The <!DOCTYPE> declaration is not case "View Source" (in Edge), or similar
sensitive. in other browsers. This will open a
 The <!DOCTYPE> declaration for HTML5 window containing the HTML
is: <!DOCTYPE html>. source code of the page.
o Inspect an HTML Element: Right-
HTML Headings click on an element (or a blank area),
and choose "Inspect" or "Inspect
 HTML headings are defined with the <h1> Element" to see what elements are
to <h6> tags. made up of (you will see both the
HTML and the CSS). You can also  Internal CSS defines a style for a single
edit the HTML or CSS on-the-fly in HTML page, placed in the <head> section
the Elements or Styles panel that within a <style> element.
opens.  Example:
 <!DOCTYPE html>
 <html>
Introduction to 

<head>
<style>
 body {background-color: powderblue;}
Cascading Style 

h1 {color: blue;}
p {color: red;}

Sheets
</style>
 </head>
 <body>
 <h1>This is a heading</h1>
What is CSS? 

<p>This is a paragraph.</p>
</body>
 </html>
Overview
External CSS
 Cascading Style Sheets (CSS) is used to
format the layout of a webpage.  External style sheets define styles for
 CSS allows control over: multiple HTML pages.
o Color  To use an external style sheet, add a link in
o Font the <head> section of each HTML page.
o Size of text  Example:
o Spacing between elements  <!DOCTYPE html>
 <html>
o Positioning and layout of elements
 <head>
o Background images or colors  <link rel="stylesheet"
o Different displays for various href="styles.css">
devices and screen sizes  </head>
 <body>
 <h1>This is a heading</h1>
Important Note  <p>This is a paragraph.</p>
 </body>
 The term "cascading" means that a style  </html>
applied to a parent element will also apply to
all child elements within that parent.  The external CSS file must be saved with
o Example: If the body text color is set a .css extension and contain no HTML code.
to "blue", all headings and  Example of "styles.css":
 body { background-color: powderblue;
paragraphs will also be blue unless }
specified otherwise.  h1 { color: blue; }
 p { color: red; }
Using CSS
Tip
CSS can be added to HTML documents in 3 ways:
 With an external style sheet, you can change
1. Inline - using the style attribute inside the look of an entire website by modifying
HTML elements just one file!
2. Internal - using a <style> element in the
<head> section CSS Colors, Fonts, and Sizes
3. External - using a <link> element to link to
an external CSS file  Commonly used CSS properties include:
o color: Defines the text color.
 The most common method is to use external o font-family: Defines the font to be
CSS files, but inline and internal styles are used.
easier for demonstration. o font-size: Defines the text size.
 Example:
Inline CSS 

<!DOCTYPE html>
<html>
 <head>
 Inline CSS applies a unique style to a single  <style>
HTML element using the style attribute.  h1 { color: blue; font-family:
 Example: verdana; font-size: 300%; }
 <h1 style="color:blue;">A Blue  p { color: red; font-family:
Heading</h1> courier; font-size: 160%; }
 <p style="color:red;">A red  </style>
paragraph.</p>  </head>
 <body>
 <h1>This is a heading</h1>
Internal CSS  <p>This is a paragraph.</p>
 </body>
 </html> PROGRAM
CSS Border DEVELOPMENT LIFE
 The CSS border property defines a border CYCLE
around an HTML element.


Example:
p { border: 2px solid powderblue; }
Overview
 The process of developing a program is
CSS Padding called program development.
 The Program Development Life Cycle
 The CSS padding property defines space (PDLC) consists of five steps to create
between the text and the border. successful application programs.
 Example:
 p { border: 2px solid powderblue;
padding: 30px; } 1. Analysis
 The first step in PDLC is analysis.
CSS Margin  This involves reviewing program
specifications to eliminate ambiguities in the
 The CSS margin property defines space problem statement.
outside the border.  Key components to identify:
 Example: o Program Objectives: Problems to
 p { border: 2px solid powderblue;
margin: 50px; } solve.
o Output: What will be produced.
o Input: Data needed.
Link to External CSS o Process: Steps to produce the output.

 External style sheets can be referenced with Example 1


a full URL or a relative path.
 Example of full URL:  Problem: Calculate the BMI for a user.
 <link rel="stylesheet"
href="https://www.w3schools.com/html  Objectives: Calculate BMI for a user.
/styles.css">  Output: bmi.
 Input: Weight, height (in meters).
 Example of relative path in the html folder:  Process:
 <link rel="stylesheet" o Declare variables: double\ bmi,\
href="/html/styles.css"> weight,\ height.
o Calculate: bmi = \frac{weight}
 Example of linking to a style sheet in the {pow(height, 2)}.
same folder:
 <link rel="stylesheet"
href="styles.css"> 2. Design
Chapter Summary  In the design step, a programmer develops a
series of logical steps to produce the output.
 Use the HTML style attribute for inline  Good design ensures smooth development
styling. and easier future revisions.
 Use the HTML <style> element to define  Solutions are created using structured
internal CSS. programming techniques, known as
 Use the HTML <link> element to refer to an algorithms.
external CSS file.
 Use the HTML <head> element to store Algorithm Requirements
<style> and <link> elements.
 Use the CSS color property for text colors. 1. Unambiguousness: Clear and easy to
 Use the CSS font-family property for text understand.
fonts. 2. Generality: Use simple English, avoid
 Use the CSS font-size property for text programming language.
sizes. 3. Correctness: Must produce an effective
 Use the CSS border property for borders. program.
 Use the CSS padding property for space 4. Finiteness: Must have a clear end.
inside the border.
 Use the CSS margin property for space Control Structures
outside the border.
 Control structures manage the flow of a
program:
1. Sequence: Statements executed in  A graphic representation of the logical
order. sequence of steps to solve programming
2. Selection (decision): Next statement problems.
based on a condition.  Uses geometric symbols to represent actions
3. Iteration (looping): Repetition of (start/stop, decision, input/output,
statements. processing, looping).
 Keywords are in uppercase; variable names
Keywords for Control Structures are in lowercase.

 Sequence: Use keywords like compute, set, Flowchart Symbols


or initialize.
 Selection: Use keywords like if-else or  Different symbols represent different actions
switch. in a flowchart.
 Iteration: Use keywords like for, while, or
do-while. 3. Implementation/Coding
Pseudocode The pseudocode and flowchart are used to guide the
coding process.
 A semiformal, English-like language used to
design algorithms.
 Each statement should be clear and written Program Development
on a separate line.
Life Cycle (PDLC)
Examples of Pseudocode

1. Example 1: Calculate BMI Design and Implementation


2. BEGIN
3. DECLARE double bmi, weight,  The design step is converted into a program
height using programming languages like:
4. READ weight, height
5. CALCULATE bmi = weight / o BASIC
pow(height, 2) o JAVA
6. DISPLAY bmi o C
7. END o C++
 This is where coding takes place, solving the
8. Example 2: Find area of a circle problem by allowing users to write
9. BEGIN
10. DECLARE double radius, area; programs.
11. const double PI = 3.142  Only individuals with a programming
12. READ radius background can write and understand the
13. CALCULATE area = PI * code.
pow(radius, 2)
 Coding is the process of creating a program
14. DISPLAY area
15. END in a programming language.
 The coded program is known as source
16. Example 3: Identify positive or negative code.
number  Source code must adhere to specific rules
17. BEGIN called syntax.
18. DECLARE int num  The source code is saved with the extension
19. GET num .cpp.
20. if (num > 0)
21. DISPLAY "positive number"
 To execute the program, it is converted into
22. else object code using a translator like:
23. DISPLAY "negative number" o Compiler
24. END o Interpreter

25. Example 4: Sum and average of three


numbers Testing/Debugging
26. BEGIN
27. DECLARE int no, sum, count;  the program is entered into the computer
28. double avg; system.
29. INITIALIZE sum = 0, count = 0
30. while (count < 3)
 Programmers must check and correct errors
31. GET no; during this step.
32. CALCULATE sum = sum + no;  If errors exist, the output will not display.
33. CALCULATE count++;  To run the program successfully, all errors
34. COMPUTE avg = sum / count must be identified and corrected.
35. PRINT sum, avg
36. END
Maintenance
Flowchart
 Maintenance is the final step in the PDLC.
 Every program requires ongoing
maintenance to last long.
 This step involves:
o Updating software for changes
o Making corrections
o Adding features
o Moving to different computing
platforms
 Maintenance can be costly but is essential
for extending a program's life.

You might also like