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

Internal Qs

Uploaded by

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

Internal Qs

Uploaded by

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

SRK INSTITUTE OF TECHNOLOGY

Enikepadu, Vijayawada 521108


Approved by AICTE, Affiliated to JNTUK, Kakinada
(ISO 9001:2015 Certified Institution)
Department of Computer Science and Engineering
Data Science (CSD) SRKIT / CSD/ 10.1
Python Programming Lab
Academic Year: 2024-2025 Class: II Semester: I

SET 1
1 A. Demonstrate the following Operators in Python with suitable examples vi) Ternary
Operator vii) Membership Operators viii) Identity Operators
2. Python program to compute the number of characters, words and lines in a file.

SET 2

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


2. 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.

SET 3

1. Write a Program to display all prime numbers within an interval


2. Write a program to add a new key-value pair to an existing dictionary.
3. Write a program to check if the substring is present in a given string or not.

SET 4

1. Write a program to swap two numbers without using a temporary variable.


2. Write a program to add and multiply complex numbers
3. Python program to demonstrate use of ndim, shape, size, dtype.

SET 5

1.Demonstrate the following Operators in Python with suitable examples.


i) Arithmetic Operators ii) Relational Operators iii) Assignment Operatorsiv) Logical
Operators v) Bit wise Operators

2.Python program to print each line of a file in reverse order.


SRK INSTITUTE OF TECHNOLOGY
Enikepadu, Vijayawada 521108
Approved by AICTE, Affiliated to JNTUK, Kakinada
(ISO 9001:2015 Certified Institution)
Department of Computer Science and Engineering
Data Science (CSD) SRKIT / CSD/ 10.1
Python Programming Lab
Academic Year: 2024-2025 Class: II Semester: I

SET 6

1. Write a program to create, display, append, insert and reverse the order of the
items in the array.
2. Write a program to perform the given operations on a list:
a. Addition ii. Insertion iii. Slicing

SET 7

1. Write a program to define a function with multiple return values.


2. Python program to check whether a JSON string contains complex object or not.

SET 8
1.Write a program to define a function using default arguments.
2. Write a program to create tuples (name, age, address, college) for at least two
members and concatenate the tuples and print the concatenated tuples.

SET 9

1. Write a program to count the number of vowels in a string (No control flow allowed).
2. Write a program to create, display, append, insert and reverse the order of the items
in the array.

SET 10

1.Write a program to check if a given key exists in a dictionary or not.


SRK INSTITUTE OF TECHNOLOGY
Enikepadu, Vijayawada 521108
Approved by AICTE, Affiliated to JNTUK, Kakinada
(ISO 9001:2015 Certified Institution)
Department of Computer Science and Engineering
Data Science (CSD) SRKIT / CSD/ 10.1
Python Programming Lab
Academic Year: 2024-2025 Class: II Semester: I

2. Python Program to demonstrate NumPy arrays creation using array () function.

SET 11

1. Write a program to sum all the items in a given dictionary.


2. Python program to demonstrate basic slicing, integer and Boolean indexing.

SET 12

1. Write a program to print multiplication table of a given number.


2. Write a program to add, transpose and multiply two matrices.

SET 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.

You might also like