Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

python

The document outlines the external lab examination for the Python Programming Lab at St. Ann’s College of Engineering and Technology for the academic year 2024-2025. It includes a series of programming tasks covering various Python concepts such as operators, functions, string manipulation, file handling, and data structures. Additionally, it involves practical applications of libraries like NumPy and pandas, as well as data visualization using matplotlib.

Uploaded by

Praveen Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

python

The document outlines the external lab examination for the Python Programming Lab at St. Ann’s College of Engineering and Technology for the academic year 2024-2025. It includes a series of programming tasks covering various Python concepts such as operators, functions, string manipulation, file handling, and data structures. Additionally, it involves practical applications of libraries like NumPy and pandas, as well as data visualization using matplotlib.

Uploaded by

Praveen Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

St.

Ann’s College of Engineering and Technology: Chirala


Department of Computer Science and Engineering
External Lab Examination
PYTHON PROGRAMMING LAB
Year/SEM: II – I SEM Date:11-11-2024
Academic Year: 2024-2025 Sec:A,B&C

1. a) Write a program to find the largest element among three Numbers.


b)Write a Program to display all prime numbers within an interval
2. Demonstrate the following Operators in Python with suitable examples.
i)Arithmetic Operators ii) RelationalOperators iii)AssignmentOperators
iv) Logical Operators v) Bit wise Operators vi) Ternary Operator
vii) Membership Operators viii) Identity Operators
3.a)Write a program to swap two numbers without using a temporary variable.
b)Write a program to add and multiply complex numbers.
4.a)Write a program to define a function with multiple return values.
b)Write a program to define a function using default arguments.
5.a)Write a program to find the length of the string without using any library
functions.
b)Write a program to check if the substring is present in a given string or not.
6.a) Write a program to print multiplication table of a given number.
b)Write a program to perform the given operations on a list:
Addition ii. Insertion iii. Slicing
7.a)Write a program to perform any 5 built-in functions by taking any list.
b)Write a program to create tuples (name, age, address, college) for at least
two members and concatenate the tuples and print the concatenated tuples.
8.a)Write a program to count the number of vowels in a string (No control flow
allowed).
b)Write a program to check if a given key exists in a dictionary or not.
9.a)Write a program to add a new key-value pair to an existing dictionary.
b)Write a program to sum all the items in a given dictionary.
10.a)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.
b)Python program to print each line of a file in reverse order.
11.a)Python program to compute the number of characters, words and lines in a
file.
b)Write a program to create, display, append, insert and reverse the
order of the items in the array.
12.Write a program to add, transpose and multiply two matrices
13.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.
a)Python program to check whether a JSON string contains complex object or not.
b)Python Program to demonstrate NumPy arrays creation using array () function.
a)Python program to demonstrate use of ndim, shape, size, dtype.
b)Python program to demonstrate basic slicing, integer and Boolean indexing
16.a)Python program to find min, max, sum, cumulative sum of array
b)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:
i)Apply head () function to the pandas data frame
ii)Perform various data selection operations on Data Frame
17.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

HOD

You might also like