1 2
LOYOLA COLLEGE OF ARTS & SCIENCE, METTALA 9. Which function is used to open a file in Python?
DEPARTMENT OF COMPUTER APPLICATIONS a) fopen() b) read()
CONTINUOUS INTERNAL ASSESSMENT - I c) open() d) file()
OCTOBER - 2025 10. Which method returns the current position of the file cursor?
Class: I BCA Semester: I Duration: 2.30 Hours a) seek() b) tell() c) position() d) cursor()
Date: 24.10.2025
Paper Code: 23UCA01 Max. Marks: 60
Session: FN Section – B
Paper Title: PYTHON PROGRAMMING Answer any Two of the following Questions. 2 X 5 = 10
11. Illustrate the Function Arguments.
Section – A 12. Explain about Creating, Accessing & Updating List in Python.
13. Narrate the string operations. With Example
Choose the Correct Answer. 10 X 1 = 10 14. Demonstrate the advantages and disadvantages of File Handling in
1. What What keyword is used to define a function Python.
keyword is in Python?
used to Section – C
define a
function in Answer all the following Questions. 4 X 10 = 40
Python? 15. a) Compare local and global variables in Python. Discuss
a) function b) def c) lambda d) define advantages and disadvantages of using global variables.
2. Which type of variable is accessible only inside the function it is (OR)
declared? b) Write a Python program using functions to check whether a given
a) Global b) Local c) Built-in d) Module string is a palindrome.
3. Which Python statement is used to access specific functions from a 16. a) Discuss the key differences between text files and binary files in
module? Python.
a) from…import b) import * c) require d) include (OR)
4. What symbol at the beginning of a variable/function name indicates b) Write a Python program to find the smallest of three numbers
it is private in a module? entered by the user.
a) # b) $ c) _ d) @ 17. a) Examine the differences between recursion and iteration and
5. Which method removes all elements from a dictionary? justify when recursion is preferred.
a) pop() b) clear() c) delete() d) remove() (OR)
6. Which method returns a list of all keys in a dictionary? b) Write a Python program to print all even numbers between 1 and
a) values() b) items() 50 using a loop.
c) keys() d) get() 18. a) Outline the benefits and drawbacks of immutable strings in
7. Which method returns a copy of the dictionary? Python and justify their impact on memory and performance.
a) replicate() b) duplicate() c) clone() d) copy() (OR)
8. Which method returns a list of key-value pairs as tuples? b) Classify the various file opening modes in Python and summarize
a) keys() b) values() c) items() d) pairs() their purposes with examples.
2 2
Question Paper Setter HOD COE Principal