0% found this document useful (0 votes)
28 views4 pages

Advanced JAVA-CAT I

This document outlines the Continuous Assessment Test-I (CAT-I) for B.E/B.Tech students at Mahendra Institute of Technology, focusing on various topics in Python programming and SQL. It includes multiple-choice questions, short answer questions, and detailed questions on subjects such as inheritance, polymorphism, file handling, and GUI programming with Tkinter. The test is structured into three parts with a total duration of 3 hours and a maximum score of 100 marks.

Uploaded by

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

Advanced JAVA-CAT I

This document outlines the Continuous Assessment Test-I (CAT-I) for B.E/B.Tech students at Mahendra Institute of Technology, focusing on various topics in Python programming and SQL. It includes multiple-choice questions, short answer questions, and detailed questions on subjects such as inheritance, polymorphism, file handling, and GUI programming with Tkinter. The test is structured into three parts with a total duration of 3 hours and a maximum score of 100 marks.

Uploaded by

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

Register Number

MAHENDRA INSTITUTE OF TECHNOLOGY


(AUTONOMOUS)
CONTINUOUS ASSESSMENT TEST-I
(CAT-I)

B.E/B.Tech
(Common to all Fifth Semester (Regulations 2022)
Branches)

Duration: 3 Hours Maximum Marks: 100


Answer ALL Questions

PART – A (20x1=20)(One mark questions)


Q.No. I. Choose the best Answer CO# KL
What is the primary role of init() methods in python?
A) To read a file B) To add objects to class
1 CO3 K1
C) To initialize objects of class D) To create new class
Which of the following methods is used to convert the value into string?
A)init() method B) str() method
2 CO3 K1
C) repr() method D) fread() method
Which of the following best describes polymorphism?
A) Ability of a class to derive members of B) Means of bundling instance variables and
another class methods
3 CO3 K1
C) Focuses on variables and passing of D) Allows for objects of different types and
variables to functions behaviour to be treated as the same general
type
Suppose B is a subclass of A, to invoke the __init__ method in A from B, what is the line of
code you should write?
4 A) A.__init__(self) B) B.__init__(self) CO3 K1
C) A.__init__(B) D) B.__init__(A)
Which of the following is used to open a file c:\scores.txt for reading?
A) infile = open(“c:\scores.txt”, “r”) B) infile = open(“c:\\scores.txt”, “r”)
5 CO4 K1
C) infile = open(file = “c:\scores.txt”, “r”) D) infile = open(file = c:\\scores.txt”, “r”)
6 What is the use of seek() method in files? CO4 K1

Page 1 of 4
A) sets the file’s current position at the B) sets the file’s previous position
offset
C) sets the file’s current position within the D) none
file

Which of the following mode will refer to binary data?


7 A)r B) w CO4 K1
C)+ D) b
How many except statements can a try-except block have?
8 A)zero B)one CO4 K1
C)more than two D)more than one
Which of the following is not an exception handling keyword in Python?
9 A) try B) except K1
CO4
C) accept D) finally
What is returned by math.ceil(3.4)?
10 A)3 B)3.0 CO4 K1
C)4 D)4.0
What will be the output of the following Python code?
import datetime
11 d=datetime.date(2016,7,24)
CO4
print(d)
A) Error B) 2017-07-24 K1
C.)2017-7-24 D) 24-7-2017
In file handling, what does this terms means “r, a”?
12 A)read, append B)append, read CO4 K1
C)write, append D) none
What is the full form of SQL?
13 A) Structured Query List B) Structure Query Language CO5 K1
C) Sample Query Language D) None of these.
Which of the following is not a DDL command?
14 A)TRUNCATE B) ALTER CO5 K1
C)CREATE D) UPDATE
Which of the following are TCL commands?
15 A )COMMIT and ROLLBACK B) UPDATE and TRUNCATE K1
CO5
C) SELECT and INSERT D) GRANT and REVOKE
Which of the following is not the widget provided by Tkinter?
16 B) Listbox CO5 K1
A) Label
C) Layout D) Frame
17 _______________ is the standard GUI library in python CO5 K1

18 The _____________ method is used to create main window in Tkinter CO5 K1

19 CO5 K1
In Python context, what does GUI stand for__________________
20 CO5 K1
A command that lets you change one or more field in a table is__________________

PART – B (20x2=40)( Two mark questions)

Page 2 of 4
21 State the difference between Class Attributes and Data Attributes. CO3 K1
22 What is polymorphism? CO3 K1
23 Write the uses of _init_method. CO3 K1
24 Define Aggregation. CO3 K1
25 What are the different file modes in python? CO4 K1
26 What is the purpose of the read() methods in python? CO4 K1
27 Name the different types of exception errors. CO4 K1
28 Write about command line arguments. CO4 K1
29 Write the uses of math module in python CO4
K1
30 What are the file attributes that can be accessed using the OS module? CO4
K1
31 What do you mean by errors? CO4 K1
32 What is Database? CO5 K1
33 Write the SQL Query to create a Table in database. CO5 K1
34 Define SQLite Manager. CO5 K1
35 List the various data manipulation commands in SQL. CO5 K1
36 What do you mean by GUI programming? CO5 K1
37 How to delete a row in table? CO5 K1
38 Write the benefits of Tkinter library. CO5 K1
39 Enlist the advantages of using SQL in python. CO5 K1
40 How do you write a SELECT statement to retrieve data from a table? CO5 K1

PART – C(4x10=40) (10 Marks questions)

41. a) Discuss about the idea of inheritance with suitable python code. CO3 K2
OR

41. b) Explain the concept of polymorphism in python. CO3 K2

Classify the different access modes for opening a file and the present the code
42. a) CO4 K2
for the same.
OR

42. b) Elaborate the Exception handling in python. CO4 K2

43. a) Explain the uses of packages and module with suitable example. CO4 K2

Page 3 of 4
OR
OR
43. b) Illustrate the uses of SQL statements for data manipulation. CO5 K2

44. a) Demonstrate the working process of python in Database. CO5 K2

OR

44. b) Discuss the steps involved in creating simple GUI using Tkinter. CO5 K2

Course co-ordinator HOD

Page 4 of 4

You might also like