Nairobi school presentation. Principles of programming. Introduction. Computer programming is the process of writing Debugging maintaining the source code of computer programs .
Computer programming is the process of
As the inventor of Boolean logic—the basis of modern digital computer logic
Converts source code written in some high-level language into executable machine code (also called binary code or object code). The resulting machine code can only be understood by a specific processor, such as a Pentium or PowerPC.
Translates either source code or tokens into machine code, one instruction at a time, as the program is run. An interpreter does not generate machine code from a source program.
translate between lower-level representations of computer programs (source code to machine language)
A number of logical steps that a program follows in order to solve a problem
A set of statements written in human language but expressing the logic of a program
An artificial language used to write instructions that can be translated into machine language and then executed by a computer.
These aremachine independent and easily understood by those who are not experts in the field of programming. Examples include:
1. Third generation languages
2. Fourth generation languages
3. Fifth generation languages
4. Object oriented languages (OOP)
5. Web scripting languages
It is the process of coming up with a program to perform certain tasks. It includes:
1. Problem recognition
2. Problem definition
3. Program design
4. Program coding
5. Program testing and debugging
6. Implementation and maintenance
These are blocks of statement that determine how statements are to be executed.
INPUT “l”, “w”, “h”
PRINT ”V”TYPES OF PROGRAM CONTROL STRUCTURES
The computer reads instructions from a program file starting from the first top line and proceeding downwards to the end
PRINT ‘’PASS’’2. Selection Execution of statements depends on a condition that returns a true or false
AVERAGE = Marks/8
INPUT, “ID”, “Name” ,salary
Update employee account
USE IN FLOWCHART
Connector: used as a connecting point or interface for arrows coming from different directions
Arrow: Used for indicating the direction of flow of the program logic
Draw a flowchart to calculate the volume of a cylinder
Input the radius and the height
The values are processed
The output of the processed data
Marks the end of the data flow (program)Solution
Programming helps in various fields. This include: