B7, Programming Slides
B7, Programming Slides
INTRODUCTION TO PROGRAMMING, B7
PROGRAMMING TERMINOLOGIES
What is Programming ?
Is the Is a list of instructions that is executed by a computer to accomplished a particular task.
Or
Programming can also be said to be a sequence of instructions that specifies how to perform a computation of a
specific task.
Constants : Is define as values that are used within a program and do not change.
Variables : They are spaces that are reserved for data to be entered or can also be define as a value within a
program whose value can change during running of a program.
Input : it refers to information that is accepted from the user or other sources into a program.
Pseudocode : it is used to plan out the logic of a computer program, using English words or phrases.
Algorithm : is a step by step problem-solving process in which a solution is arrived at in a finite amount of
time.
Programming Languages: They are set of commands, govern by rules for creating a software.
Compilers : They translates computer code written in one programming language into another programming
PROGRAMMING DEVELOPMENT CYCLE
Such numbers takes more space in memory allocation and therefore cannot
be define as integers.
4.90
- 344.784
- 0.8888888
0.666666666
½
BOOLEAN DATA TYPES
Identifiers: They are name of things such as variable and constant that appears in a program.
The following are basic rules for naming variables: NB: the rules are different for all programming language,
but these are generally accepted:
1. Identify name consist of letters, digits, the underscore character ( _ ), and the Dollar sign( $ ) and MUST
begin with a letter, underscore or the dollar sign.
2. Identifiers can be made of only letters, digits , the underscore and the dollar sign. No other symbol is
permitted as an identifier.
EXAMPLE:
1. first, NUMBER, Conversion, NaMe…………………..
2. payRate, ComputeAverage, Firstname, Lastname………..
3. Counter1, number1, num2, f2name.
4. $Amount, _amount, _Amount, _2place,
5. first_name,
HOW TO USE CONSTANTS AND VARIABLES CONT’D
Write TotalCost.
Can you identify the variable and constant in this program?
Variable used are Songs and TotalCost
The constant is : 5.99