0% found this document useful (0 votes)
16 views12 pages

Cbse 12

SuperNova-LearnPython is a YouTube channel that provides resources for students learning Python and computer science, including online classes for grades 9 to 12. The document includes a sample paper for Computer Science with various sections and questions covering Python programming and SQL. It encourages viewers to subscribe and engage with the channel for additional learning materials.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views12 pages

Cbse 12

SuperNova-LearnPython is a YouTube channel that provides resources for students learning Python and computer science, including online classes for grades 9 to 12. The document includes a sample paper for Computer Science with various sections and questions covering Python programming and SQL. It encourages viewers to subscribe and engage with the channel for additional learning materials.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

About Us Website: https://www.learnpython4cbse.

com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

SAMPLE PAPER – 3
SUBJECT: COMPUTER SCIENCE
SuperNova-LearnPython, a YouTube channel dedicated to helping students to learn Python
and computer science concepts.
The channel covers various topics related to computer science, including Python
programming, data file handling, computer networking, SQL and many more.
If you’re looking for video descriptions, notes, assignments, and previous years’ question
papers related to Python and computer science for class 11 and 12, I recommend checking
out the SuperNova-LearnPython channel on YouTube.

You can find the channel here1.


Happy learning! .
Please like, Subscribe and share the Channel

BY: AMJAD KHAN Page 1 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

SAMPLE PAPER – 3
Code: Learnpython4cbse-3/5(25CBSE02)

COMPUTER SCIENCE 12TH (CODE 083)

General Instructions:

Time: 3 Hrs. Max. Marks: 70


1. This question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided in some questions.
Attempt only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.

SECTION A [21x1= 21]


1 State True and False: 1
In Python, a Syntax Error occurs when there is an error in the structure of the code.
2 Identify the output of the following code snippet: 1
Lst = ['Delhi', 'Mumbai', 'Chennai', 'Kolkata']
Lst.extend(['Pune'])
Lst.pop()
print(Lst , end ='#')
(a) ['Delhi', 'Mumbai', 'Chennai', 'Kolkata']#
(b) ['Delhi', 'Mumbai', 'Chennai', 'Kolkata', 'Pune']#
(c) ['Delhi#', 'Mumbai#', 'Chennai#', 'Kolkata#']
(d) ['Delhi#', 'Mumbai#', 'Chennai#', 'Kolkata#', 'Pune#']
3 Which of the following expressions evaluates to True? 1
(a) print (not False and True and False and True)

BY: AMJAD KHAN Page 2 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

(b) print (not False and True or False and True)


(c) print (False and True or False and True)
(d) print (not True and True or False and True)
4 Consider the statements given below and then choose the correct output from the given options: 1
str = "Commitment"
print(str.split("m"))
(a) ['Com', '' ,'it', 'ent '] (b) [ 'Co', 'm', 'it', 'ent']
(c) ['Co', '' , 'mit', 'ent'] (d) ['Co', '', 'it', 'ent']
5 What is the output of the following expression? 1
Game="World Cup 2025"
print(Game[-6::-1])
6 Given the Python declaration S1 = "Hello". Which of the following statements will give an error? 1
(a) print(S1[4]) (b) S2=S1
(c) S1=S1[4] (d) S1[4]="Y"

7 Given the following dictionares: 1


Dict_student={"Rno":"53","Name":"Ranveer Singh"}
Dict_marks={"Accts":87,"English":65}
Which statement will merge the contents of both dictionaries?
(a) Dict_student + Dict_marks
(b) Dict_student.add(Dict_marks)
(c) Dict_student.merge(Dict_marks)
(d) Dict_student.update(Dict_marks)
8 What does the 'format()' method do in Python strings? 1
(a) Converts the string to uppercase
(b) Replaces placeholders in the string with specified values
(c) Removes leading and trailing whitespaces from the string
(d) Splits the string into a list of substrings
9 Which of the following is not a part of DDL query? 1
(a) DROP (b) MODIFY
(c) DISTINCT (d) ADD
10 Write the python statement to open a file named "example.dat" in both read and write mode. 1

BY: AMJAD KHAN Page 3 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

11 State the whether the following statement is True or False: 1


The else block in a Python try-except statement is executed if an error occurs.

12 What is the output of the given code? 1


count = 1
def doThis():
global count
for i in (1,2,3):
count +=1
doThis()
print(count)
(a) 3 (b) 4
(c) 2 (d) 0
13 Which SQL statement is used to change the datatype of existing relation? 1

14 What will be the output of the query? 1


SELECT * FROM person WHERE emp_id IS NULL;
a) Only those columns whose emp_id is NULL
b) Only those columns whose emp_id is not NULL
c) No output
d) Error in Query
15 Which of the following is not a valid data type in SQL? 1
(a) VARCHAR (b) BOOLEAN
(c) DATETIME (d) DECIMALS

16 Which SQL statement is used to add new records to a table? 1


(a) ADD (b) CREATE
(c) INSERT (d) UPDATE
17 To identify each node uniquely in a computer network ___________ address is assigned. 1
(a) TCP/IP (b) IP
(c) MAC (d)TCP
18 Identify the device which can connect dissimilar network. 1
(a) Router (b) Gateway
(c) Modem (d) Both (a) and (b)

19 Which wireless communication standard operates in the 2.4 GHz band and is commonly used for 1
local area networks?

BY: AMJAD KHAN Page 4 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

Directions (Q. 20 and 21) are Assertion (A) and Reason (R) based questions. Mark the
correct choice as
(a) Both A and R are true and R is a correct explanation of A.
(b) Both A and R are true but R is not a correct explanation of A.
(c) A is true and R is false.
(d) A is false and R is true.
20 Assertion (A) A user-defined function that accepts 3 parameters where no parameter carries a 1
default value, must be called with 3 parameters.

Reason (R) Since, there are no default parameters, 3 parameters must be passed to the
function.

21 Assertion (A) The GROUP BY clause is mandatory when using aggregate functions like COUNT 1
or SUM.
Reason (R) Aggregate functions can only be applied to grouped data.
SECTION B [7x2= 14 Marks]

22 Write a method in Python to display the elements of list thrice if it is a number and display the 2
element terminated with '#' if it is not a number.
For example, if the content of list is as follows:
mylist = ['41','DROND','GIRIRAJ', T3‟,‟ZARA‟]
SAMPLE OUTPUT
414141
DROND#
GIRIRAJ#
131313
ZARA#
23 Find the result of following code: 2
Str="Myfriends"
(i) Str.capitalise() (ii) Str.upper()
24 If L1=[1,2,3,2,1,2,4,2, . . . ], and L2=[10,20,30,40,50,20,50. . .], then 2
(Answer using builtin functions only)
(I) (A) Write a statement to delete the first occurrence of an element 20 from the list L2.
OR
(B) Write a statement to sort the elements of list L1 in descending order.

BY: AMJAD KHAN Page 5 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

(II) (A) Write a statement to find the first lowest index of an element 50 from the list L2.
OR
(B) Write a statement to find the sum of all the elements from the list L1.
25 Identify the correct output(s) of the following code. Also, write the minimum and the maximum 2
possible values of the variable b.
import random
a = "Programming"
b = random.randint(3 , 8)
for i in range(0, b, 3):
print(a[i], end='*')
(a) P* (b) P*g* (c) P*g (d) P*g*m*
26 Rewrite the following code in Python after removing all syntax error(s). Underline each correction 2
done in the code.
def change():
"HELLO"=String
for I in range(0,len(String)–1)
if String[I]=>"M":
print (String[I],end="*")
else:
print String[I-1]
27 (I) 2
(A) What constraint should be applied on a table column to ensure that every value in that
column is unique and not NULL?
OR
(B) What constraint should be applied on a table column to ensure that every value in that
column is unique, but NULL values are allowed?
(II)
(A) Write an SQL command to drop a Foreign Key constraint from a table named ORDERS. The
constraint is named FK_CUSTOMER_ID.
OR
Write an SQL command to add a Foreign Key constraint to the ORDER table, linking the
CUSTOMER_ID column to the CUSTOMERS table‟s ID column. Assume the constraints name

BY: AMJAD KHAN Page 6 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

should be FK_CUSTOMER_ID.

28 Name one commonly used open source internet browser and one commonly used open source 2
operating system.
OR
How many pair of wires is there in twisted pair cable (Ethernet)? What is the name of port, which
is used to connect Ethernet cable to a computer or a laptop?
SECTION C [3x3= 9 Marks]

29 (A) Write a function to count the number of lines starting with uppercase characters in a text file 3
“Help.doc”.
OR
(B) Write a function to count the number of lines starting with a digit in a text file “Diary.txt”.
30 (A) Julie has created a dictionary containing names and marks as key value pairs of 6 students. 3
Write a program, with separate user defined function to perform the following operations
 Push the keys (name of the student) of the dictionary into a stack, where the
corresponding values (marks) are greater than 75.
 Pop and display the content of the stack.
For Example If the sample content of the dictionary is as follows
R={“OM”:76, “JAI”:45,”BOB”:89,”ALI”:65,”ANU”:90,”TOM”:82}
The output from the program should be:
TOM ANU BOB OM
OR
(B) Alam has a list containing 10 integers. You need to help him create a program with separate
user defined functions to perform the following operations based on this list.
 Traverse the content of the list and push the even numbers into a stack.
 Pop and display the content of the stack.
For Example:
If the sample Content of the list is as follows:
N=[12, 13, 34, 56, 21, 79, 98, 22, 35, 38]
Sample Output of the code should be:
38 22 98 56 34 12
31 Find and write the output of the following python code: 3
def ChangeVal(M,N):
for i in range(N):

BY: AMJAD KHAN Page 7 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

if M[i]%5 == 0:
M[i] //= 5
if M[i]%3 == 0:
M[i] //= 3
L=[25,8,75,12]
ChangeVal(L,4)
for i in L :
print(i, end='#')
OR
Find and write the output of the following python code:
def Call(P=40,Q=20):
P=P+Q
Q=P-Q
print(P,'@',Q)
return P
R=200
S=100
R=Call(R,S)
print (R,'@',S)
S=Call(S)
print(R,'@',S)
SECTION D [4x4= 16 Marks]

32 Consider the following tables Employee and answer the questions: 4

Eid Name Deptid Qualification Sex Points Basic DA HRA Bonus


1 Deepali 101 MCA F 20 6000 2000 2300 200
2 Rajat 101 BCA M 15 2000 300 300 30
3 Hari 102 B.A M 15 1000 300 300 40
4 Harry 102 M.A M 40 1500 390 490 30
5 Sumit 103 B.Tech M 32 8000 900 900 80
6 Jyoti 101 M.Tech F 12 10000 300 490 89
Note: The table contains many more records than shown here.
A) Write the following queries:
(I) To display the total DA for each Deptid, excluding Deptid with total DA less than 1000.

BY: AMJAD KHAN Page 8 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

(II) To display the Employee table sorted by Qualification in ascending order.


(III) To display the distinct Qualification names from the Employee table.
(IV) Display the gross amount for all records with their name and date of joining. The gross amount is
Basic+Da+Hra+Bonus.

OR
B) Write the output
(I) Select Name, Deptid, Basic from employee where doj > '23-Sep-2000';
(II) Select * from Employee where name not in ('Jyoti','Harry');
(III) SELECT Eid, MIN(HRA) FROM Employee GROUP BY Deptid;
(IV) SELECT Name, Qualification FROM Employee WHERE Qualification LIKE “_ _T%‟;
33 Radha Shah is a Programmer, who has recently been given a task to write a python code to 4
perfrom the following CSV file operations with the help of two user defined functions/modules.
For example, a sample record of the file may be:
[„Python Programming‟, „Deitel‟, 500, 20]
[„Java Programming‟, „John‟, 550, 10]
(I) CSVOpen(): to create a CSV file called BOOKS.CSV in append mode containing information of
book – title, Author, Price and Qty .
(II) CSVRead(): to display the records from the CSV file called BOOKS.CSV WHERE THE FIELD
TITLE STARTS WITH ‟R‟.
34 Write SQL commands for (i) to (iv) based on a table COMPANY and CUSTOMER 4
CID NAME CITY PRODUCTNAME
111 SONY DELHI TV
222 NOKIA MUMBAI MOBILE
333 ONIDA DELHI TV
444 SONY MUMBAI MOBILE
555 BLACKBERRY MADRAS MOBILE
666 DELL DELHI LAPTOP

TABLE : CUSTOMER
CUSTID NAME PRICE QT CID
101 ROHAN SHARMA 70,000 20
Y 222
102 DEEPAK KUMAR 50,000 10 666
103 MOHAN KUMAR 30,000 5 111
104 SAHIL BANSAL 35,000 3 333
105 NEHA SONI 25,000 7 444
106 SON AL 20,000 5 333
107 AGGARWAL
ARUN SINGH 50,000 15 666

BY: AMJAD KHAN Page 9 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

(I) To display those company name which are having prize less than 30000.
(II) To display the name of the companies in reverse alphabetical order.
(III) To increase the prize by 1000 for those customer whose name starts with „S‟?
(IV) (A) To add one more column totalprice with decimal (10,2) to the table customer.
OR
(B) To display maximum and minimum price of the customers whose Qty is greater than 10
35 A Consider the table Defence storing details of Defence personnel as per following structure- 4
Did Wing Rank Grade
Arm01 Army Major 3 (Sample record)

Write the following Python function to perform the specified operation:


AddAndDisplay(): To input details of Defence personnel and store it in the table Defence. The
function should then retrieve and display the wing and grade of those personnel whose Rank is
“Major" or 'Brigadier".
Note: Database : DefDB
Host: localhost
Username: root
Password : Arm@2024
SECTION E [2x5= 10 Marks]

36 Ravi is a librarian working in a city library. He needs to manage the records of various books. For 5
this, he wants the following information of each book to be stored:
Book_ID - integer
Book_Title - string
Author_Name - string
Price - float
You, as a programmer hired by the library, have been assigned to do this job for Ravi. Suggest:
(I) Write a function to input the details of a book and append it to the BINARY file „BOOK.DAT‟.
(II Write a function to update the data of books whose Price is more than 550 and change their Book_Title to

"Python programming for AI".


(III) Write a function to read the data from the binary file „BOOK.DAT‟ and display the details of
all those books whose price is greater than 500.
37 Eduminds University of India is starting its campus in a small town Parampur of Central India 5
with its centre admission office in Delhi. The university has three major buildings comprising of

BY: AMJAD KHAN Page 10 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

Admin building, Academic building and Research building in 5 km area campus.


As a network expert, you need to suggest the network plan as per (i) to (v) to the authorities
keeping in mind the distances and other given parameters.

Expected wire distance between various locations:

Research Building to Admin Building 90 m

Research Building to Academic Building 80 m

Academic Building to Admin Building 15 m


Delhi Admission Office to Parampur 1450 km
Campus
Expected number of computers to be installed at various locations in the university

Research Building 20
Academic Building 150
Admin Building 35
Delhi Admission Office 5
(I) Suggest the authorities, the cable layout amongst various buildings inside the
university campus for connecting the buildings.
(II) Suggest the most suitable place (i.e. building) to house the server of this organisations
with a suitable reason.
(III) Suggest an efficient device for the following to be installed in each of the building to
connect all the computers

(a) Gateway (b) Modem (c) Switch


(IV) Suggest the most suitable (very high speed) service to provide data connectivity
between admission building located in Delhi and the campus located in Parampur from the
following options:
(a) Telephone line (b) Fixedline dial-up connection
(c) Co-axial cable network (d) GSM

BY: AMJAD KHAN Page 11 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse
About Us Website: https://www.learnpython4cbse.com/ Feedback 8076665624

Learnpython4cbse Youtube Channel: Online Classes are Available for


Inspiring Success SuperNova-learnpython Clases 9 to 12- Comp. Sc., IP, AI & IT
PYTHON ONLINE CLASSES COMPUTER SC. INFORMATICS PRAC. SAMPLE PAPERS PYTHON MCQs

(e) Leased line (f) Satellite connection


(V) (A) University is planning to connect its campus in Delhi which is less than 100 km Which
type of network will be formed?
OR
(B) Eduminds University of India is starting sports and wants to build a building on campus.
Suggest the type of network that should be used to connect the other buildings on campus
to the sports building.

BY: AMJAD KHAN Page 12 of 12


Website: https://www.learnpython4cbse.com/ YouTube: https://www.youtube.com/@learnpython4cbse

You might also like