SlideShare a Scribd company logo
Python
Programming
By Nikhil Agarwal
Familiarization
with the Basics
of Python
Programming
Introduction to
Python
Agenda
Today's Topics:
Introduction to
Python
Features of
Python
Executing a
Simple “Hello
World” Program
Execution
Modes
(Interactive and
Script Mode)
Python
Character Set
and Tokens
Variables, L-
value and R-
value,
Comments
Introduction to
Python
What is Python?
Python is a high-level, interpreted programming
language known for its simplicity and readability. It
is widely used in web development, data analysis,
artificial intelligence, scientific computing, and
more.
Introduction to
Python
History:
• Created by Guido van Rossum and first
released in 1991.
• Named after "Monty Python's Flying Circus" - a
popular British sketch comedy show.
Python ppt introduction by Radhe Nikhil A
Features of Python
Easy to Learn and Use: Python has a simple syntax that is easy to read and write.
Interpreted Language: Python code is executed line by line, making debugging
easier.
Object-Oriented: Supports OOP concepts like classes and objects.
Extensive Libraries: Comes with a rich set of libraries and frameworks.
Cross-Platform: Runs on various operating systems like Windows, macOS, Linux.
Executing a Simple “Hello World”
Program
Writing Your First Program:
• Open your Python environment (IDLE, Anaconda, or any code
editor).
• Type the following code:
• print("Hello, World!")
• Run the program to see the output.
Explanation:
• The print() function outputs text to the console.
Execution Modes
Interactive Mode:
• Used for executing single lines or blocks of code.
• Open Python shell and type commands directly.
Script Mode:
• Used for executing entire scripts (files with .py extension).
• Write your code in a file and run it using a command line or an
IDE.
Python Character Set
Python uses the
Unicode
character set.
Characters
include letters,
digits,
punctuation
marks, and other
symbols.
Python Tokens
Keywords: Reserved words with special meaning (e.g., if, else,
while).
Identifiers: Names given to variables, functions, classes, etc.
Literals: Fixed values (e.g., numbers, strings).
Operators: Symbols that perform operations (e.g., +, -).
Delimiters: Symbols that separate code elements (e.g., (, ), {, }).
Variables
• Variables are containers for storing data values.
• In Python, variables do not need explicit declaration to reserve memory space. The
declaration happens automatically when you assign a value to a variable.
Variable Naming Rules:
• Must start with a letter or an underscore.
• Cannot start with a number.
• Can only contain alphanumeric characters and underscores.
• Case-sensitive (e.g., age and Age are different).
L-value and R-value
• L-value (Locator Value): Refers to the memory location of a variable.
• R-value (Right-hand Value): Refers to the actual data value stored in a
variable.
Example:
x = 5
• Here, x is the L-value as it refers to the memory location.
• 5 is the R-value as it is the data stored in that memory location.
Important Points:
• L-value can appear on both left and right-hand side of an assignment.
• R-value can only appear on the right-hand side of an assignment.
Comments
What are Comments?
• Comments are annotations in the code that are not executed
by the interpreter.
• Used to explain code and make it more readable for others.
Types of Comments:
• Single-line Comments: Start with a # symbol.
• # This is a single-line comment
• x = 5 # This is an inline comment
• Multi-line Comments: Enclosed within triple quotes (''' or
""").
• '''
• This is a
• multi-line comment
'''

More Related Content

PPTX
lecture 1 intr python by Radhe NIkHIL Agarwal
PPTX
presentation_python_7_1569170870_375360.pptx
PPTX
Chapter7-Introduction to Python.pptx
PPTX
introduction to python
PPTX
Introduction-to-Python-Programming1.pptx
PPTX
Session-1_Introduction to Python.pptx
PPTX
Chapter 1-Introduction and syntax of python programming.pptx
PPTX
Python Demo.pptx
lecture 1 intr python by Radhe NIkHIL Agarwal
presentation_python_7_1569170870_375360.pptx
Chapter7-Introduction to Python.pptx
introduction to python
Introduction-to-Python-Programming1.pptx
Session-1_Introduction to Python.pptx
Chapter 1-Introduction and syntax of python programming.pptx
Python Demo.pptx

Similar to Python ppt introduction by Radhe Nikhil A (20)

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
PPTX
Python Demo.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
PDF
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
PPTX
Python 01.pptx
PDF
kecs105.pdf
PPTX
Python Programming 1.pptx
PPTX
BASICS OF PYTHON usefull for the student who would like to learn on their own
PDF
Stu_Unit1_CSE1.pdf
PPTX
python_class.pptx
PDF
Python basic programing language for automation
PPTX
Introduction to learn and Python Interpreter
PDF
Unit 1-Part-1-Introduction to Python.pdf
PPTX
A Brief Introduction to Python - English
PDF
Python Programing Bio computing,basic concepts lab,,
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
Python Demo.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
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
Python 01.pptx
kecs105.pdf
Python Programming 1.pptx
BASICS OF PYTHON usefull for the student who would like to learn on their own
Stu_Unit1_CSE1.pdf
python_class.pptx
Python basic programing language for automation
Introduction to learn and Python Interpreter
Unit 1-Part-1-Introduction to Python.pdf
A Brief Introduction to Python - English
Python Programing Bio computing,basic concepts lab,,
Ad

Recently uploaded (20)

PDF
Introduction to Data Science and Data Analysis
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
New ISO 27001_2022 standard and the changes
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PDF
annual-report-2024-2025 original latest.
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
PPTX
modul_python (1).pptx for professional and student
PPTX
Pilar Kemerdekaan dan Identi Bangsa.pptx
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PPTX
Managing Community Partner Relationships
PDF
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
PDF
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
PDF
Microsoft Core Cloud Services powerpoint
PDF
How to run a consulting project- client discovery
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Introduction to Inferential Statistics.pptx
PDF
Data Engineering Interview Questions & Answers Batch Processing (Spark, Hadoo...
PDF
[EN] Industrial Machine Downtime Prediction
PPTX
CYBER SECURITY the Next Warefare Tactics
PPTX
SAP 2 completion done . PRESENTATION.pptx
Introduction to Data Science and Data Analysis
ISS -ESG Data flows What is ESG and HowHow
New ISO 27001_2022 standard and the changes
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
annual-report-2024-2025 original latest.
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
modul_python (1).pptx for professional and student
Pilar Kemerdekaan dan Identi Bangsa.pptx
STERILIZATION AND DISINFECTION-1.ppthhhbx
Managing Community Partner Relationships
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
Microsoft Core Cloud Services powerpoint
How to run a consulting project- client discovery
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Introduction to Inferential Statistics.pptx
Data Engineering Interview Questions & Answers Batch Processing (Spark, Hadoo...
[EN] Industrial Machine Downtime Prediction
CYBER SECURITY the Next Warefare Tactics
SAP 2 completion done . PRESENTATION.pptx
Ad

Python ppt introduction by Radhe Nikhil A

  • 2. Familiarization with the Basics of Python Programming Introduction to Python
  • 3. Agenda Today's Topics: Introduction to Python Features of Python Executing a Simple “Hello World” Program Execution Modes (Interactive and Script Mode) Python Character Set and Tokens Variables, L- value and R- value, Comments
  • 4. Introduction to Python What is Python? Python is a high-level, interpreted programming language known for its simplicity and readability. It is widely used in web development, data analysis, artificial intelligence, scientific computing, and more.
  • 5. Introduction to Python History: • Created by Guido van Rossum and first released in 1991. • Named after "Monty Python's Flying Circus" - a popular British sketch comedy show.
  • 7. Features of Python Easy to Learn and Use: Python has a simple syntax that is easy to read and write. Interpreted Language: Python code is executed line by line, making debugging easier. Object-Oriented: Supports OOP concepts like classes and objects. Extensive Libraries: Comes with a rich set of libraries and frameworks. Cross-Platform: Runs on various operating systems like Windows, macOS, Linux.
  • 8. Executing a Simple “Hello World” Program Writing Your First Program: • Open your Python environment (IDLE, Anaconda, or any code editor). • Type the following code: • print("Hello, World!") • Run the program to see the output. Explanation: • The print() function outputs text to the console.
  • 9. Execution Modes Interactive Mode: • Used for executing single lines or blocks of code. • Open Python shell and type commands directly. Script Mode: • Used for executing entire scripts (files with .py extension). • Write your code in a file and run it using a command line or an IDE.
  • 10. Python Character Set Python uses the Unicode character set. Characters include letters, digits, punctuation marks, and other symbols.
  • 11. Python Tokens Keywords: Reserved words with special meaning (e.g., if, else, while). Identifiers: Names given to variables, functions, classes, etc. Literals: Fixed values (e.g., numbers, strings). Operators: Symbols that perform operations (e.g., +, -). Delimiters: Symbols that separate code elements (e.g., (, ), {, }).
  • 12. Variables • Variables are containers for storing data values. • In Python, variables do not need explicit declaration to reserve memory space. The declaration happens automatically when you assign a value to a variable. Variable Naming Rules: • Must start with a letter or an underscore. • Cannot start with a number. • Can only contain alphanumeric characters and underscores. • Case-sensitive (e.g., age and Age are different).
  • 13. L-value and R-value • L-value (Locator Value): Refers to the memory location of a variable. • R-value (Right-hand Value): Refers to the actual data value stored in a variable. Example: x = 5 • Here, x is the L-value as it refers to the memory location. • 5 is the R-value as it is the data stored in that memory location. Important Points: • L-value can appear on both left and right-hand side of an assignment. • R-value can only appear on the right-hand side of an assignment.
  • 14. Comments What are Comments? • Comments are annotations in the code that are not executed by the interpreter. • Used to explain code and make it more readable for others. Types of Comments: • Single-line Comments: Start with a # symbol. • # This is a single-line comment • x = 5 # This is an inline comment • Multi-line Comments: Enclosed within triple quotes (''' or """). • ''' • This is a • multi-line comment '''