SlideShare a Scribd company logo
1 of 22
+
Dr Ramadan Babers
Faculty of Science - Helwan University
Fall-2018
Introduction
to
Computer
LEC - 7
+
Introduction to
Programming
Languages
2
Chapter 1 Outlines
 Introduction
 Different ways that people use computers.
 How a Program Works
 Compilers and Interpreters
 Ambiguity
 Grammar
 Derivation
3
1. Introduction
4
Different ways that people use computers.
In school,
Students use computers
for tasks such as
 writing papers,
 searching for articles,
 sending email, and
 participating in online
classes.
1. Introduction (Cont.)
5
Different ways that people use computers.
At work,
People use computers to
 analyze data,
 make presentations,
 conduct business
transactions,
 communicate with
customers,
 control machines and
 do many other things.
1. Introduction (Cont.)
6
Different ways that people use computers.
At home,
People use computers for
tasks such as
 paying bills,
 shopping online,
 communicating with
friends and family, and
 playing computer
games.
1. Introduction (Cont.)
7
Computers can do such a wide variety of
things because they can be programmed.
This means that computers are not designed
to do just one job, but to do any job that their
programs tell them to do.
A program is a set of instructions that a
computer follows to perform a task
2. How a Program Works
8
CONCEPT:
 A computer’s CPU can
only understand
instructions that are
written in machine
language.
 Because people find it
very difficult to write entire
programs in machine
language, other
programming languages
have been invented.
2. How a Program Works (Cont.)
9
 CPU only understands
machine language, it is
difficult for people to
write programs in
machine language.
 For this reason,
assembly language was
created as an alternative
to machine language.
2. How a Program Works (Cont.)
10
 Assembly language programs cannot be executed
by the CPU, however.
 The CPU only understands machine language, so a
special program known as an assembler is used to
translate an assembly language program to a
machine language program.
3. Compilers and Interpreters
11
 Because the CPU understands only machine
language instructions, programs that are written in
a high-level language must be translated into
machine language.
 Depending on the language that a program has
been written in, the programmer will use either a
compiler or an interpreter to make the translation.
12
 Many languages require
you to compile (translate)
your program into a form
that the machine
understands.
 Python is instead directly
interpreted into machine
instructions.
compile execute
outputsource code
Hello.java
byte code
Hello.class
interpret
outputsource code
Hello.py
3. Compilers and Interpreters (Cont.)
3.1 Compiler
13
3.2 Interpreters
14
The Python language uses an interpreter, which is a program that both
translates and executes the instructions in a high-level language
program. As the interpreter reads each individual instruction in the
program, it converts it to machine language instructions and then
immediately executes them.
4. Ambiguity
15
 Why Do We Need
Programming
Language
 Can we use natural
languages like
English?
4. Ambiguity (Quiz)
16
 Would you rather be paid $100 weekly or
biweekly?
o Prefer to be paid $100 weekly.
o Prefer to be paid $100 biweekly.
o It depends.
o Prefer not to be paid at all.
4. Ambiguity (Quiz)
17
4. Ambiguity (Quiz)
18
 Would you rather be paid $100 weekly or
biweekly?
o Prefer to be paid $100 weekly.
o Prefer to be paid $100 biweekly.
o It depends.
o Prefer not to be paid at all.
Different people understand different ways
5. Grammar
19
Noun example: I / Python
Verb example: eat / like
Noun Verb
Sentence Subject Verb Object
Noun Noun
6. Derivation
20
Sentence Subject Verb Object
Subject
Object
Verb
Verb
Noun
Noun
Noun
Noun
like
eat
I
Python
Non-terminal
terminal
Noun cookies
6. Derivation (Cont.)
21
Sentence Subject Verb Object
Non-terminal
terminal
Noun
like Noun
Verb
I
Object
Python
Subject
Object
Verb
Verb
Noun
Noun
Noun
Noun
like
eat
I
Python
Derivation:
Starting from some non-terminals,
follow the roles to derive the
sequence of terminals
6. Derivation (Quiz)
22
Sentence Subject Verb Object
Which of these sentences can be produced from
the following grammar? Starting from Sentence
o Python eat cookies
o Python eat Python
o I like eat
o Eat python cookies

More Related Content

What's hot

Abstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworksAbstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworksijpla
 
Types Of Coding Languages: A Complete Guide To Master Programming
Types Of Coding Languages: A Complete Guide To Master ProgrammingTypes Of Coding Languages: A Complete Guide To Master Programming
Types Of Coding Languages: A Complete Guide To Master Programmingcalltutors
 
Computer programming
Computer programmingComputer programming
Computer programmingwesleycatcher
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)Suneel Dogra
 
What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?Syed Hassan Raza
 
Introduction to Python Programming - I
Introduction to Python Programming  - IIntroduction to Python Programming  - I
Introduction to Python Programming - IArnab Chakraborty
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Md. Imran Hossain Showrov
 
Generations of programming language
Generations of programming languageGenerations of programming language
Generations of programming languageJAIDEVPAUL
 
Computer programming language concept
Computer programming language conceptComputer programming language concept
Computer programming language conceptAfiq Sajuri
 
Programming languages
Programming languagesProgramming languages
Programming languagesAkash Varaiya
 
Evolution of programinglang
Evolution of programinglangEvolution of programinglang
Evolution of programinglangSUPER ULTRON
 
Which is better, Java or Python? And how?
Which is better, Java or Python? And how?Which is better, Java or Python? And how?
Which is better, Java or Python? And how?narendrachinnu
 
computer languages
computer languagescomputer languages
computer languagesgulpari2
 

What's hot (20)

Abstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworksAbstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworks
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Types Of Coding Languages: A Complete Guide To Master Programming
Types Of Coding Languages: A Complete Guide To Master ProgrammingTypes Of Coding Languages: A Complete Guide To Master Programming
Types Of Coding Languages: A Complete Guide To Master Programming
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
 
What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?
 
Introduction to Python Programming - I
Introduction to Python Programming  - IIntroduction to Python Programming  - I
Introduction to Python Programming - I
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
Generations of programming language
Generations of programming languageGenerations of programming language
Generations of programming language
 
Lecture 21 - Preprocessor and Header File
Lecture 21 - Preprocessor and Header FileLecture 21 - Preprocessor and Header File
Lecture 21 - Preprocessor and Header File
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Shraddha jaiswal
Shraddha jaiswalShraddha jaiswal
Shraddha jaiswal
 
Computer programming language concept
Computer programming language conceptComputer programming language concept
Computer programming language concept
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Evolution of programinglang
Evolution of programinglangEvolution of programinglang
Evolution of programinglang
 
Programming Overview
Programming OverviewProgramming Overview
Programming Overview
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
 
Which is better, Java or Python? And how?
Which is better, Java or Python? And how?Which is better, Java or Python? And how?
Which is better, Java or Python? And how?
 
computer languages
computer languagescomputer languages
computer languages
 

Similar to Introduction to computer_lec_07_fall_2018_python_lec_101

Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdfRakibRahman19
 
Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaKim Moore
 
notes on Programming fundamentals
notes on Programming fundamentals notes on Programming fundamentals
notes on Programming fundamentals ArghodeepPaul
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Javanandanrocker
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonJaya Kumari
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesTammy Moncrief
 
COMPUTER PROGRAMMING 10 WEEK 1.pptx
COMPUTER PROGRAMMING 10 WEEK 1.pptxCOMPUTER PROGRAMMING 10 WEEK 1.pptx
COMPUTER PROGRAMMING 10 WEEK 1.pptxNealFarias
 
Python Intro Slides for Students CSC-148 Chapter 1
Python Intro Slides for Students CSC-148  Chapter 1Python Intro Slides for Students CSC-148  Chapter 1
Python Intro Slides for Students CSC-148 Chapter 1Raza Ul Mustafa
 
introduction to programming
introduction to programmingintroduction to programming
introduction to programmingGaea Bonita
 
Programming languages
Programming languages Programming languages
Programming languages sushma chinta
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming LanguagesMuhammad Hammad Waseem
 
Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Laura Martin
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfKajal Digital
 
Programming language
Programming languageProgramming language
Programming languageShuja Qais
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programmingMukesh Tekwani
 
Top Programming Languages of 2020
Top Programming Languages of 2020Top Programming Languages of 2020
Top Programming Languages of 2020Ikbal Ahmed
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfKajal Digital
 

Similar to Introduction to computer_lec_07_fall_2018_python_lec_101 (20)

Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
 
Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of Java
 
Programming
ProgrammingProgramming
Programming
 
notes on Programming fundamentals
notes on Programming fundamentals notes on Programming fundamentals
notes on Programming fundamentals
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Java
 
Introduction to programming languages part 1
Introduction to programming languages   part 1Introduction to programming languages   part 1
Introduction to programming languages part 1
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming Languages
 
COMPUTER PROGRAMMING 10 WEEK 1.pptx
COMPUTER PROGRAMMING 10 WEEK 1.pptxCOMPUTER PROGRAMMING 10 WEEK 1.pptx
COMPUTER PROGRAMMING 10 WEEK 1.pptx
 
Python Intro Slides for Students CSC-148 Chapter 1
Python Intro Slides for Students CSC-148  Chapter 1Python Intro Slides for Students CSC-148  Chapter 1
Python Intro Slides for Students CSC-148 Chapter 1
 
introduction to programming
introduction to programmingintroduction to programming
introduction to programming
 
Programming languages
Programming languages Programming languages
Programming languages
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdf
 
Programming language
Programming languageProgramming language
Programming language
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
Top Programming Languages of 2020
Top Programming Languages of 2020Top Programming Languages of 2020
Top Programming Languages of 2020
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdf
 

More from Ramadan Babers, PhD

Part10 finance investment limitations of ratio analysis
Part10 finance investment limitations of ratio analysisPart10 finance investment limitations of ratio analysis
Part10 finance investment limitations of ratio analysisRamadan Babers, PhD
 
Part09 finance investment ratio analysis investment ratio
Part09 finance investment ratio analysis investment ratioPart09 finance investment ratio analysis investment ratio
Part09 finance investment ratio analysis investment ratioRamadan Babers, PhD
 
Part08 finance investment ratio analysis solvency ratio
Part08 finance investment ratio analysis solvency ratioPart08 finance investment ratio analysis solvency ratio
Part08 finance investment ratio analysis solvency ratioRamadan Babers, PhD
 
Part07 finance investment ratio analysis profitability ratio
Part07 finance investment ratio analysis profitability ratioPart07 finance investment ratio analysis profitability ratio
Part07 finance investment ratio analysis profitability ratioRamadan Babers, PhD
 
Part06 finance investment ratio analysis efficiency ratio
Part06 finance investment ratio analysis efficiency ratioPart06 finance investment ratio analysis efficiency ratio
Part06 finance investment ratio analysis efficiency ratioRamadan Babers, PhD
 
Part05 finance investment_ratio_analysis_liquidity_ratio_presentation
Part05 finance investment_ratio_analysis_liquidity_ratio_presentationPart05 finance investment_ratio_analysis_liquidity_ratio_presentation
Part05 finance investment_ratio_analysis_liquidity_ratio_presentationRamadan Babers, PhD
 
Part04 finance investment_ratio_analysis_introduction_presentation
Part04 finance investment_ratio_analysis_introduction_presentationPart04 finance investment_ratio_analysis_introduction_presentation
Part04 finance investment_ratio_analysis_introduction_presentationRamadan Babers, PhD
 
Part03 finance investment_financial_statement_analysis_presentation
Part03 finance investment_financial_statement_analysis_presentationPart03 finance investment_financial_statement_analysis_presentation
Part03 finance investment_financial_statement_analysis_presentationRamadan Babers, PhD
 
Part02 finance investment_finance_and_financial_reporting_presentation
Part02 finance investment_finance_and_financial_reporting_presentationPart02 finance investment_finance_and_financial_reporting_presentation
Part02 finance investment_finance_and_financial_reporting_presentationRamadan Babers, PhD
 
Part01 finance investment_basics_presentation
Part01 finance investment_basics_presentationPart01 finance investment_basics_presentation
Part01 finance investment_basics_presentationRamadan Babers, PhD
 
Customer Experience (CX) updated version V9.0
Customer Experience (CX) updated version V9.0Customer Experience (CX) updated version V9.0
Customer Experience (CX) updated version V9.0Ramadan Babers, PhD
 
Classification using decision tree in detail
Classification using decision tree in detailClassification using decision tree in detail
Classification using decision tree in detailRamadan Babers, PhD
 

More from Ramadan Babers, PhD (20)

Part10 finance investment limitations of ratio analysis
Part10 finance investment limitations of ratio analysisPart10 finance investment limitations of ratio analysis
Part10 finance investment limitations of ratio analysis
 
Part09 finance investment ratio analysis investment ratio
Part09 finance investment ratio analysis investment ratioPart09 finance investment ratio analysis investment ratio
Part09 finance investment ratio analysis investment ratio
 
Part08 finance investment ratio analysis solvency ratio
Part08 finance investment ratio analysis solvency ratioPart08 finance investment ratio analysis solvency ratio
Part08 finance investment ratio analysis solvency ratio
 
Part07 finance investment ratio analysis profitability ratio
Part07 finance investment ratio analysis profitability ratioPart07 finance investment ratio analysis profitability ratio
Part07 finance investment ratio analysis profitability ratio
 
Part06 finance investment ratio analysis efficiency ratio
Part06 finance investment ratio analysis efficiency ratioPart06 finance investment ratio analysis efficiency ratio
Part06 finance investment ratio analysis efficiency ratio
 
Part05 finance investment_ratio_analysis_liquidity_ratio_presentation
Part05 finance investment_ratio_analysis_liquidity_ratio_presentationPart05 finance investment_ratio_analysis_liquidity_ratio_presentation
Part05 finance investment_ratio_analysis_liquidity_ratio_presentation
 
Part04 finance investment_ratio_analysis_introduction_presentation
Part04 finance investment_ratio_analysis_introduction_presentationPart04 finance investment_ratio_analysis_introduction_presentation
Part04 finance investment_ratio_analysis_introduction_presentation
 
Part03 finance investment_financial_statement_analysis_presentation
Part03 finance investment_financial_statement_analysis_presentationPart03 finance investment_financial_statement_analysis_presentation
Part03 finance investment_financial_statement_analysis_presentation
 
Part02 finance investment_finance_and_financial_reporting_presentation
Part02 finance investment_finance_and_financial_reporting_presentationPart02 finance investment_finance_and_financial_reporting_presentation
Part02 finance investment_finance_and_financial_reporting_presentation
 
Part01 finance investment_basics_presentation
Part01 finance investment_basics_presentationPart01 finance investment_basics_presentation
Part01 finance investment_basics_presentation
 
Strategic Management part_03_03
Strategic Management part_03_03Strategic Management part_03_03
Strategic Management part_03_03
 
Strategic Management part_02_03
Strategic Management part_02_03Strategic Management part_02_03
Strategic Management part_02_03
 
Strategic Management part_01_03
Strategic Management part_01_03Strategic Management part_01_03
Strategic Management part_01_03
 
Customer Experience (CX) updated version V9.0
Customer Experience (CX) updated version V9.0Customer Experience (CX) updated version V9.0
Customer Experience (CX) updated version V9.0
 
Classification using decision tree in detail
Classification using decision tree in detailClassification using decision tree in detail
Classification using decision tree in detail
 
Customer Experience (CX)
Customer Experience (CX)Customer Experience (CX)
Customer Experience (CX)
 
Python lec 1004_ch02_excercies
Python lec 1004_ch02_excerciesPython lec 1004_ch02_excercies
Python lec 1004_ch02_excercies
 
Python lec 1003_for_biologists
Python lec 1003_for_biologistsPython lec 1003_for_biologists
Python lec 1003_for_biologists
 
Db lec 08_new
Db lec 08_newDb lec 08_new
Db lec 08_new
 
Db lec 07_new
Db lec 07_newDb lec 07_new
Db lec 07_new
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 

Recently uploaded (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
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
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 

Introduction to computer_lec_07_fall_2018_python_lec_101

  • 1. + Dr Ramadan Babers Faculty of Science - Helwan University Fall-2018 Introduction to Computer LEC - 7
  • 3. Chapter 1 Outlines  Introduction  Different ways that people use computers.  How a Program Works  Compilers and Interpreters  Ambiguity  Grammar  Derivation 3
  • 4. 1. Introduction 4 Different ways that people use computers. In school, Students use computers for tasks such as  writing papers,  searching for articles,  sending email, and  participating in online classes.
  • 5. 1. Introduction (Cont.) 5 Different ways that people use computers. At work, People use computers to  analyze data,  make presentations,  conduct business transactions,  communicate with customers,  control machines and  do many other things.
  • 6. 1. Introduction (Cont.) 6 Different ways that people use computers. At home, People use computers for tasks such as  paying bills,  shopping online,  communicating with friends and family, and  playing computer games.
  • 7. 1. Introduction (Cont.) 7 Computers can do such a wide variety of things because they can be programmed. This means that computers are not designed to do just one job, but to do any job that their programs tell them to do. A program is a set of instructions that a computer follows to perform a task
  • 8. 2. How a Program Works 8 CONCEPT:  A computer’s CPU can only understand instructions that are written in machine language.  Because people find it very difficult to write entire programs in machine language, other programming languages have been invented.
  • 9. 2. How a Program Works (Cont.) 9  CPU only understands machine language, it is difficult for people to write programs in machine language.  For this reason, assembly language was created as an alternative to machine language.
  • 10. 2. How a Program Works (Cont.) 10  Assembly language programs cannot be executed by the CPU, however.  The CPU only understands machine language, so a special program known as an assembler is used to translate an assembly language program to a machine language program.
  • 11. 3. Compilers and Interpreters 11  Because the CPU understands only machine language instructions, programs that are written in a high-level language must be translated into machine language.  Depending on the language that a program has been written in, the programmer will use either a compiler or an interpreter to make the translation.
  • 12. 12  Many languages require you to compile (translate) your program into a form that the machine understands.  Python is instead directly interpreted into machine instructions. compile execute outputsource code Hello.java byte code Hello.class interpret outputsource code Hello.py 3. Compilers and Interpreters (Cont.)
  • 14. 3.2 Interpreters 14 The Python language uses an interpreter, which is a program that both translates and executes the instructions in a high-level language program. As the interpreter reads each individual instruction in the program, it converts it to machine language instructions and then immediately executes them.
  • 15. 4. Ambiguity 15  Why Do We Need Programming Language  Can we use natural languages like English?
  • 16. 4. Ambiguity (Quiz) 16  Would you rather be paid $100 weekly or biweekly? o Prefer to be paid $100 weekly. o Prefer to be paid $100 biweekly. o It depends. o Prefer not to be paid at all.
  • 18. 4. Ambiguity (Quiz) 18  Would you rather be paid $100 weekly or biweekly? o Prefer to be paid $100 weekly. o Prefer to be paid $100 biweekly. o It depends. o Prefer not to be paid at all. Different people understand different ways
  • 19. 5. Grammar 19 Noun example: I / Python Verb example: eat / like Noun Verb Sentence Subject Verb Object Noun Noun
  • 20. 6. Derivation 20 Sentence Subject Verb Object Subject Object Verb Verb Noun Noun Noun Noun like eat I Python Non-terminal terminal Noun cookies
  • 21. 6. Derivation (Cont.) 21 Sentence Subject Verb Object Non-terminal terminal Noun like Noun Verb I Object Python Subject Object Verb Verb Noun Noun Noun Noun like eat I Python Derivation: Starting from some non-terminals, follow the roles to derive the sequence of terminals
  • 22. 6. Derivation (Quiz) 22 Sentence Subject Verb Object Which of these sentences can be produced from the following grammar? Starting from Sentence o Python eat cookies o Python eat Python o I like eat o Eat python cookies