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

Python Model

This document outlines the model examination for the Python Programming course at Tiruppur Kumaran College for Women, including multiple-choice questions, descriptive questions, and coding tasks. It covers various topics such as data types, functions, file handling, and exception management in Python. The exam is structured into three sections, with a total of 75 marks and a duration of 3 hours.
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 views2 pages

Python Model

This document outlines the model examination for the Python Programming course at Tiruppur Kumaran College for Women, including multiple-choice questions, descriptive questions, and coding tasks. It covers various topics such as data types, functions, file handling, and exception management in Python. The exam is structured into three sections, with a total of 75 marks and a duration of 3 hours.
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

TIRUPPUR KUMARAN COLLEGE FOR WOMEN

PG & RESEARCH DEPARTMENT OF COMPUTER SCIENCE


MODEL EXAMINATIONS APRIL- 2025
COMPUTER SCIENCE WITH DATA ANALYTICS
PYTHON PROGRAMMING
DATE:

CLASS: II [Link] (CS) DA Max. Marks : 75

SUB CODE: 43A Time: 3 Hrs


SECTION – A

Choose the Correct Answer : (10 *1=10)

1. Which type of Programming does Python support?


a) object-oriented programming b) structured programming
c) functional programming d) all of the mentioned

[Link] Python code compiled or interpreted?


a) Python code is both compiled and interpreted b) Python code is neither compiled

nor interpreted c) Python code is only compiled d) Python code is only interpreted

[Link] will be the value of the following Python expression?


4+3%5
a) 7 b) 2 c) 4 d) 1
4. Which of the following is used to define a block of code in Python language?
a) Indentation b) Key c) Brackets d) All of the mentioned
5. Which keyword is used for function in Python language?
a) Function b) def c) Fun d) Define
[Link] of the following character is used to give single-line comments in Python?
a) // b) # c) ! d) /*

7. What does pip stand for python?


a) Pip Installs Python b) Pip Installs Packages
c) Preferred Installer Program d) All of the mentioned

[Link] will be the output of the following Python program?


def foo(x):
x[0] = ['def']
x[1] = ['abc']
return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
a) Error b) None c) False d) True

9. What is displayed on executing print(math. abs(-3.4))?


a) -3.4 b) 3.4 c) 3 d) -3
10. What will be the output of the following Python code?
x = ['ab', 'cd']
print(list(map(len, x)))
a) [‘ab’, ‘cd’] b) [2, 2] c) [‘2’, ‘2’] d) none of the mentioned
SECTION - B (5*5=25)

Answer the following Questions


1 a)Define the scope and lifetime of a variable in Python. (or)
b)Illustrate interpreter and interactive mode in python with example.
2.a )Write a python script to calculate the average of three numbers. (or)
b). How to declare and call functions in Python programs? Illustrate with an example Script?
3.a )a)Discuss about python modules. Explain with examples. (or)
b)What is the difference between Lists and Tuples? Give an example for their usage
4 a)Write a short note on assert function. (or)
b)Write a small code to illustrate try and except statements in Python
5.a) Explain the following file built-in function and methods with clear syntax, description and
illustration:
a)open() b)file() c)seek() d)tell e)read()
(or)
b) How is polymorphism achieved in python?

SECTION - C (5*8=40)

Answer the following Questions


1. a) Explain the data types in python. (or)
b)Write short notes on types of operators in python with appropriate example
2. a) Briefly explain about function prototypes. (or)
b) Describe the purpose of loop structure in a python programming language.
3. a) What are the basic list operations that can be performed in Python? Explain each operation
with its syntax and example. (or)
b)What is a Dictionary? Explain Python dictionaries in detail discussing its operations and methods.
4.a) Describe about Handling Exceptions in detail with examples. (or)
b) Explain in detail Simple Character Matches & Greedy matches
5) a)Explain in detail about Python Files, its types, functions and operations that can be performed
on files with examples. (or)
b)Examine how python supports regular expressions through 're' module with brief introduction and
various built-in methods related to it?

STAFF - INCHARGE HOD PRINCIPAL

You might also like