SlideShare a Scribd company logo
lect1-introductiontoprogramminglanguages-130130013038-phpapp02.ppt
 What is a programming language?
 Why are there so many programming
languages?
 What are the types of programming
languages?
 Does the world need new languages?
 A programming language is a set of rules
that provides a way of telling a computer
what operations to perform.
 A programming language is a set of rules
for communicating an algorithm
 It provides a linguistic framework for
describing computations
PS — Introduction
A programming language is a notational system for
describing computation in a machine-readable and
human-readable form.
A programming language is a tool for developing
executable models for a class of problem domains.
 English is a natural language. It has words,
symbols and grammatical rules.
 A programming language also has words,
symbols and rules of grammar.
 The grammatical rules are called syntax.
 Each programming language has a different
set of syntax rules.
 Why does some people speak French?
 Programming languages have evolved over
time as better ways have been developed to
design them.
◦ First programming languages were developed in
the 1950s
◦ Since then thousands of languages have been
developed
 Different programming languages are
designed for different types of programs.
High-level program class Triangle {
...
float surface()
return b*h/2;
}
Low-level program LOAD r1,b
LOAD r2,h
MUL r1,r2
DIV r1,#2
RET
Executable Machine code 0001001001000101
0010010011101100
10101101001...
 First Generation Languages
 Second Generation Languages
 Third Generation Languages
 Fourth Generation Languages
 Fifth Generation Languages
 Machine language
◦ Operation code – such as addition or subtraction.
◦ Operands – that identify the data to be processed.
◦ Machine language is machine dependent as it is the
only language the computer can understand.
◦ Very efficient code but very difficult to write.
 Assembly languages
◦ Symbolic operation codes replaced binary operation
codes.
◦ Assembly language programs needed to be
“assembled” for execution by the computer. Each
assembly language instruction is translated into one
machine language instruction.
◦ Very efficient code and easier to write.
 Closer to English but included simple
mathematical notation.
◦ Programs written in source code which must be
translated into machine language programs called
object code.
◦ The translation of source code to object code is
accomplished by a machine language system
program called a compiler.
 Alternative to compilation is interpretation
which is accomplished by a system program
called an interpreter.
 Common third generation languages
◦ FORTRAN
◦ COBOL
◦ C and C++
◦ Visual Basic
 A high level language (4GL) that requires fewer
instructions to accomplish a task than a third
generation language.
 Used with databases
◦ Query languages
◦ Report generators
◦ Forms designers
◦ Application generators
 Declarative languages
 Functional(?): Lisp, Scheme, SML
◦ Also called applicative
◦ Everything is a function
 Logic: Prolog
◦ Based on mathematical logic
◦ Rule- or Constraint-based
 Though no clear definition at present, natural
language programs generally can be
interpreted and executed by the computer with
no other action by the user than stating their
question.
 Limited capabilities at present.
 Imperative Programming (C)
 Object-Oriented Programming (C++)
 Logic/Declarative Programming (Prolog)
 Functional/Applicative Programming (Lisp)
 Two broad groups
◦ Traditional programming languages
 Sequences of instructions
 First, second and some third generation languages
◦ Object-oriented languages
 Objects are created rather than sequences of
instructions
 Some third generation, and fourth and fifth generation
languages
 Simula
◦ First object-oriented language
◦ Developed by Ole Johan Dahl in the 1960s.
 Smalltalk
◦ First purely object-oriented language.
◦ Developed by Xerox in mid-1970s.
◦ Still in use on some computers.
 C++
◦ It is C language with additional features.
◦ Widely used for developing system and application
software.
◦ Graphical user interfaces can be developed easily
with visual programming tools.
 Scripting Languages
◦ JavaScript and VBScript
◦ Php and ASP
◦ Perl and Python
 Command Languages
◦ sh, csh, bash
 Text processing Languages
◦ LaTex, PostScript
 HTML
◦ HyperText Markup Language.
◦ Used on the Internet and the World Wide Web
(WWW).
◦ Web page developer puts brief codes called tags in
the page to indicate how the page should be
formatted.
 Programming languages are languages
 When it comes to mechanics of the task,
learning to speak and use a programming
language is in many ways like learning to
speak a human language
 In both kind of languages you have to learn
new vocabulary, syntax and semantics (new
words, sentence structure and meaning)
 And both kind of language require
considerable practice to make perfect.
 Computer languages lack ambiguity and
vagueness
 In English sentences such as I saw the man with
a telescope (Who had the telescope?) or Take a
pinch of salt (How much is a pinch?)
 In a programming language a sentence either
means one thing or it means nothing
 Formerly: Run-time performance
◦ (Computers were more expensive than
programmers)
 Now: Life cycle (human) cost is more
important
◦ Ease of designing, coding
◦ Debugging
◦ Maintenance
◦ Reusability
 FADS
 Writability: The quality of a language that enables a
programmer to use it to express a computation
clearly, correctly, concisely, and quickly.
 Readability: The quality of a language that enables a
programmer to understand and comprehend the
nature of a computation easily and accurately.
 Orthogonality: The quality of a language that
features provided have as few restrictions as possible
and be combinable in any meaningful way.
 Reliability: The quality of a language that assures a
program will not behave in unexpected or disastrous
ways during execution.
 Maintainability: The quality of a language that eases
errors can be found and corrected and new features
added.
 Generality: The quality of a language that avoids
special cases in the availability or use of constructs
and by combining closely related constructs into a
single more general one.
 Uniformity: The quality of a language that similar
features should look similar and behave similar.
 Extensibility: The quality of a language that provides
some general mechanism for the user to add new
constructs to a language.
 Standardability: The quality of a language that allows
programs written to be transported from one
computer to another without significant change in
language structure.
 Implementability: The quality of a language that
provides a translator or interpreter can be written.
This can address to complexity of the language
definition.
 A variable is a label assigned to a value.
 The symbol = is the assignment operator (and
not the equals symbol!), and it can be
pronounced is assigned
 The symbol + is the concatenation symbol
when dealing with strings (and not the plus
symbol!)
•Variable: A named storage location in memory that holds a
value.
•Syntax: The set of rules that defines the combinations of
symbols that are considered valid in the programming language.
•Operator: A symbol that performs a specific operation on one
or more operands (e.g., +, -, *, /).
•Operand: A value or variable that an operator acts upon.
•Function: A reusable block of code that performs a specific
task.
•Data Type: A classification that specifies the type of data (e.g.,
integer, float, string, list).
•Conditional Statement: A statement that executes different
code blocks based on whether a condition is true or false.
 At the gym. You are the manager of a gym and
you have to register a new person. What
variables would you create? Write three
variables, assign a value to each of them (make
sure they are strings!), and print them out.
 Question: Write a Python program that takes
two numbers as input from the user and
calculates their sum.
1. Prompt the user to enter the first number.
2. Prompt the user to enter the second number.
3. Calculate the sum of the two numbers.
4. Print the result in a formatted message.
Ad

More Related Content

Similar to lect1-introductiontoprogramminglanguages-130130013038-phpapp02.ppt (20)

Software Engineering : Computer basics - Introduction to computer
Software Engineering : Computer basics - Introduction to computerSoftware Engineering : Computer basics - Introduction to computer
Software Engineering : Computer basics - Introduction to computer
PrabaKaran656400
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
Define Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out CDefine Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
NaqashAhmad14
 
Lec21&22.pptx programing language and there study
Lec21&22.pptx programing language and there studyLec21&22.pptx programing language and there study
Lec21&22.pptx programing language and there study
samiullahamjad06
 
Presentation-1.pptx
Presentation-1.pptxPresentation-1.pptx
Presentation-1.pptx
animewatcher7
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
Bilal Maqbool ツ
 
Computer languages
Computer languagesComputer languages
Computer languages
Buxoo Abdullah
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Professor Lili Saghafi
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
KINGZzofYouTube
 
Programming
ProgrammingProgramming
Programming
a7madalr
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
Keval Goyani
 
Fundamentals of Programming language.docx
Fundamentals of Programming language.docxFundamentals of Programming language.docx
Fundamentals of Programming language.docx
bijayakumarsahoo22
 
programming.pptx
programming.pptxprogramming.pptx
programming.pptx
DarianElmyra
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
mehrankhan7842312
 
Computer Languages & its genearations.pptx
Computer Languages & its genearations.pptxComputer Languages & its genearations.pptx
Computer Languages & its genearations.pptx
Ritu Sachdeva
 
8505548.ppt
8505548.ppt8505548.ppt
8505548.ppt
meenabairagi1
 
Presentation of the Computer language.pptx
Presentation of the Computer language.pptxPresentation of the Computer language.pptx
Presentation of the Computer language.pptx
aalfakeah02
 
Software Engineering : Computer basics - Introduction to computer
Software Engineering : Computer basics - Introduction to computerSoftware Engineering : Computer basics - Introduction to computer
Software Engineering : Computer basics - Introduction to computer
PrabaKaran656400
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
Define Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out CDefine Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
NaqashAhmad14
 
Lec21&22.pptx programing language and there study
Lec21&22.pptx programing language and there studyLec21&22.pptx programing language and there study
Lec21&22.pptx programing language and there study
samiullahamjad06
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
Bilal Maqbool ツ
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Professor Lili Saghafi
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
KINGZzofYouTube
 
Programming
ProgrammingProgramming
Programming
a7madalr
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
Keval Goyani
 
Fundamentals of Programming language.docx
Fundamentals of Programming language.docxFundamentals of Programming language.docx
Fundamentals of Programming language.docx
bijayakumarsahoo22
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
mehrankhan7842312
 
Computer Languages & its genearations.pptx
Computer Languages & its genearations.pptxComputer Languages & its genearations.pptx
Computer Languages & its genearations.pptx
Ritu Sachdeva
 
Presentation of the Computer language.pptx
Presentation of the Computer language.pptxPresentation of the Computer language.pptx
Presentation of the Computer language.pptx
aalfakeah02
 

More from abigailjudith8 (10)

Polymorphism_in_Python_Programming_Language
Polymorphism_in_Python_Programming_LanguagePolymorphism_in_Python_Programming_Language
Polymorphism_in_Python_Programming_Language
abigailjudith8
 
Inheritance_in_OOP_using Python Programming
Inheritance_in_OOP_using Python ProgrammingInheritance_in_OOP_using Python Programming
Inheritance_in_OOP_using Python Programming
abigailjudith8
 
Encapsulation_Python_Programming_Language
Encapsulation_Python_Programming_LanguageEncapsulation_Python_Programming_Language
Encapsulation_Python_Programming_Language
abigailjudith8
 
Application and Data security and Privacy.pptx
Application and Data security and Privacy.pptxApplication and Data security and Privacy.pptx
Application and Data security and Privacy.pptx
abigailjudith8
 
Cyber Hackathon Media Campaign Proposal (1).pptx
Cyber Hackathon Media Campaign Proposal (1).pptxCyber Hackathon Media Campaign Proposal (1).pptx
Cyber Hackathon Media Campaign Proposal (1).pptx
abigailjudith8
 
SVM FOR GRADE 11 pearson Btec 3rd level.ppt
SVM FOR GRADE 11 pearson Btec 3rd level.pptSVM FOR GRADE 11 pearson Btec 3rd level.ppt
SVM FOR GRADE 11 pearson Btec 3rd level.ppt
abigailjudith8
 
MACHINE LEARNING INTRODUCTION FOR BEGINNERS
MACHINE LEARNING INTRODUCTION FOR BEGINNERSMACHINE LEARNING INTRODUCTION FOR BEGINNERS
MACHINE LEARNING INTRODUCTION FOR BEGINNERS
abigailjudith8
 
SVM introduction for machine learning engineers
SVM introduction for machine learning engineersSVM introduction for machine learning engineers
SVM introduction for machine learning engineers
abigailjudith8
 
Big Data for Pearson Btec Higher level 3.ppt
Big Data for Pearson Btec Higher level 3.pptBig Data for Pearson Btec Higher level 3.ppt
Big Data for Pearson Btec Higher level 3.ppt
abigailjudith8
 
INTRODUCTION TO PROGRAMMING and Python.pptx
INTRODUCTION TO PROGRAMMING and Python.pptxINTRODUCTION TO PROGRAMMING and Python.pptx
INTRODUCTION TO PROGRAMMING and Python.pptx
abigailjudith8
 
Polymorphism_in_Python_Programming_Language
Polymorphism_in_Python_Programming_LanguagePolymorphism_in_Python_Programming_Language
Polymorphism_in_Python_Programming_Language
abigailjudith8
 
Inheritance_in_OOP_using Python Programming
Inheritance_in_OOP_using Python ProgrammingInheritance_in_OOP_using Python Programming
Inheritance_in_OOP_using Python Programming
abigailjudith8
 
Encapsulation_Python_Programming_Language
Encapsulation_Python_Programming_LanguageEncapsulation_Python_Programming_Language
Encapsulation_Python_Programming_Language
abigailjudith8
 
Application and Data security and Privacy.pptx
Application and Data security and Privacy.pptxApplication and Data security and Privacy.pptx
Application and Data security and Privacy.pptx
abigailjudith8
 
Cyber Hackathon Media Campaign Proposal (1).pptx
Cyber Hackathon Media Campaign Proposal (1).pptxCyber Hackathon Media Campaign Proposal (1).pptx
Cyber Hackathon Media Campaign Proposal (1).pptx
abigailjudith8
 
SVM FOR GRADE 11 pearson Btec 3rd level.ppt
SVM FOR GRADE 11 pearson Btec 3rd level.pptSVM FOR GRADE 11 pearson Btec 3rd level.ppt
SVM FOR GRADE 11 pearson Btec 3rd level.ppt
abigailjudith8
 
MACHINE LEARNING INTRODUCTION FOR BEGINNERS
MACHINE LEARNING INTRODUCTION FOR BEGINNERSMACHINE LEARNING INTRODUCTION FOR BEGINNERS
MACHINE LEARNING INTRODUCTION FOR BEGINNERS
abigailjudith8
 
SVM introduction for machine learning engineers
SVM introduction for machine learning engineersSVM introduction for machine learning engineers
SVM introduction for machine learning engineers
abigailjudith8
 
Big Data for Pearson Btec Higher level 3.ppt
Big Data for Pearson Btec Higher level 3.pptBig Data for Pearson Btec Higher level 3.ppt
Big Data for Pearson Btec Higher level 3.ppt
abigailjudith8
 
INTRODUCTION TO PROGRAMMING and Python.pptx
INTRODUCTION TO PROGRAMMING and Python.pptxINTRODUCTION TO PROGRAMMING and Python.pptx
INTRODUCTION TO PROGRAMMING and Python.pptx
abigailjudith8
 
Ad

Recently uploaded (20)

Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Ad

lect1-introductiontoprogramminglanguages-130130013038-phpapp02.ppt

  • 2.  What is a programming language?  Why are there so many programming languages?  What are the types of programming languages?  Does the world need new languages?
  • 3.  A programming language is a set of rules that provides a way of telling a computer what operations to perform.  A programming language is a set of rules for communicating an algorithm  It provides a linguistic framework for describing computations
  • 4. PS — Introduction A programming language is a notational system for describing computation in a machine-readable and human-readable form. A programming language is a tool for developing executable models for a class of problem domains.
  • 5.  English is a natural language. It has words, symbols and grammatical rules.  A programming language also has words, symbols and rules of grammar.  The grammatical rules are called syntax.  Each programming language has a different set of syntax rules.
  • 6.  Why does some people speak French?  Programming languages have evolved over time as better ways have been developed to design them. ◦ First programming languages were developed in the 1950s ◦ Since then thousands of languages have been developed  Different programming languages are designed for different types of programs.
  • 7. High-level program class Triangle { ... float surface() return b*h/2; } Low-level program LOAD r1,b LOAD r2,h MUL r1,r2 DIV r1,#2 RET Executable Machine code 0001001001000101 0010010011101100 10101101001...
  • 8.  First Generation Languages  Second Generation Languages  Third Generation Languages  Fourth Generation Languages  Fifth Generation Languages
  • 9.  Machine language ◦ Operation code – such as addition or subtraction. ◦ Operands – that identify the data to be processed. ◦ Machine language is machine dependent as it is the only language the computer can understand. ◦ Very efficient code but very difficult to write.
  • 10.  Assembly languages ◦ Symbolic operation codes replaced binary operation codes. ◦ Assembly language programs needed to be “assembled” for execution by the computer. Each assembly language instruction is translated into one machine language instruction. ◦ Very efficient code and easier to write.
  • 11.  Closer to English but included simple mathematical notation. ◦ Programs written in source code which must be translated into machine language programs called object code. ◦ The translation of source code to object code is accomplished by a machine language system program called a compiler.
  • 12.  Alternative to compilation is interpretation which is accomplished by a system program called an interpreter.  Common third generation languages ◦ FORTRAN ◦ COBOL ◦ C and C++ ◦ Visual Basic
  • 13.  A high level language (4GL) that requires fewer instructions to accomplish a task than a third generation language.  Used with databases ◦ Query languages ◦ Report generators ◦ Forms designers ◦ Application generators
  • 14.  Declarative languages  Functional(?): Lisp, Scheme, SML ◦ Also called applicative ◦ Everything is a function  Logic: Prolog ◦ Based on mathematical logic ◦ Rule- or Constraint-based
  • 15.  Though no clear definition at present, natural language programs generally can be interpreted and executed by the computer with no other action by the user than stating their question.  Limited capabilities at present.
  • 16.  Imperative Programming (C)  Object-Oriented Programming (C++)  Logic/Declarative Programming (Prolog)  Functional/Applicative Programming (Lisp)
  • 17.  Two broad groups ◦ Traditional programming languages  Sequences of instructions  First, second and some third generation languages ◦ Object-oriented languages  Objects are created rather than sequences of instructions  Some third generation, and fourth and fifth generation languages
  • 18.  Simula ◦ First object-oriented language ◦ Developed by Ole Johan Dahl in the 1960s.  Smalltalk ◦ First purely object-oriented language. ◦ Developed by Xerox in mid-1970s. ◦ Still in use on some computers.
  • 19.  C++ ◦ It is C language with additional features. ◦ Widely used for developing system and application software. ◦ Graphical user interfaces can be developed easily with visual programming tools.
  • 20.  Scripting Languages ◦ JavaScript and VBScript ◦ Php and ASP ◦ Perl and Python  Command Languages ◦ sh, csh, bash  Text processing Languages ◦ LaTex, PostScript
  • 21.  HTML ◦ HyperText Markup Language. ◦ Used on the Internet and the World Wide Web (WWW). ◦ Web page developer puts brief codes called tags in the page to indicate how the page should be formatted.
  • 22.  Programming languages are languages  When it comes to mechanics of the task, learning to speak and use a programming language is in many ways like learning to speak a human language  In both kind of languages you have to learn new vocabulary, syntax and semantics (new words, sentence structure and meaning)  And both kind of language require considerable practice to make perfect.
  • 23.  Computer languages lack ambiguity and vagueness  In English sentences such as I saw the man with a telescope (Who had the telescope?) or Take a pinch of salt (How much is a pinch?)  In a programming language a sentence either means one thing or it means nothing
  • 24.  Formerly: Run-time performance ◦ (Computers were more expensive than programmers)  Now: Life cycle (human) cost is more important ◦ Ease of designing, coding ◦ Debugging ◦ Maintenance ◦ Reusability  FADS
  • 25.  Writability: The quality of a language that enables a programmer to use it to express a computation clearly, correctly, concisely, and quickly.  Readability: The quality of a language that enables a programmer to understand and comprehend the nature of a computation easily and accurately.  Orthogonality: The quality of a language that features provided have as few restrictions as possible and be combinable in any meaningful way.  Reliability: The quality of a language that assures a program will not behave in unexpected or disastrous ways during execution.  Maintainability: The quality of a language that eases errors can be found and corrected and new features added.
  • 26.  Generality: The quality of a language that avoids special cases in the availability or use of constructs and by combining closely related constructs into a single more general one.  Uniformity: The quality of a language that similar features should look similar and behave similar.  Extensibility: The quality of a language that provides some general mechanism for the user to add new constructs to a language.  Standardability: The quality of a language that allows programs written to be transported from one computer to another without significant change in language structure.  Implementability: The quality of a language that provides a translator or interpreter can be written. This can address to complexity of the language definition.
  • 27.  A variable is a label assigned to a value.  The symbol = is the assignment operator (and not the equals symbol!), and it can be pronounced is assigned  The symbol + is the concatenation symbol when dealing with strings (and not the plus symbol!)
  • 28. •Variable: A named storage location in memory that holds a value. •Syntax: The set of rules that defines the combinations of symbols that are considered valid in the programming language. •Operator: A symbol that performs a specific operation on one or more operands (e.g., +, -, *, /). •Operand: A value or variable that an operator acts upon. •Function: A reusable block of code that performs a specific task. •Data Type: A classification that specifies the type of data (e.g., integer, float, string, list). •Conditional Statement: A statement that executes different code blocks based on whether a condition is true or false.
  • 29.  At the gym. You are the manager of a gym and you have to register a new person. What variables would you create? Write three variables, assign a value to each of them (make sure they are strings!), and print them out.
  • 30.  Question: Write a Python program that takes two numbers as input from the user and calculates their sum. 1. Prompt the user to enter the first number. 2. Prompt the user to enter the second number. 3. Calculate the sum of the two numbers. 4. Print the result in a formatted message.