1 / 25

Nairobi school presentation

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

yelena
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nairobi school presentation

  2. Principles ofprogramming

  3. 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.

  4. 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.

  5. Mark 1

  6. GEORGE BOOLE As the inventor of Boolean logic—the basis of modern digital computer logic

  7. CAPTAIN GRACE MURRAY AT DIFFERENT STAGES OF HER LIFE

  8. Objectives • To be able to define key terms in elementary programming. • Understand the levels of programming languages. • Familiarize oneself with key programming principles.

  9. 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.

  10. 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

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

  12. 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

  13. 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

  14. 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

  15. PROGRAM CONTROL STRUCTURES These are blocks of statement that determine how statements are to be executed.

  16. 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

  17. 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

  18. 3. Iteration / looping Execution 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

  19. SHAPES USED WHEN DRAWING FLOWCHARTS AND THEIR MEANINGS

  20. 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

  21. Case study: an example of a flow chart Question: Draw a flowchart to calculate the volume of a cylinder

  22. 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

  23. CONCLUSION Programming helps in various fields. This include: • Education • Career opportunities • Commerce • Security • entertainment

  24. REFERENCE MATERIALS • LONGHORN secondary computer studies • High flyer KCSE computer revision • googleimages.com • brainybetty.com • lingoshop.com • wikipedia.com • webopedia.com • bing.com

  25. THE END

More Related