SlideShare a Scribd company logo
1 of 13
Fundamentals of Computer
Programming using Python
CSM 1231
Lecture: Kennedy Edemacu (PhD)
Computer Programming
• Program
• Set of statements (instructions that instruct computers on what to do
• Written using programming languages
• The program development process is referred to as programming
• It’s developed by programmers
• A program can instruct computers to:
• Read/accept input data
• Calculate or compare
• Store data
• Display output and communication messages
• Software
• Is a computer program with its associate documentation
Programming Languages
• A natural language has a systematic method of using symbols of the
language.
• Dedicated by rules of grammar
• Syntax: set of rules needed to ensure a sentence is grammatically correct
• Semantic: refers to meaning
• Each programming language is governed by syntax and semantics
• In natural languages the syntax rule can be broken but we can use the
guess work to get what someone is saying
• Exact syntax rules of programming languages have to be followed for
computers to understand
Types of Programming Languages
• Can be classified into two:
• Low-level languages - machine dependent
• First Generation – Machine Languages
• Second Generation – Assembly Languages
• High-level languages – Machine independent
• Third Generation – Procedural Languages
• Fourth Generation – Problem Oriented Languages
• Fifth Generation – Natural Languages
1GL- Machine Language
• Writes programs inform of 1s and 0s which are directly understood by
the computer
• E.g., Below is a machine code
• Fast to execute
• Time consuming and tedious to interprete
• Very easy to make a mistake and hard to identify the mistake
2GL – Assembly Language
• Written using mnemonic codes (abbreviated English words)
• The codes represent operations and addresses related to the main
memory and storage registers, e.g., LDA, STO, ADD, NOP, etc
• Have to be translated to machine language to the processor to
understand
• Example:
• program to add and
store two numbers
would be
3GL – Procedural Languages
• Uses human like language
• Intended to solve general problems
• E.g., C, PASCAL, COBOL, FORTRAN, etc.
• Have to be translated into machine language so as to be understood
by the computers
• The translation is done by either a compiler or an interpreter
depending on the language.
Language Translators
• A Compiler:
• Translates the entire program (source code) into a machine language (object
code)
• The object code can be save on a disk with .exe extension.
• It is then loaded and executed.
Translators cont..
• An Interpreter:
• Interprets and executes one instruction at a time.
• The machine codes are not saved after execution.
Translators cont..
• An Assembler:
• Translates an assembly language program into machine language
• Recognizes the mnemonic characters and substitutes them with machine
codes for each instruction
4GL - Problem-Oriented Languages
• Designed to solve specific problems
• Non-procedural and focus on specifying what the program is to
achieve
• More like English and easy to program
• Used for specific applications, e.g.,
• Query Languages such as SQL, etc
• Application generators such as Visual Basic
5GL – Natural Programming Languages
• Computer Languages have become more human-like
• Though still far from English, Lugbara, Luganda, etc
• Computer language that incorporates AI to allow direct human
communication, e.g., PROLOG, LISP, etc
• Enable computers to run and apply new information like humans
References
• Samuel Kizito, “Introduction to Computer Programming,” [Online],
Available: https://www.slideserve.com/nortonm/introduction-to-
computer-programming-powerpoint-ppt-presentation

More Related Content

Similar to Python-L1.pptx

Similar to Python-L1.pptx (20)

X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Language processors
Language processorsLanguage processors
Language processors
 
Programming languages.pptx
Programming languages.pptxProgramming languages.pptx
Programming languages.pptx
 
Computer languages
Computer languagesComputer languages
Computer languages
 
week 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptxweek 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptx
 
4 computer languages
4 computer languages4 computer languages
4 computer languages
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
a1.pptx.pdf
a1.pptx.pdfa1.pptx.pdf
a1.pptx.pdf
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
 
Week 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdfWeek 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdf
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
Lesson 2.pptx
Lesson 2.pptxLesson 2.pptx
Lesson 2.pptx
 
Interaction With Computers FIT
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FIT
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 

More from DukeCalvin

Computer Science Ethics: Deontological ethics.pptx
Computer Science Ethics: Deontological ethics.pptxComputer Science Ethics: Deontological ethics.pptx
Computer Science Ethics: Deontological ethics.pptxDukeCalvin
 
COMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIES
COMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIESCOMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIES
COMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIESDukeCalvin
 
Topic 4 Data Processing.pptx
Topic 4 Data Processing.pptxTopic 4 Data Processing.pptx
Topic 4 Data Processing.pptxDukeCalvin
 
Introduction to IoT.pptx
Introduction to IoT.pptxIntroduction to IoT.pptx
Introduction to IoT.pptxDukeCalvin
 
Data types in Python.pptx
Data types in Python.pptxData types in Python.pptx
Data types in Python.pptxDukeCalvin
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfDukeCalvin
 
Entreprenuership skill development.pptx
Entreprenuership skill development.pptxEntreprenuership skill development.pptx
Entreprenuership skill development.pptxDukeCalvin
 

More from DukeCalvin (7)

Computer Science Ethics: Deontological ethics.pptx
Computer Science Ethics: Deontological ethics.pptxComputer Science Ethics: Deontological ethics.pptx
Computer Science Ethics: Deontological ethics.pptx
 
COMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIES
COMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIESCOMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIES
COMPUTER SCIENCE: PACIFISM IN ETHICS AND PEACE STUDIES
 
Topic 4 Data Processing.pptx
Topic 4 Data Processing.pptxTopic 4 Data Processing.pptx
Topic 4 Data Processing.pptx
 
Introduction to IoT.pptx
Introduction to IoT.pptxIntroduction to IoT.pptx
Introduction to IoT.pptx
 
Data types in Python.pptx
Data types in Python.pptxData types in Python.pptx
Data types in Python.pptx
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdf
 
Entreprenuership skill development.pptx
Entreprenuership skill development.pptxEntreprenuership skill development.pptx
Entreprenuership skill development.pptx
 

Recently uploaded

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 

Recently uploaded (20)

Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 

Python-L1.pptx

  • 1. Fundamentals of Computer Programming using Python CSM 1231 Lecture: Kennedy Edemacu (PhD)
  • 2. Computer Programming • Program • Set of statements (instructions that instruct computers on what to do • Written using programming languages • The program development process is referred to as programming • It’s developed by programmers • A program can instruct computers to: • Read/accept input data • Calculate or compare • Store data • Display output and communication messages • Software • Is a computer program with its associate documentation
  • 3. Programming Languages • A natural language has a systematic method of using symbols of the language. • Dedicated by rules of grammar • Syntax: set of rules needed to ensure a sentence is grammatically correct • Semantic: refers to meaning • Each programming language is governed by syntax and semantics • In natural languages the syntax rule can be broken but we can use the guess work to get what someone is saying • Exact syntax rules of programming languages have to be followed for computers to understand
  • 4. Types of Programming Languages • Can be classified into two: • Low-level languages - machine dependent • First Generation – Machine Languages • Second Generation – Assembly Languages • High-level languages – Machine independent • Third Generation – Procedural Languages • Fourth Generation – Problem Oriented Languages • Fifth Generation – Natural Languages
  • 5. 1GL- Machine Language • Writes programs inform of 1s and 0s which are directly understood by the computer • E.g., Below is a machine code • Fast to execute • Time consuming and tedious to interprete • Very easy to make a mistake and hard to identify the mistake
  • 6. 2GL – Assembly Language • Written using mnemonic codes (abbreviated English words) • The codes represent operations and addresses related to the main memory and storage registers, e.g., LDA, STO, ADD, NOP, etc • Have to be translated to machine language to the processor to understand • Example: • program to add and store two numbers would be
  • 7. 3GL – Procedural Languages • Uses human like language • Intended to solve general problems • E.g., C, PASCAL, COBOL, FORTRAN, etc. • Have to be translated into machine language so as to be understood by the computers • The translation is done by either a compiler or an interpreter depending on the language.
  • 8. Language Translators • A Compiler: • Translates the entire program (source code) into a machine language (object code) • The object code can be save on a disk with .exe extension. • It is then loaded and executed.
  • 9. Translators cont.. • An Interpreter: • Interprets and executes one instruction at a time. • The machine codes are not saved after execution.
  • 10. Translators cont.. • An Assembler: • Translates an assembly language program into machine language • Recognizes the mnemonic characters and substitutes them with machine codes for each instruction
  • 11. 4GL - Problem-Oriented Languages • Designed to solve specific problems • Non-procedural and focus on specifying what the program is to achieve • More like English and easy to program • Used for specific applications, e.g., • Query Languages such as SQL, etc • Application generators such as Visual Basic
  • 12. 5GL – Natural Programming Languages • Computer Languages have become more human-like • Though still far from English, Lugbara, Luganda, etc • Computer language that incorporates AI to allow direct human communication, e.g., PROLOG, LISP, etc • Enable computers to run and apply new information like humans
  • 13. References • Samuel Kizito, “Introduction to Computer Programming,” [Online], Available: https://www.slideserve.com/nortonm/introduction-to- computer-programming-powerpoint-ppt-presentation