0% found this document useful (0 votes)
254 views9 pages

Class 12 Pre 2024-25

Uploaded by

Poolkit Singh
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)
254 views9 pages

Class 12 Pre 2024-25

Uploaded by

Poolkit Singh
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/ 9

Time: 3 hrs Max.

Marks: 70

Instructions

1. Please check this question paper contains 35 questions.


2. The paper is divided into 5 Sections A, B, C, D and E.
3. Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
4. Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
5. Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
6. Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
7. Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
8. All programming questions are to be answered using Python Language only.

Section – A

Q1.State True or False


Integer is a mutable data type in Python. [1]

Q2.Which of the following Python function displays the memory id of a variable? [1]
(a) type()
(b) str()
(c) getid()
(d) id()
Q 3.Which of the following operator performs an integer division? [1]
(a) *
(b) //
(c) /
(d)**

Q 4.Identify the output of the following Python statement: [1]


b=1
for a in range(1, 10, 2):
b += a + 2
print(b)
(a) 31
(b) 33
(c) 36
(d) 39

Q5.Given s=”AISSE@2023”. What will be the output of


print (s [-1: : -1 ]) ?
(a) ‘3202@ESSIA’
(b) 3
(c) AISSE
(d) ESSIA
Q 6.Which of the following functions write data to a binary file?
(a) pickle()
(b) writer()
(c) load()
(d) dump()
Q 7.Which of the following is not an inherent application of stack ?
(a) Reversing a string
(b) Evaluation of postfix expression
(c) Implementation of recursion
(d) Job scheduling
Q8.Which of the following is an advantage of SQL?
(a) High speed
(b) Client/Server language
(c) Easy to learn
(d) All of these
Q 9.Predict the output of the following program:

a=5
b = a = 15
c = (a < 15)
print ("a = ”, a)
print (“b = ”, b)
print (“c = ”, c)
(a) a= 15
b=15
c=False
(b) a=15
b=10
c=True
(c) a=15
b=None
c=False
(d) None of these
Q 10.A primary key of a relation must be ………..
(a) UNIQUE only
(b) NOT NULL only
(c) Both UNIQUE and NOT NULL
(d) Neither UNIQUE nor NOT NULL
Q 11.Fill in the blank function will read entire contents of a text file.
(a) read()
(b) readfull()
(c) readline()
(d) readfile()
Q 12.The ………… clause can group records on the basis of common values in a field.
(a) AGGREGATE
(b) GROUP
(c) GROUP BY
(d) JOIN

Q 13.State whether the following statement is True or False :


TCP/IP is the base protocol for all application protocols.
Q 14.The Python function that adds a list at the end of another list is
(a) join()
(b) add()
(c) append()
(d) extend()
Q 15.Fill in the blank : ……….. the protocol primarily used for browsing data. [1]

Q 16.Which of the following is an advantage of networking? [1]


(a) Application sharing
(b) File sharing
(c) User communication
(d) All of these
Directions In the question numbers 17 and 18, a statement of Assertion (A) is followed by a statement of
Reason (R). Choose the correct option.

Q 17.Assertion (A) A Python function that accepts parameters can be called without any parameters.
[1]
Reason (R) Functions can carry default values that are used, whenever values are not received from calling
function.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.

Q 18.Assertion (A) A CSV file is by default delimited by comma(,), but the delimiter character can be
changed. [1]
Reason (R) The writerowf) function for CSV files has a “delimiter” parameter that can be used to specify the
delimiter to be used for a CSV file.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Section – B

Q19.(i) Expand the following terms: [1+1=2]


LAN, HTTP
(ii) What do you mean by 3G mobile technology?
Or
(i) Can we use URL to access a web page? How?
(ii) Name any two web browsers.
Q 20.What will be the output for the following Python statement? [2]
L = [10, 20, 30, 40, 50]
L=L+5
print(L)
Q 21.What will be the output of the following Python code? [2]
L = [10, 20]
L1=[30, 40]
L2=[50, 60]
L.append (L1)
L.extend(L2)
print(L)
Or

Find the output

>>> l1 = [1, 2, 3, 4]
>>> l2 = [1, 2, 3, 4]
>>> l1 > l2
>>> l2 [2] = 9
>> l1 > l2
Q22.Mention the various advantages of using a DBMS. [2]

Or

Create a table named Programmers with the following structure :

P_Name VARCHAR(20)

DOJ Date

SAL NUMBER

(i) Display the name of the programmer, which has the highest salary.
(ii) Update the salary of all programmer by 2000, whose name start with letter R.

Q 23.
Define the update() method with its syntax in dictionary. [2]
Syntax dictionary_name1.update(dictionary_name2)

Q24.Write the output of the following code. [2]

number = 2
def Fun ():
number = 5
print (“Number(s):”)
print (number)
Fun ()
print (number)
Or

Observe the following tuple and answer the questions that follow:
t1 = (70, 56, ‘Hello’, 22, 2, ‘Hi’, ‘The’, ‘World’, 3)
(i) t1 [2 : 4]
(ii) t1[- 6]
Q 25.The code given below will give an error on execution. Identify the type of the error and modify
the code to handle such type of an error.

x = int(input(”Enter the value of x : “))


y = int(input(”Enter the value of y : “))
z = x/y
print (“The value of z : “, z)
Section – C

Q26.Write outputs for the SQL commands (i) to (iii) based on the table CUSTOMER given below: [1 × 3 = 3]
TABLE: CUSTOMER

(i) SELECT COUNT(*). GENDER FROM CUSTOMER GROUP BY GENDER;


(ii) SELECT CNAME FROM CUSTOMER WHERE CNAME LIKE ‘L%’;
(iii) SELECT DISTINCT AREA FROM CUSTOMER;
Q 27.Write a Python program that read the data from file ‘original.dat’ and delete the line(s) having
word (passed as an argument). Then write these data after removing lines into file ‘duplicate.dat’. [3]

Or

Write a program in Python to open a text file “lines.txt” and display all those words whose length is greater
than 5.

Q28Write the queries for the questions (i) to (iii) on the basis of the following tables SHOPPE and
ACCESSORIES. [1 × 3 = 3]
TABLE: SHOPPE

TABLE: ACCESSORIES
(i) To display Name and Price of all the ACCESSORIES in ascending order of their Price.
(ii) To display Id and SName of all SHOPPE located in Nehru Place.
(iii) To display Minimum and Maximum Price of each Name of ACCESSORIES.
Q 29.Write a user-defined function parser(L) that accepts a list as parameter and creates another two lists
storing the numbers from the original list, that are even and numbers that are odd. [3]
Q 30.Consider the following stack of characters, where STACK is allocated N = 8 memory cells.
STACK : A, C, D, F, K, …, …, … [3]
Describe the STACK at the end of the following operations. Here, Pop and Push are algorithms for deleting
and adding an element to the stack.
(i) Pop (STACK, ITEM)
(ii) Pop (STACK, ITEM)
(iii) Push (STACK, L)
(iv) Push (STACK, P)
(v) Pop (STACK, ITEM)
(vi) Push (STACK, R)
(vii) Push (STACK, S)
(viii) Pop (STACK, ITEM)

Section – D

Q31.Consider the following table STORE. [1 × 4 = 4]


TABLE: STORE

Write SQL queries for statements:


(i) Display the number of distinct Scodes.
(ii) Display the maximum and minimum quantities.
(iii) Display the structure of the STORE table.
(iv) Add a new column Location varchar(50) in the table to store the location details of the items.
Q 32.Shubham is an employee in ABC company who works as a Python expert. For annual appraisal, he has
created a CSV file named annual.csv, to store the tasks of employee in different projects. The structure of
annual.csv is: [4]
[emp_id, empName, project, duration]
For efficient data of employee, Shubham wants to write the following user-defined functions:
Accept( ) To accept the details of employee and add them to the annual.csv
Show ( ) To display the details of all employees.
Write the program in Python for above information.

Section – E

Q 33.Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up
their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their
requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (v) below.

[1 × 5 = 5]
Physical locations of the blocks of TTC

Block to block distance (in m)

Block (From) Block (To) Distance

Human Resource Conference 110

Human Resource Finance 40

Conference Finance 80

Expected number of computers to be in each block


Block Computers

Human Resource 25

Finance 120

Conference 90

(i) Which will be the most appropriate block, where TTC should plan to install their server?
(ii) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for
efficient communication.
(iii) Suggest a suitable topology to connect the computers in each building.
(iv) Which of the following device will be suggested by you to connect each computer in each of the buildings?
(a) Switch/Hub
(b) Modem
(c) Gateway
(v) Company is planning to connect its offices in Hyderabad which is less than 1 km. Which type of network
will be formed?

Q 34.(i) What do you mean by file and file handling? [2 + 3 = 5]


(ii) Write a program code in Python to perform the following using two functions as follows :
addBook() To write to a CSV file “book.csv” file book no, book name and no of pages with separator as tab.
countRecords() To count and display the total number of records in the “book.csv” file.

Or

(i) Explain open( ) function’s syntax.


(ii) Write Python code to perform the following using two user defined functions.
showData( ) To display only roll no and student name of the file “student.csv”

RollNo, Name, Marks

1, Nilesh, 65

2, Akshay, 75
showSelect() To display only roll number and marks of the students from the CSV file “student.csv”

Q 35.(i) If R1 is relation with 8 rows and 5 columns, then what will be the cardinality of R1?
If 5 rows are added more, what will be the degree of the table now? [1 + 4 = 5]
(ii) Below is a table Item in database Inventory.

Riya created this table but forget to add column ManufacturingDate. Can she add this column after creation of
table?
Note the following to establish the connection between Python and MySQL:
Host: localhost
Username : system
Password : test
Database : Inventory

Or
(i) Identify command/function for the following action.
To display only records of Trains from the Train table whose starting station is “NDLS”.
(Column for starting station is “start”, table name is ‘Train”)
(ii) Consider the following table structure
Table: Faculty
F_ID(P)
Fname
Lname
Hire_date
Salary
Write the Python code to create the above table.
Consider:
host: localhost
UserName : root
Password : system
Database : School

https://www.learncbse.in/cbse-sample-papers-for-class-12-computer-science-set-3/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy