0% found this document useful (0 votes)
3 views2 pages

Python Module 4

This document is a question bank for the Python Programming course at Bapuji Institute of Engineering and Technology. It includes a series of questions covering file handling, user-defined modules, and data types in Python, along with programming tasks. Each question is associated with course outcomes and levels of cognitive skills required for answering them.

Uploaded by

krohitv5
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)
3 views2 pages

Python Module 4

This document is a question bank for the Python Programming course at Bapuji Institute of Engineering and Technology. It includes a series of questions covering file handling, user-defined modules, and data types in Python, along with programming tasks. Each question is associated with course outcomes and levels of cognitive skills required for answering them.

Uploaded by

krohitv5
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

Bapuji Educational Association ®

Bapuji Institute of Engineering and Technology, Davangere – 577 004

VTU Affiliated Autonomous Institute

Common to All Branches

-MODULE 4- QUESTION BANK


Course Title/Type/Category Python Programming (Integrated, PLC) Course Code BCSPLC215P

Course Coordinator Semester/Section 2nd

Mar
[Link]. Questions COs RBT
ks

Chapter 7.1-7.8

Define a file in Python. Explain different file opening modes with suitable
1 6 CO4 L2
examples.

Explain the functions read(), readline(), and readlines() used in file handling
2 6 CO4 L2
with examples.

3 How can a file be read line-by-line in Python? Illustrate with a suitable program. 6 CO4 L2

Explain how to convert the contents of a file into a list of lines in Python with an
4 6 CO4 L2
example.

Explain how Python accesses files stored in different directories using file paths
5 6 CO4 L2
with suitable examples.

Differentiate between text files and binary files in Python with suitable
6 6 CO4 L2
examples.

Write a Python program to count the number of lines present in a text file.
7 6 CO4 L3
Explain the program with suitable output.

8 Write a Python program to display only the even-numbered lines from a text file. 6 CO4 L3

Chapter 8.1- 8.4

Explain the steps involved in creating a user-defined module in Python. Illustrate


9 6 CO4 L2
with a suitable example program.

Explain how the time module is used to measure and compare the execution time
10 6 CO4 L2
of programs in Python with a suitable example

Write a Python program to fetch and display data from a webpage using the
11 6 CO4 L3
urllib and request module.

12 Explain mutable, immutable data types and aliasing in Python with suitable 6 CO4 L2
Bapuji Educational Association ®

Bapuji Institute of Engineering and Technology, Davangere – 577 004

VTU Affiliated Autonomous Institute

Common to All Branches

Mar
[Link]. Questions COs RBT
ks

examples.

Write a Python program using the random module to simulate the rolling of a
13 6 CO4 L3
dice.

Write a Python program using the time module to display the current system
14 6 CO4 L3
time.

Course Instructor Course Co-ordinator Co-ordinator-DAAC Program Co-ordinator

You might also like