Rewa Engineering
College
Rewa (M.P.)
Internship on Python Programming language
Session 2023-24
Submitted by
Prakash tiwari
0301EC211036
Submitted To
Prof. A. K. Singh
Agenda
• Brief History of python
• What is python
• Why python
• Comments
• Variables and data types
• Typecasting in python
• Loops in python
• Functions in python
• Lists in python
• Tuples in python
Brief History of
Python
• Invented in the Netherlands, early 90s by Guido van Rossum
• Named after Monty Python
• Open sourced from the beginning
• Considered a scripting language, but is much more
• Scalable, object oriented and functional from the beginning
• Used by Google from the beginning
• Increasingly popular
What Is Python?
• Python is dynamically typed, General Purpose Language that
supports an object oriented programming as well as a functional
programming approach
• Python is an interpreted and a high level language, It is easy to
learn and it has efficient high level data structure
• Python comes with a large library of standard modules
prakash ppt (2).pdf
Comments
A Comment is the part of coding file that programmer does not want
to execute, rather the programmer uses it to either explain the block
of the code or to avoid the execution of a specific part of code while
testing.
Single line comment
To write a comment just add ‘#’ at the start of the line
Example: # this is a single line comment
Print(“this is a print statement”)
Output: this is a print statement
Multiline comments
• To write a multi line comments we can use # at starting of each line
or we can use the multiline string
• Example:
“““This is an if-else statement.
it will execute a block of code if a specified condition is true.
if the condition is false then it will execute another block of
code. ”””
Variables and Data types
• Variables: Variable is like a container that holds data. Very similar to how our
containers in kitchen holds sugar, salt etc. creating a variable Is like creating a
placeholder in memory and assigning it some value.
for example
a=5678
print(a)
b=“Akash”
print(b)
Output : 5678
Akash
So here a and b are variables and 5678 and Akash are data types
prakash ppt (2).pdf
Typecasting in python
The conversion of one data type into the other data type is known as
typecasting in python or type conversion in python.
Python supports a wide variety of functions or methods like: int(),
float(), str(), ord(), hex() , oct(), tuple(), set(), list(), dict(), etc. for type
casting in python.
Two types of typecasting
1. Explicit typecasting
2. Implicit typecasting
1. Explicit typecasting
The conversion of one datatype into another datatype, done via developer or
programmer’s intervention or manually as per the requirement , is known as
explicit typecasting.
Example: a=“1”
b=“2”
print(int(a) +int(b)) Output : 3
2. Implicit typecasting
According to the level, one data type is converted into other by the python
interpreter itself (automatically) . This is called implicit typecasting.
Example
c=1.9
d=8
Print(c+d) output: 9.9
Loops in python
• Sometimes a programmer wants to execute a group of statements a number of times. This can
be done using loops. Based on this loops are further classified into following types; for loop,
while loop.
For loop
For loop can iterate over a sequence of iterable object in python. Iterating over a sequence is
nothing but iterating over string, list,tuple , sets, dictionaries.
Colors=[“Red”, “Green”, “Blue”, “Yellow”]
for color in colors
Print(color)
Output: Red
Green
Blue
Yellow
While loop
As the name suggest, while loop execute statements while the condition is true.
As soon as the condition becomes false, the interpreter comes out of the while
loop.
Example: count=5
while( count > 0 )
print(count)
count= count-1
Output=5
4
3
2
1
Functions in python
• A function is a block of code that performs a specific task whenever it is
called. In bigger programs where we have large amounts of code , it is
advisable to create or use existing functions that make the program flow
organized and neat.
• There are two types of functions
1. Built-in functions
2.User-defined functions
Built-in functions
These functions are defined and pre-coded in python. Some examples of
built-in functions are as follows:
min(), max(), len(), sum(), type(), range(), dict() , list(), touple(), set(), print()
etc.
• User-defined functions
• We can create functions to perform specific tasks as per our needs. Such
functions are called as user defined functions
• Syntax
def function_name (Parameter) :
pass
• Example:
def calculateAmean( a, b)
mean=(a+b) /2
print(mean)
Lists in python
• Lists are ordered collections of data items.
• They stores multiple items in a single variable.
• List items are separated by commas and enclosed within square brackets.
• List are changeable meaning we can alter them after creation.
Example:
list1=[1, 2,3,4,5,6]
list2=[“Red”, “Green”, “blue”]
print(list1)
print(list2) outputs-[1, 2,3,4,5,6]
[“Red”, “Green”, “blue”]
Tuple in Python
• Tuples are ordered collection of objects. They store multiple items in
a single variable. Tuple items are seperated by commas and enclosed
within round brackets() . Tuples are unchangeable meaning we
cannot alter them after creation.
• Example
tuple1=(1, 2,2,6)
print(tuple1)
Output (1, 2,2,6)
Thank
You

More Related Content

PPTX
Python Seminar PPT
PPTX
Python Introduction
PPTX
cupdf.com_python-seminar-ppt.pptx.........
PDF
python-160403194316.pdf
PPTX
Python
PPTX
python presntation 2.pptx
PPTX
Getting started with the basics of python
PPTX
PYTHON ppt for 2 nd year students very useful
Python Seminar PPT
Python Introduction
cupdf.com_python-seminar-ppt.pptx.........
python-160403194316.pdf
Python
python presntation 2.pptx
Getting started with the basics of python
PYTHON ppt for 2 nd year students very useful

Similar to prakash ppt (2).pdf (20)

PPTX
introduction to python
PDF
Python Programminng…………………………………………………..
PPTX
Python ppt_118.pptx
PPTX
python_harshdfghmgfdfghhdsdfgxvxa[1].pptx
PPTX
Chapter7-Introduction to Python.pptx
PPT
FALLSEM2022-23_ITA3007_ETH_VL2022230100613_Reference_Material_I_23-09-2022_py...
PPTX
python presentation
PPTX
PYTHON INTERNSHIP PPT download free.pptx
PDF
Sessisgytcfgggggggggggggggggggggggggggggggg
PPTX
Python (Data Analysis) cleaning and visualize
PPTX
Basic of Python- Hands on Session
PPTX
Presentation new
PDF
Python: An introduction A summer workshop
PDF
Tutorial on-python-programming
PPTX
INTRODUCTION TO PYTHON.pptx
PPTX
Basic concept of Python.pptx includes design tool, identifier, variables.
PPTX
Python basics
PDF
Python Programming
PPTX
PPT-GIT.pptx
PPTX
Anish PPT-GIT.pptx
introduction to python
Python Programminng…………………………………………………..
Python ppt_118.pptx
python_harshdfghmgfdfghhdsdfgxvxa[1].pptx
Chapter7-Introduction to Python.pptx
FALLSEM2022-23_ITA3007_ETH_VL2022230100613_Reference_Material_I_23-09-2022_py...
python presentation
PYTHON INTERNSHIP PPT download free.pptx
Sessisgytcfgggggggggggggggggggggggggggggggg
Python (Data Analysis) cleaning and visualize
Basic of Python- Hands on Session
Presentation new
Python: An introduction A summer workshop
Tutorial on-python-programming
INTRODUCTION TO PYTHON.pptx
Basic concept of Python.pptx includes design tool, identifier, variables.
Python basics
Python Programming
PPT-GIT.pptx
Anish PPT-GIT.pptx
Ad

Recently uploaded (20)

PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PDF
First part_B-Image Processing - 1 of 2).pdf
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
Computer System Architecture 3rd Edition-M Morris Mano.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Principal presentation for NAAC (1).pptx
PPTX
ai_satellite_crop_management_20250815030350.pptx
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PPTX
Petroleum Refining & Petrochemicals.pptx
PPTX
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PPTX
mechattonicsand iotwith sensor and actuator
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
First part_B-Image Processing - 1 of 2).pdf
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
Computer System Architecture 3rd Edition-M Morris Mano.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Principal presentation for NAAC (1).pptx
ai_satellite_crop_management_20250815030350.pptx
Soil Improvement Techniques Note - Rabbi
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Petroleum Refining & Petrochemicals.pptx
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Amdahl’s law is explained in the above power point presentations
August -2025_Top10 Read_Articles_ijait.pdf
August 2025 - Top 10 Read Articles in Network Security & Its Applications
mechattonicsand iotwith sensor and actuator
Ad

prakash ppt (2).pdf

  • 1. Rewa Engineering College Rewa (M.P.) Internship on Python Programming language Session 2023-24 Submitted by Prakash tiwari 0301EC211036 Submitted To Prof. A. K. Singh
  • 2. Agenda • Brief History of python • What is python • Why python • Comments • Variables and data types • Typecasting in python • Loops in python • Functions in python • Lists in python • Tuples in python
  • 3. Brief History of Python • Invented in the Netherlands, early 90s by Guido van Rossum • Named after Monty Python • Open sourced from the beginning • Considered a scripting language, but is much more • Scalable, object oriented and functional from the beginning • Used by Google from the beginning • Increasingly popular
  • 4. What Is Python? • Python is dynamically typed, General Purpose Language that supports an object oriented programming as well as a functional programming approach • Python is an interpreted and a high level language, It is easy to learn and it has efficient high level data structure • Python comes with a large library of standard modules
  • 6. Comments A Comment is the part of coding file that programmer does not want to execute, rather the programmer uses it to either explain the block of the code or to avoid the execution of a specific part of code while testing. Single line comment To write a comment just add ‘#’ at the start of the line Example: # this is a single line comment Print(“this is a print statement”) Output: this is a print statement
  • 7. Multiline comments • To write a multi line comments we can use # at starting of each line or we can use the multiline string • Example: “““This is an if-else statement. it will execute a block of code if a specified condition is true. if the condition is false then it will execute another block of code. ”””
  • 8. Variables and Data types • Variables: Variable is like a container that holds data. Very similar to how our containers in kitchen holds sugar, salt etc. creating a variable Is like creating a placeholder in memory and assigning it some value. for example a=5678 print(a) b=“Akash” print(b) Output : 5678 Akash So here a and b are variables and 5678 and Akash are data types
  • 10. Typecasting in python The conversion of one data type into the other data type is known as typecasting in python or type conversion in python. Python supports a wide variety of functions or methods like: int(), float(), str(), ord(), hex() , oct(), tuple(), set(), list(), dict(), etc. for type casting in python. Two types of typecasting 1. Explicit typecasting 2. Implicit typecasting
  • 11. 1. Explicit typecasting The conversion of one datatype into another datatype, done via developer or programmer’s intervention or manually as per the requirement , is known as explicit typecasting. Example: a=“1” b=“2” print(int(a) +int(b)) Output : 3 2. Implicit typecasting According to the level, one data type is converted into other by the python interpreter itself (automatically) . This is called implicit typecasting. Example c=1.9 d=8 Print(c+d) output: 9.9
  • 12. Loops in python • Sometimes a programmer wants to execute a group of statements a number of times. This can be done using loops. Based on this loops are further classified into following types; for loop, while loop. For loop For loop can iterate over a sequence of iterable object in python. Iterating over a sequence is nothing but iterating over string, list,tuple , sets, dictionaries. Colors=[“Red”, “Green”, “Blue”, “Yellow”] for color in colors Print(color) Output: Red Green Blue Yellow
  • 13. While loop As the name suggest, while loop execute statements while the condition is true. As soon as the condition becomes false, the interpreter comes out of the while loop. Example: count=5 while( count > 0 ) print(count) count= count-1 Output=5 4 3 2 1
  • 14. Functions in python • A function is a block of code that performs a specific task whenever it is called. In bigger programs where we have large amounts of code , it is advisable to create or use existing functions that make the program flow organized and neat. • There are two types of functions 1. Built-in functions 2.User-defined functions Built-in functions These functions are defined and pre-coded in python. Some examples of built-in functions are as follows: min(), max(), len(), sum(), type(), range(), dict() , list(), touple(), set(), print() etc.
  • 15. • User-defined functions • We can create functions to perform specific tasks as per our needs. Such functions are called as user defined functions • Syntax def function_name (Parameter) : pass • Example: def calculateAmean( a, b) mean=(a+b) /2 print(mean)
  • 16. Lists in python • Lists are ordered collections of data items. • They stores multiple items in a single variable. • List items are separated by commas and enclosed within square brackets. • List are changeable meaning we can alter them after creation. Example: list1=[1, 2,3,4,5,6] list2=[“Red”, “Green”, “blue”] print(list1) print(list2) outputs-[1, 2,3,4,5,6] [“Red”, “Green”, “blue”]
  • 17. Tuple in Python • Tuples are ordered collection of objects. They store multiple items in a single variable. Tuple items are seperated by commas and enclosed within round brackets() . Tuples are unchangeable meaning we cannot alter them after creation. • Example tuple1=(1, 2,2,6) print(tuple1) Output (1, 2,2,6)