CHAITANYA ENGINEERING COLLEGE
Chaitanya Valley, Kommadi, Madhurawada,
Visakhapatnam, Andhra Pradesh. Pincode : 530048
DEPARTMENT OF COMPUTER SCIENCE&ENGINEERING
II [Link] II Semester - R23 Regulation
Branch: CSE
SUBJECT:- PYTHON PROGRAMMING LAB EXTERNAL Date: 02-04-2026
Writeup-20, Execution with Output-30, Viva Voce-20
EXPERIMENTS
1. Write a program to find the largest element among three Numbers.
2. Write a Program to display all prime numbers within an interval
3. Write a program to swap two numbers without using a temporary variable.
4. Demonstrate the following Operators in Python with suitable examples. i) Arithmetic Operators ii)
Relational Operators iii) Assignment Operatorsiv) Logical Operators v) Bit wise Operators vi) Ternary
Operator vii) Membership Operators viii) Identity Operators
5. Write a program to add and multiply complex numbers
6. Write a program to print multiplication table of a given number.
7. Write a program to define a function with multiple return values.
8. Write a program to define a function using default arguments.
9. Write a program to find the length of the string without using any library functions.
10. Write a program to check if the substring is present in a given string or not.
11. Write a program to perform the given operations on a list: i. Addition ii. Insertion iii. slicing
12. Write a program to perform any 5 built-in functions by taking any list.
13. Write a program to create tuples (name, age, address, college) for at least two members and
concatenate the tuples and print the concatenated tuples.
14. Write a program to count the number of vowels in a string (No control flow allowed).
15. Write a program to check if a given key exists in a dictionary or not.
16. Write a program to add a new key-value pair to an existing dictionary.
17. Write a program to sum all the items in a given dictionary.
18. Write a program to sort words in a file and put them in another file. The output file should
have only lower-case words, so any upper-case words from source must be lowered.
19. Python program to print each line of a file in reverse order.
20. P ython program to compute the number of characters, words and lines in a file.
21. Write a program to create, display, append, insert and reverse the order of the items in the
array.
22. Write a program to add, transpose and multiply two matrices.
23. Write a Python program to create a class that represents a shape. Include methods to
calculate its area and perimeter. Implement subclasses for different shapes like circle, triangle,
and square
24. Python program to check whether a JSON string contains complex object or not.
25. Python Program to demonstrate NumPy arrays creation using array () function.
26. Python program to demonstrate use of ndim, shape, size, dtype.
27. Python program to demonstrate basic slicing, integer and Boolean indexing.
28. Python program to find min, max, sum, cumulative sum of array
29. Create a dictionary with at least five keys and each key represent value as a list where this
list contains at least ten values and convert this dictionary as a pandas data frame and explore
the data through the data frame as follows: a) Apply head () function to the pandas data frame
b) Perform various data selection operations on Data Frame
30. Select any two columns from the above data frame, and observe the change in one attribute
with respect to other attribute with scatter and plot operations in matplotlib
INTERNAL EXAMINER EXTERNAL EXAMINER