0% found this document useful (0 votes)
5 views18 pages

Python 1 To 16 No Modify

The document outlines a series of practical Python programming exercises, covering various fundamental concepts such as input/output, operators, conditional statements, loops, and data structures like lists, tuples, sets, and dictionaries. Each practical includes specific tasks to implement, along with example code snippets and expected outputs. Additionally, it addresses user-defined functions and advanced functions like lambda, map, and reduce, culminating in the creation of a user-defined module.

Uploaded by

adityasalgude05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views18 pages

Python 1 To 16 No Modify

The document outlines a series of practical Python programming exercises, covering various fundamental concepts such as input/output, operators, conditional statements, loops, and data structures like lists, tuples, sets, and dictionaries. Each practical includes specific tasks to implement, along with example code snippets and expected outputs. Additionally, it addresses user-defined functions and advanced functions like lambda, map, and reduce, culminating in the creation of a user-defined module.

Uploaded by

adityasalgude05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

PRACTICAL: 2

1.Write python program display welcome message on screen

2. Implement the python program to read data from user and display data on screen.

PRACTICAL: 3
Implement a python programs using following operators:

1. Arithmetic

2. Comparison
3. Assignment
4. Bitwise

5. Membership
PRACTICAL: 4
Implement a python program to demonstrate the use of following conditional statements: if

statement, if..else statement, if..elif..else statement,nested if statement.

PRACTICAL: 5
Implement a python program to demonstrate the use of following looping statements:

1. while loop

CODE:
number = 1

print("Even numbers between 1 and 100 are:")

while number <=100:

if number % 2 == 0:

print(number)

number += 1

OUTPUT:
2. for loop

3. nested loop

CODE:

num = int(input("Enter a value:"))

temp = num

rev = 0

while(num > 0):

dig = num % 10

rev = rev * 10 + dig

num = num // 10

if(temp == rev):

print("This value is a palindrome number!")

else:

print("This value is not a palindrome number!")


OUTPUT:

PRACTICAL: 6

Implement python program to demonstrate the use of loop control statements. [continue,
pass, break, else].

PRACTICAL: 6.1
CODE:

for i in range(5):

if i==3:

break

print(i)
OUTPUT:

PRACTICAL: 6.2
CODE:

x=30

y=29

if x>=y:

print("x is greater than or equals to y")

if x==y:

print("x is equals to y")

else:

print("x is greater than y")

else:

print("x is less than y")


OUTPUT:

PRACTICAL: 7
Implement a python program to perform following operations on the List: Create a List,
Access List

Update List, Delete List.

7.1
7.2

PRACTICAL: 8
Implement Python program to demonstrate the use of built-in functions/methods on List
(AnyEight Functions/methods).

PRACTICAL: 9
Implement python program to perform following operations on the Tuple: Create a Tuple,
AccessTuple, Print Tuple, Delete Tuple, Convert tuple into list and vice-versa.
9.1

9.2

PRACTICAL: 10
Implement a python program to perform following operations on the Set: Create a Set,
Access Set, Update Set, Delete Set.
10.1

10.2

PRACTICAL: 11
Implement a python program to perform following functions on Set: Union, Intersection,
Difference, Symmetric Difference.

PRACTICAL: 12
Implement a python program to perform following operations on the Dictionary: Create a
Dictionary, Access Dictionary, Update Dictionary, Delete Dictionary, Looping through
Dictionary, Create Dictionary from list.

12.1
12.2

12.3

PRACTICAL: 13
Implement user defined function for given problem:
1. Function positional/required argument

2. Function with keyword argument

3. Function with default argument

4. Function with variable length argument

PRACTICAL: 14
Implement user defined function for given problem: Function positional/required
argument, Function with keyword argument, Function with default argument, Function with
variable lengthargument.

14.1
14.2

PRACTICAL: 15
Write Python program to demonstrate use of following advanced functions: lambda, map,
reduce.

15.1

15.2

15.3
PRACTICAL: 16
Write a python program to create and use a user defined module for a given problem.

You might also like