Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

COMPUTER

PROGRAMMING
(Introductory)
RHEA MAE L. PERITO, MSIS
SUBJECT INSTRUCTOR
Objectives
Know about programming languages and their
categories
Understand the program development life cycle and
apply it in problem solving
Software/Programs
the program that a computer uses in order to function
it is intangible
acts like instructions for the processor
Some types
System Programs
Application Programs
Compilers
System Programs
are needed to keep all the hardware and software
systems running together smoothly
Ex.
Operating Systems
Application Programs
people use to get their work done
Ex.
• Word Processor
• Game programs
• Spreadsheets
Compilers
translates
and converts a language which we
understand into machine language
Programming Language
is a standardized communication technique for
expressing instructions to a computer
it has its own syntax and grammar
enable a programmer to precisely specify what data
a computer will act upon, how these data will be
stored/transmitted, and precisely what actions to take
under various circumstances
Categories of Programming
Languages
High-levelProgramming Languages
Low-level Assembly Language
High-level Programming
Language
is a programming language that is more user-
friendly, to some extent platform-independent, and
abstract from low-level computer processor
operations such as memory accesses
Low-level Assembly Language

are similar to machine languages, but they are much


easier to program in because they allow a
programmer to substitute names for numbers
Top 10 Programming
Languages (2019)
 JavaScript  C#

 Python  Ruby

 Java  Objective –C
 C/CPP  SQL

 PHP
 Swift

Excerpted from www.geeksforgeeks.org


Program Development Cycle
(Basic Steps in Solving a Problem)

1. Problem definition
2. Problem Analysis
3. Algorithm design and representation (Pseudocode
or flowchart)
4. Coding and debugging
Problem Definition
A programmer is usually given a task in the form of
a problem.
The problem must be well and clearly defined first in
terms of its input and output requirements.
Ex.
“Create a program that will determine the number of
times a name occurs in a list.”
Problem Analysis
The simplest and yet the most efficient and effective
approach to solve the problem must be formulated.
breaking up the problem into smaller and simpler
subproblems
Problem Analysis
Example Problem:
Determine the number of times a name occurs in a list
Input to the program:
list of names, name to look for
Output of the program:
the number of times the name occurs in a list
Algorithm Design and
Representation
Algorithm - is a clear and unambiguous specification of
the steps needed to solve a problem.
- may be expressed in either Human
language (English, Tagalog), through a
graphical representation like a flowchart
or through a pseudocode, which is a cross
between human language and a
programming language.
Expressing our solution through Human language:

1. Get the list of names


2. Get the name to look for, let's call this the keyname
3. Compare the keyname to each of the names in the list
4. If the keyname is the same with a name in the list, add 1 to the
count
5. If all the names have been compared, output the result
Expressing our solution through a flowchart

Figure 1.1: Example of a flow chart


Flowcharting Symbols and their
meanings
Figure 1.2: Example of a flow chart
Expressing our solution through pseucode

Figure 1.3: Example of a pseudocode


Coding and Debugging
Coding
 Using the algorithm as basis, the source code can now be written
using the chosen programming language.
Debugging
 The process of adding some fixes to the program in case of
errors (also called bugs) that occurs in the program.
Two Type of Errors
1. Compile-time error
occur if there is a syntax error in the code. The compiler will
detect the error and the program won't even compile.
2. Runtime error
An error that occurs during the execution of a program.

You might also like