DEEPAK PYTHONFile1
DEEPAK PYTHONFile1
DEEPAK PYTHONFile1
PRACTICAL FILE
(MAY 2024)
SUBMITTED BY:
DEEPAK YADAV
ENROLLMENT NO.
01913401922
1
ACKNOWLEDGEMENT
It has been a great challenge but a plenty of learning and opportunities to gain a huge
amount of knowledge on the way of preparing this file. I could not have completed
my work without the constant guidance of Dr. Parminder Kaur, my faculty, who
helped me along the way and was always prepared to give me feedback and
guidelines whenever I needed it.
DEEPAK YADAV
Enroll no.:01913401922
2
CERTIFICATE
3
PYTHON
PROGRAMING
INTRODUCTION
4
INDEX: - Python Programming
i. Slicing
ii. Membership
iii. Capitalize
iv. Lower and upper
v. Isdigit
vi. Split
vii. Startwith() and Endwith()
i. Count
ii. Index
iii. Len
iv. Min and max
v. +&*
i. Get
ii. Update
iii. Copy
iv. Delete
5
v. clear
i. Required argument
ii. Keyword argument
iii. Default argument
iv. Variable length or arbitrary argument
i. Renaming
ii. From…
iii. Dir( )
iv. Platform
i. random( )
ii. randint( )
iii. randrange( )
iv. randchoice( )
• Program on Array
6
• Enter two numbers and perform swapping.
Syntax:
Output:
7
Output:
Syntax:
Output:
8
OR (|)
Syntax:
Output:
NOT (~)
Syntax:
Output:
9
• Show the working of break and continue statement.
BREAK
Syntax:
Output:
10
CONTINUE
Syntax:
Output:
11
• Input any number from user and check it is Even no. or not.
Syntax:
Output:
Syntax:
12
Output:
Output:
II. Membership
Syntax:
13
Output:
III. Capitalize
Syntax:
Output:
14
IV. Uppercase and lowercase
UPPERCASE
Syntax:
Output:
lowercase
Syntax:
Output:
15
V. Isdigit
Syntax:
Output:
VI. Split
Syntax:
16
Output:
Syntax:
Output:
17
Mutable and
Immutable Object
18
• Perform following with list
i. Append
Syntax:
Output:
ii. Count
Syntax:
Output:
19
iii. Remove
Syntax:
Output:
iv. Pop
Syntax:
Output:
20
v. Sort
Syntax:
Output:
vi. Reverse
Syntax:
Output:
21
• Perform following with tuples
i. Count
Syntax:
Output:
ii. Index
Syntex:
Output:
22
iii. Length
Syntax:
Output:
Syntax:
Output:
23
v. +&*
Syntax:
Output:
24
Output:
ii. Update
Syntax:
Output:
iii. Copy
Syntax:
25
Output:
iv. Delete
Syntax:
Output:
26
v. Clear
Syntax:
Output:
Output:
27
Concept of function
28
• Create parameterized function in python and show the
basic functionality with function.
Syntax:
Output:
29
Output:
Output:
30
• Create function and perform Function argument.
i. Required Argument
Syntax:
Output:
Output:
31
iii. Default Argument
Syntax:
Output:
Output:
32
• Create Module and import module with basic
functionality.
i. Renaming
ii. From…
iii. Dir( )
iv. Platform
Syntax:
33
Output:
34
Output:
35
Output:
Syntax:
Output:
36
Object Oriented
Programming
37
• Program with classes and object.
Syntax:
Output:
38
• Program on numPy.
Syntax:
Output:
39
• Program on Array.
Syntax:
Output:
40
THANK
YOU
41