Professional Documents
Culture Documents
Introduction to
Programming
What is Programming?
Computer
programming or
programmingis the craft of writing useful,
maintainable, and extensible source code
which can be interpreted or compiled by a
computing system to perform a meaningful
task.
It is also a method of solving a problem.
Programming uses algorithms.
true or false
Looping: cycling through a set of
instructions until condition is met
Subroutines or Functions: usually
performs a single task.
languageis a special
languageprogrammersuse to develop
software programs,scripts, or other sets
of instructions for computers to execute.
Reference:
http://www.computerhope.com/jargon/p/p
roglang.htm
Language
Assembly Language
High Level Language
Machine Language
Machine
Assembly Language
Sometimes
referred to
as assembly or ASL,assembly language is
a low-level programming language used to
interface with computer hardware.
Algorithm
Algorithm
Derived
Pseudocode
Problem:
Get the following data from the user: employees
name, hourly rate, number of hours worked, and
deductions. Calculate the employees gross pay and
net pay. Display the employees name, gross pay,
and net pay
Pseudocode:
READ name, hourly rate, hours worked, deductions
CALCULATE: Gross pay-hourly rate multiplied by
number of hours worked
CALCULATE: Net pay=Gross pay minus deductions
WRITE name, Gross pay, Net pay
Flowchart
Start
Input
Name, HrlyRate,
HrsWork, Deductn
GrossPay= HrlyRate * HrsWork
Flowchart Symbols
Symbol
Name
Description
Terminal
Preparation
Input/Output
(I/O)
Process
Decision
Flowchart Symbols
Symbol
Name
Description
Secondary
Storage
Predefined
Process
On-page
connector
Off-page
connector
Flowlines and
Arrowheads
in a Programming Language
Carry out the plan checking the preliminary
results at each step.
Code A Little Test A lot
the Code
Check results repeatedly and thoroughly
Use numerous test cases or data sets
Use highly varied test case, including expected as
well as and unexpected cases
Look
Can
Summary
U
Steps in programming
1. Problem Analysis is defined by the
development
Top-down design
Steps in programming
1. Program Coding the logic requirements
development
Steps in programming
1. Program Documentation and Maintenance
development
Documentation is the set of instructions
shipped with a program or piece of hardware.
Documentation usually includes necessary
instructions on the use and maintenance of
the product.
Syntax
Syntax