Introduction to Python Programming (BPLCK205B) Question Bank – Module 3
MODULE - 3
Manipulating Strings, Reading and Writing Files
Q. No. Questions COs CL Marks
1 Explain join( ) and split( ) method with examples. CO3 L2 8M
(Jan/Feb 2023)
2 Explain with examples: i) isalpha( ) ii) isalnum( ) iii) isspace( ). CO3 L2 6M
(Jan/Feb 2023)
3 Develop a python code to determine whether the given string is a CO3 L3 6M
palindrome or not a palindrome.
(Jan/Feb 2023)
4 Explain the concept of file handling. Also explain reading and CO3 L2 8M
writing process with suitable example.
(Jan/Feb 2023) (Dec 2023/Jan 2024)
5 Explain the concept of file path. Also discuss absolute and relative CO3 L2 6M
file path.
(Jan/Feb 2023) (Dec 2023/Jan 2024)
6 Briefly explain saving variable with shelve module. CO3 L3 6M
(Jan/Feb 2023)(June/July 2024) (Dec 2023/Jan 2024)
7 Illustrate with example opening of a file with open( ) function, CO3 L2 10M
reading the contents of the file with read( ) and writing to files with
write( ).
(June/July 2024) (June/July 2023)
8 Explain the following string methods with examples CO3 L2 10M
i. isalpha( )
ii. isalnum( )
iii. isdecimal( )
iv. isspace( )
v. istitle( )
(June/July 2024)
Department of AI & ML, Vemana IT Prepared by: Ms. Srujani J Page 1 of 2
Introduction to Python Programming (BPLCK205B) Question Bank – Module 3
9 Explain about in and not in operators in string. CO3 L2 5M
(June/July 2024)
10 Explain about pyperclip module. CO3 L2 5M
(June/July 2024)
11 Explain the following methods with suitable examples: CO3 L2 8M
i) upper( ) ii) lower( ) iii) is_upper iv) is_lower( )
(June/July 2023)
12 Explain the steps involved in adding bullets to wiki-markup. Support CO3 L2 10M
with appropriate code.
(June/July 2023)
13 Develop a program to sort the contents of a text file and write the CO3 L3 10M
sorted contents into a separate text file. [use strip( ), len( ), list
methods sort( ), append and file methods open( ), readlines( ) and
write( )].
(June/July 2023)
14 Write the output of the following: CO3 L2 6M
i. ‘HeLLo’.upper( ).isupper( )
ii. ‘HeLLo’.upper( ).lower( )
iii. ‘__’.join(‘there can be only one’.split( ))
(Dec 2023/Jan 2024)
15 With examples, explain any five string methods. CO3 L2 6M
(Dec 2023/Jan 2024) (June/July 2024)
16 Develop a python program to count the total number of vowels, CO3 L3 8M
consonants in a string.
(Dec 2023/Jan 2024)
17 Explain how individual elements of a string are accessed. How to CO3 L3 10M
extract a part of a string? Explain with examples.
(June/July 2024)
18 Explain any 5 methods in [Link] module related to files. CO3 L2 10M
(June/July 2024)
19 Explain file reading and writing process with example. CO3 L3 10M
(June/July 2024)
Course Faculty
(Ms. Srujani J)
Department of AI & ML, Vemana IT Prepared by: Ms. Srujani J Page 2 of 2