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

12th Preboard2 CS

Uploaded by

adityakumar39101
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)
18 views4 pages

12th Preboard2 CS

Uploaded by

adityakumar39101
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
You are on page 1/ 4

SHRADDHA MANDIR SCHOOL

Sector -87, Greater Faridabad


Email ID – [email protected]
CLASS – XII
SUBJECT- Computer Science
Time: 3Hrs. Preboard-2 M.M.70

General Instructions:
 All questions are compulsory.
 Marks for each question are indicated.
 Use a pen for writing answers. Calculators are not allowed.
 Ensure neat and legible handwriting.
Section A:
Multiple Choice Questions (1 mark each) (25 x 1 = 25 Marks)
1. "Identifiers are names used to identify a variable, function in a program'
a. True b. False
2. Given the following Tuple 1 Tup= (10, 20, 30, 50)

Which of the following statements will result in an error?

a. print (Tup[0] )
b. Tup. insert (2, 3) d. print (len (Tup) )
c. print (Tup [1 : 2] )
3. Consider the given expression:
5<10 and 12>7 or not 7>4
Which of the following will be the correct output, if the given expression is evaluated?
a. True b. False c. NONE d. NULL

4. S= "Amrit Mahotsav @ 75" A=S.

partition (“ " )

print (a)
a. ( 'Amrit Mahotsav' , '@ ' , ' 7 5 ' ) c. ('Amrit’, ‘Mahotsav @ 75 ' )
b. [ 'Amrit' , 'Mahotsav' , ' @' 7 5 ' ] d. ( 'Amrit' , ‘’,'Mahotsav @ 75' )
5. Which of the following mode keeps the file offset position at the end of the file?

a. r+ b. w+ c. r d. a
6. In databases, what does SQL stand for?
a. Structured Query Language b..Standard Query Link
c. Simple Query Logic d. System Query Language
7. Which of the following statement(s) would give an error after executing the following code?
Stud= {"Murugan":100, "Mithu":95)

print (Stud [95]) # Statement 1


Stud ["Murugan"]=99 # Statement 2
print (Stud.pop()) # Statement 3
print (Stud) # Statement 4
a. Statement 2 b. Statement 4. c. Statement 4 d. Statement 2 and 4
8. Which operator is used for logical AND in Python?
a.& b.&& c.and d.||
9. ________ is a number of tuples in a relation.

a. Attribute b.Degree c. Domain d. Cardinality


10. In binary search, the time complexity is:
a.O(n) b.O(log n) c.O(n^2) d. O(1)
11. Which of the following is not a type of database?
a. Relational b. Hierarchical c. Flat-file d. Compiled
12. The syntax of seek is:

file_object.seek(offset [, reference_point])

What is the default value of reference_point?

a.0 b.2 c.1 d. 3

13. Which of the following is not a Python data type?


a.List b. Tuple c. Dictionary d. Tree
14. The command to delete a database in SQL is:
a.DROP DATABASE b. DELETE DATABASE c. REMOVE DATABASE d. ERASE DATABASE
15. What is the size of an IPv4 address?
a.8 bits b. 16 bits c. 32 bits d. 64 bits
16. In Python, the is operator checks for:
a. Equality b. Identity c. Membership d. None of the above
17. Which protocol is used to send email?
a. HTTP b. SMTP c. FTP d. POP
18. What will the following expression be evaluated to in Python?
print (4+3* 5/3-582)
a. 8.5 b.8.0 c.10.2 d.10.0
19. function is used to arrange the elements of a list in ascending order.
(a) sort() b.arrange () c.ascending() d.asort()
20 and 21 are ASSERTION (A) and REASONING (R) based questions. Mark the correct choice as
(a) Both (A) and (R) are true and (R) is the correct explanation for (A).
(b) Both (A) and (R) are true and (R) is not the correct explanation for (A).
(c) (A) is true but (R) is false.
(d) (A) is false but (R) is true.
20. Assertion (A): To use a function from a particular module, we need to import the module.
Reason (R): import statement can be written anywhere in the program, before using a function from that module.
21. Assertion (A): A stack is a LIFO structure.
Reason (R) Any new element pushed into the stack always gets positioned at the index after the last existing
element in the stack
22. The full form of CSS is:
a.Cascading Style Sheets b. Central Style c
c. Syntaxc.common Style Syntax d. Cascading Script Sheets
23. _______clause is used with SELECT statement to display data in a sorted form with respect to a
specified column.
a.WHERE b.HAVING c. ORDER BY d DISTINCT
24. How to find the last element of list in Python? Assume `bikes` is the name of list.
a. bikes[0] b. bikes[-1] c. bikes[lpos] d. bikes[:-1]
25. 8 If a='cpp', b='buzz' then what is the output of:
c = a-b
print(c)
a. cpp-buzz b. cppbuzz c. TypeError: unsupported operand d. None of the above

Section B: Short Answer Type Questions (6x2=12 )


26. Differentiate between wired and wireless transmission.
27. Explain the concept of "Alternate Key" in a Relational Database Management System with an
appropriate example.
28. Differentiate between CHAR and VARCHAR data types in SQL with appropriate example.
29. Name any two DDL and any two DML commands.
30. What are the advantages of using functions in programming?
31. Write the python statement for each of the following tasks using built-in function/methods only
i. To insert an element to 200 at the third position in the list L1.
ii. To check whether a string name message ends with a full stop/period or not
iii. To extend a list with a new list having five elements in it.
iv. To fetch last 3 elements from the list.
Section C: Long Answer Type Questions (6 x 4 = 24)
32. Write a Python program to implement a stack using a list. Include push, pop, and display operations.
33. Write a function countNow (places) in Python, that takes the dictionary, places as an argument and
displays the names in (uppercase) of the places whose names are longer than five characters
a. For examples: Consider the following dictionary
b. Places={i:”delhi”,2:”London”,3;” paris”,4:”new York”,5:”doha”}
c. The output should be;
d. LONDON
e. NEW YORK .
34. Write SQL queries for the following:
a) Create a table named Students with columns: ID, Name, Age, and Grade.
b) Insert a record into the Students table.
c) Retrieve all records where Grade is "A".
35. Write a function at customer (customerNames) to add customers from the list customerNames using
push operations of stack data structures.
36. What is Database? Write the advantages and limitations of a database.
37. What is data communication? What are the main components of data communication? Which
communication mode allows communication in both direction simultaneously?
Section D: Programming Based Questions (3x 3= 9 Marks)
39. Write a Python program to read a text file, count the number of words in the file, and display the
result.
40. Write a Python program to create a class BankAccount with attributes account_number, balance,
and methods deposit() and withdraw(). Demonstrate its functionality with an example.
31. Table:INTERIORS
No. Item name Type Dateofstock Price Discount
1 Redrose Double bed 23/02/02 323000 15
2 Softtouch Baby cot 20/01/02 10
3 Jerry’s home Baby cot 19/02/02 8500 10
4 Roughwood Office table 01/01/02 20000 20
5 Comfortzone Double bed 12/01/02 15000 20
6 Jerry Look Baby cot 24/02/02 7000 19
7 Lion KING Office table 20/02/02 16000 20
8 Royal Tiger sofa 22/02/02 30000 25
9 Park sitting Sofa 13/12/01 9000 15
10 Dine paradise Dining table 19/02/02 11000 15
11 White wood Double bed 23/03/03 20000 20
12 James 007 Sofa 20/02/03 15000 15
13 Tom Look Baby cot 21/02/03 7000 10

Write sql statement to perform the following:


a. To list the ITEMNAME which are priced more than 10000 from the Interiors Table
b. To list item name and type of those Items in which date of stock is before 22/01/02 from the table in
the descending order of ITEM NAME.
c. To display ITEMNAME and Date of stock of those items , in which discount percentage is more than 15
from the table
41. i) A library database contains the following table:
Books(BookID, Title, Author, PublishedYear)
Write an SQL query to display the titles of books published after 2015.
ii) Consider a database with the following table:
Orders(OrderID, CustomerID, OrderDate, TotalAmount)
Write an SQL query to retrieve the total amount of orders placed by a customer with CustomerID = 101.

You might also like