12Cs Halfyearly2024
12Cs Halfyearly2024
Register No
Time:3.00 Hrs. COMPUTERSCIENCE Marks: 70
PART - A
CHOOSE THE BEST ANSWER. 15 x 1= 15
1. Which of the following carries out the instructions defined in the interface?
a) Operating System b) Compiler c) Implementation d) Interpreter
2. Which of the following is constructed by placing expressions within square brackets?
a) Tuples b) Lists c) Classes d) quadrats
3. Which of the following members of a class can be handled only from within the class?
a) Public members b)Protected members c) Secured menbers d) Private members
4 In dynamic programming, the technique of storing the previously calculated value is called
a) Saving value property b)Storing value property c) Memorization d)Mapping
5 Which of the following character is used to give comments in Python Program?
a) # b)&c) @ d) $
6. Which amongst this is not jump statement?
a) for b) continue c) pass d) break
7. Which of the following keyword is used to define the function testpython():?
a) define b) pass c) def d) while
8. Which of the following formatting character is used to print exponential
notation in upper case?
a) %e b) %E c) %g d) %n
9 Which of the following Python function can be used to add more than one
element within an existing list?
a) append() b) append_more() c) extend() d) more()
10. Functions defined inside a class:
a) Functions b) Module c) Methods d) Section
11. Which ofthe following is an RDBMS?
a) Dbase b) Foxpro c) MS-Access d) MS-Excel
12. Which command lets to change the structure of the table?
a) SELECT b)ORDER BY c) MODIFY d) ALTER
13. The command used to skip a row in a CSV file is
a) next() b) skip() c) omit() d) bounce()
14. Which of the following can be used for processing text, numbers,
images and scientific data?
a) HTML b) C c) C++ d) PYTHON
15. The most commonly used statement in SQL is
a) cursor b)select c) execute d) commit
PART -B
ANSWERANY SIX QUESTIONS. Q.NO.24 IS COMPULSORY. 6 x 2 = 12
16. How willyou installMatplotlib?
17. Write the command to populate record in a table. Give an example.
18. What is the use of cd command. Give an example.
19. Differentiate Unique and Primary Key constraint.
12 Computer Science -1
20. What is instantiation?
21. How willyou access the list elements in reverse order?
22. Do you modifyastring in Python?
23. Explain Ternary operator with examples.
24. Write anote on range() in for loop.
PART -C
ANSWER ANY SIX QUESTIONS. Q.NO.33 IS COMPULSORY. 6x 3 = 18
25. Why strlen is called pure function?
26. Differentiate concrete data type and abstract data type.
27. Discuss about Algorithmic complexity and its types.
28. Write short notes on Escape sequences with examples.
29. What is use of format()? How do you define it?
30. List out the set operations supported by python.
31. What are class members? How do youdefine it?
32. Explain Object Model with example.
33. What is the difference between the write mode and append mode.
PART -D
ANSWER ALL THE QUESTIONS. 5x 3 = 15
34. a) Explain the purpose of the following functions:
a) plt:xlabel() b) plt.ylabel() c) plt.title) d) pltlegend() e) pit.show() (OR)
b)Write a Python script tocreate a table called ITEM with the following specification.
Add one record to the table.
Name of the database :-ABC
Name of the table :- Item
Column name and specification:
lcode ;- integer and act as primary key
Item Name :- Character with lerngth 25
Rate :- Integer
Record to be added :- 1008, Monitor,15000
35. a) What is the purpose of sys,os,getopt module in Python. Explain. (OR)
b) Write the different types of constraints and their functions.
36. a) What the different ways to insert an element in a list. Explain with suitable example. (OR)
b)Explain the following built-in functions.
(a) id() (b) chr() (c) round() (d) type() (e) pow()
37. a) Write a program to display all 3 digit odd numbers. (OR)
b) Discuss in detailabout Tokens in Python.
38. a) What is Binary search? Discuss with example. (OR)
b) ldentify in the following program:
let rec gcd a b:=
if b<> 0then gcd b (a mod b) else return a
i) Name of the function ii) ldentify the statement which tells it is a recursive function
i) Name of the argument variable iv) Statement which invoke the function recursively
v) Statement which terminates the recursion.
12 Computer Science -2