SlideShare a Scribd company logo
PYTHON
Bikram Nath
Department of Computer Science
New Alipore College
Programming
Introduction
Source Program Machine Language
Compiler
Source Program Output
Interpreter
Output
Intermediate Code
COMPILER
A compiler is a special program that processes statements written in a
particular language and turns them into machine language.
INTERPRETER
An interpreter is a program that translates a programming language
into a comprehensible language
Source to Output
 One of the most widely used User-Friendly programming languages.
 Easy To Learn programming language.
 Python is a High Level language.
 It is a Free and Open Source language.
 Python is portable and platform independent, means it can run on
various operating systems and hardware platforms.
 Python has a Rich Library of Predefined Functions.
Most Application Area
 Machine learning
 Artificial intelligence
 Big Data
 GUI based desktop applications
 Robotics
Why Python ?
Where to Write Python Code ?
1) Interactive mode :
 Writing a python statement on the >>> prompt directly.
 In shell we can run only one command at a time
2) Script mode :
Writing a Python program in a file (“.py” extension), save it and then
use the interpreter to execute it.
When we Run our program, the output will display at shell
Output in python
Program Code Output
Variables IN Python
It is an object or an item or element that is stored in the memory.
Value of a variable can be a string, numeric or any combination of
alphanumeric characters.
Input in python
String input: Str = input(“Enter a string : ”)
Integer input: Val = int( input(“Enter a number : “) )
Float Input: num = float( input(“Enter a float : “) )
A keyword is a word having special meaning reserved by python
programming language
False async del from lambda return
None await elif global nonlocal try
True break else if not while
and class except import or with
as continue finally in pass yield
assert def for is raise
Python Keywords
Python Data Types
Arithmetic Operator
+ (Addition), - (Subtraction), * (Multiplication),
/ (Division), //(Floor Division), %(Remainder),
**(Power)
Relational Operator
> (Greater Than), < (Less Than),
>= (Greater Than or Equal), <= (Less Than or Equal),
== (Equality), != (Not Equality)
Assignment Operator =, +=, -=, *=, /=, //=, %=, **=
Logical Operator and or not
Identity Operator is is not
Membership Operator in not in
Python Operators
MATHEMATICAL OPERATORS IN PYTHON
Addition(+), Subtraction(-), Multiplication(*), Division(/), Modulus(%),
Power of Exponent (**), Rounding off (//)
Python: Strings & Intro Programming PDFs
Python: Strings & Intro Programming PDFs
Built In Functions IN Python
There are some functions in Python which help us to reduce program lines
and effort. Some of the Built-in functions are -
Comment line is usually written in English word to express what the program
or part of a program does.
o It is not a part of code.
o It is used to understand the code easily.
o Compiler does not compile a comment line.
Single line comment : ( # )
Multiline comment : (‘’’ …. ‘’’) or (“”” ….. “””)
* Actually these comment line used in python module
Comment Line IN Python
Thank You

More Related Content

PPTX
PYTHON_VARIABLES_AND_OPERATORS(2022) CSD.pptx
DOCX
A Introduction Book of python For Beginners.docx
PPTX
chapter_5_ppt_em_220247.pptx
PPTX
Introduction to python programming ( part-1)
PPTX
Introduction to Python for Data Science and Machine Learning
PPT
Python programming
PPTX
TN 12 computer Science - ppt CHAPTER-5.pptx
PPTX
Introduction-to-Python-Programming1.pptx
PYTHON_VARIABLES_AND_OPERATORS(2022) CSD.pptx
A Introduction Book of python For Beginners.docx
chapter_5_ppt_em_220247.pptx
Introduction to python programming ( part-1)
Introduction to Python for Data Science and Machine Learning
Python programming
TN 12 computer Science - ppt CHAPTER-5.pptx
Introduction-to-Python-Programming1.pptx

Similar to Python: Strings & Intro Programming PDFs (20)

PDF
Python PPT1.pdf
PDF
Class_X_PYTHON_J.pdf
PPTX
Welcome to python workshop
PPTX
Python Programming for problem solving.pptx
PPTX
Chapter1 python introduction syntax general
PPTX
Advance Python programming languages-Simple Easy learning
PPTX
python-presentationpython-presentationpython-presentation.pptx
PPTX
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
PPTX
lecture 2.pptx
PPTX
Lecture1_introduction to python.pptx
PPTX
PYTHON PPT.pptx
PPT
Py-Slides-1.ppt1234444444444444444444444444444444444444444
PPT
program on python what is python where it was started by whom started
PPT
Python Over View (Python for mobile app Devt)1.ppt
PPT
Python slides for the beginners to learn
PPT
Py-Slides-1.pptPy-Slides-1.pptPy-Slides-1.pptPy-Slides-1.ppt
PDF
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
PPT
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
PDF
Computer Related material named Phython ok
PPTX
Unit -1 CAP.pptx
Python PPT1.pdf
Class_X_PYTHON_J.pdf
Welcome to python workshop
Python Programming for problem solving.pptx
Chapter1 python introduction syntax general
Advance Python programming languages-Simple Easy learning
python-presentationpython-presentationpython-presentation.pptx
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
lecture 2.pptx
Lecture1_introduction to python.pptx
PYTHON PPT.pptx
Py-Slides-1.ppt1234444444444444444444444444444444444444444
program on python what is python where it was started by whom started
Python Over View (Python for mobile app Devt)1.ppt
Python slides for the beginners to learn
Py-Slides-1.pptPy-Slides-1.pptPy-Slides-1.pptPy-Slides-1.ppt
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Computer Related material named Phython ok
Unit -1 CAP.pptx
Ad

More from SohamSaha49 (7)

PPT
CSS 332 : Algorithms - greedy Algorithms
PPT
CS 332 : Algorithms - Concept of NP Completeness
PPT
Iteration ,randomness, and Zero-knowledge
PPT
NFAs which recognize regularl languages.
PDF
Python: Strings & Intro Programming PDFs
PPTX
Pivot Tables summarize complex datasets.
PPTX
Excel Macros automate tasks you do often.
CSS 332 : Algorithms - greedy Algorithms
CS 332 : Algorithms - Concept of NP Completeness
Iteration ,randomness, and Zero-knowledge
NFAs which recognize regularl languages.
Python: Strings & Intro Programming PDFs
Pivot Tables summarize complex datasets.
Excel Macros automate tasks you do often.
Ad

Recently uploaded (20)

PDF
Computing-Curriculum for Schools in Ghana
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
HVAC Specification 2024 according to central public works department
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
1_English_Language_Set_2.pdf probationary
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Computer Architecture Input Output Memory.pptx
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Computing-Curriculum for Schools in Ghana
Practical Manual AGRO-233 Principles and Practices of Natural Farming
History, Philosophy and sociology of education (1).pptx
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Empowerment Technology for Senior High School Guide
HVAC Specification 2024 according to central public works department
Introduction to pro and eukaryotes and differences.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Indian roads congress 037 - 2012 Flexible pavement
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
1_English_Language_Set_2.pdf probationary
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Computer Architecture Input Output Memory.pptx
TNA_Presentation-1-Final(SAVE)) (1).pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf

Python: Strings & Intro Programming PDFs

  • 1. PYTHON Bikram Nath Department of Computer Science New Alipore College Programming Introduction
  • 2. Source Program Machine Language Compiler Source Program Output Interpreter Output Intermediate Code COMPILER A compiler is a special program that processes statements written in a particular language and turns them into machine language. INTERPRETER An interpreter is a program that translates a programming language into a comprehensible language Source to Output
  • 3.  One of the most widely used User-Friendly programming languages.  Easy To Learn programming language.  Python is a High Level language.  It is a Free and Open Source language.  Python is portable and platform independent, means it can run on various operating systems and hardware platforms.  Python has a Rich Library of Predefined Functions. Most Application Area  Machine learning  Artificial intelligence  Big Data  GUI based desktop applications  Robotics Why Python ?
  • 4. Where to Write Python Code ? 1) Interactive mode :  Writing a python statement on the >>> prompt directly.  In shell we can run only one command at a time 2) Script mode : Writing a Python program in a file (“.py” extension), save it and then use the interpreter to execute it. When we Run our program, the output will display at shell
  • 6. Variables IN Python It is an object or an item or element that is stored in the memory. Value of a variable can be a string, numeric or any combination of alphanumeric characters.
  • 7. Input in python String input: Str = input(“Enter a string : ”) Integer input: Val = int( input(“Enter a number : “) ) Float Input: num = float( input(“Enter a float : “) )
  • 8. A keyword is a word having special meaning reserved by python programming language False async del from lambda return None await elif global nonlocal try True break else if not while and class except import or with as continue finally in pass yield assert def for is raise Python Keywords
  • 10. Arithmetic Operator + (Addition), - (Subtraction), * (Multiplication), / (Division), //(Floor Division), %(Remainder), **(Power) Relational Operator > (Greater Than), < (Less Than), >= (Greater Than or Equal), <= (Less Than or Equal), == (Equality), != (Not Equality) Assignment Operator =, +=, -=, *=, /=, //=, %=, **= Logical Operator and or not Identity Operator is is not Membership Operator in not in Python Operators
  • 11. MATHEMATICAL OPERATORS IN PYTHON Addition(+), Subtraction(-), Multiplication(*), Division(/), Modulus(%), Power of Exponent (**), Rounding off (//)
  • 14. Built In Functions IN Python There are some functions in Python which help us to reduce program lines and effort. Some of the Built-in functions are -
  • 15. Comment line is usually written in English word to express what the program or part of a program does. o It is not a part of code. o It is used to understand the code easily. o Compiler does not compile a comment line. Single line comment : ( # ) Multiline comment : (‘’’ …. ‘’’) or (“”” ….. “””) * Actually these comment line used in python module Comment Line IN Python