Nairobi school presentation
This presentation is the property of its rightful owner.
Sponsored Links
1 / 25

Nairobi school presentation PowerPoint PPT Presentation


  • 49 Views
  • Uploaded on
  • Presentation posted in: General

Nairobi school presentation. Principles of programming. Introduction. Computer programming is the process of writing Debugging maintaining the source code of computer programs .

Download Presentation

Nairobi school presentation

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Nairobi school presentation

Nairobi school presentation


Principles of programming

Principles ofprogramming


Introduction

Introduction

Computer programming is the process of

  • writing

  • Debugging

  • maintaining the source code of computer programs.

  • This source code is written in a programming language. The purpose of programming is to create a program that exhibits a certain desired behavior (customization). The process of writing source code often requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms and formal logic.


History of programming

History of programming

  • The first programmable computer was actually built in Germany by Konrad Zuse in 1941.

  • In the US, a team of Harvard and IBM scientists led by Howard Aiken were also working on a programmable computer. This computer, called Mark I, was completed in 1944. The person who is credited with fully harnessing the power of this programmable computer is Captain Grace Murray Hopper. She was one of the first to recognize the value of reusable libraries of subroutines, is credited with inventing the term 'debug' (when she removed a dead moth stuck in a relay) and having written the first high level compiler (A-0). She also led the effort to develop COBOL : a programming language not identified with a particular manufacturer.


Nairobi school presentation

Mark 1


George boole

GEORGE BOOLE

As the inventor of Boolean logic—the basis of modern digital computer logic


Nairobi school presentation

CAPTAIN GRACE MURRAY AT DIFFERENT STAGES OF HER LIFE


Objectives

Objectives

  • To be able to define key terms in elementary programming.

  • Understand the levels of programming languages.

  • Familiarize oneself with key programming principles.


Definition of terms

Definition of terms

A compiler

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.

An interpreter

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.


Nairobi school presentation

Assembler

translate between lower-level representations of computer programs (source code to machine language)

Algorithm

A number of logical steps that a program follows in order to solve a problem

Pseudo code

A set of statements written in human language but expressing the logic of a program


Programming languages

PROGRAMMING LANGUAGES

An artificial language used to write instructions that can be translated into machine language and then executed by a computer.


Examples of programming languages

Examples of programming languages.

  • Low level programming languages. These can be easily understood by the computer directly, requiring less efforts to translate into machine form. Examples include:

    Machine language

    Assembly language


Nairobi school presentation

  • High level languages.

    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


Program development cycle

PROGRAM DEVELOPMENT CYCLE

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

7. Documentation


Program control structures

PROGRAM CONTROL STRUCTURES

These are blocks of statement that determine how statements are to be executed.


Types of program control structures

START

INPUT “l”, “w”, “h”

PRINT ”V”

TYPES OF PROGRAM CONTROL STRUCTURES

  • Sequence

    The computer reads instructions from a program file starting from the first top line and proceeding downwards to the end

V=l*w*h

STOP


2 selection execution of statements depends on a condition that returns a true or false

INPUT “MARKS”

PRINT

‘’FAIL’’

PRINT ‘’PASS’’

2. Selection Execution of statements depends on a condition that returns a true or false

START

AVERAGE = Marks/8

AVERAGE>=50?

true

false

STOP


Nairobi school presentation

3. Iteration / loopingExecution of the same block again and again until a certain condition is fulfilled

START

INPUT, “ID”, “Name” ,salary

add salary

Update employee account

Is salary=5000?

no

yes

stop


Nairobi school presentation

SHAPES USED WHEN DRAWING FLOWCHARTS AND THEIR MEANINGS


Nairobi school presentation

NAME

SHAPE

USE IN FLOWCHART

Circle

Connector: used as a connecting point or interface for arrows coming from different directions

Arrow

Arrow: Used for indicating the direction of flow of the program logic


Case study an example of a flow chart

Case study: an example of a flow chart

Question:

Draw a flowchart to calculate the volume of a cylinder


Solution

Marks the beginning of the program

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

START

INPUT

“r”, ”h”

π=22/7

V= π*r*r*h

PRINT

“V”

STOP


Conclusion

CONCLUSION

Programming helps in various fields. This include:

  • Education

  • Career opportunities

  • Commerce

  • Security

  • entertainment


Reference materials

REFERENCE MATERIALS

  • LONGHORN secondary computer studies

  • High flyer KCSE computer revision

  • googleimages.com

  • brainybetty.com

  • lingoshop.com

  • wikipedia.com

  • webopedia.com

  • bing.com


Nairobi school presentation

THE END


  • Login