




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
computer science class 12 cbse sample paper
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





General Instructions: This question paper contains 37 questions. All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions The paper is divided into 5 Sections- A, B, C, D and E. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks. All programming questions are to be answered using Python Language only. In case of MCQ, text of the correct answer should also be written. SECTION – A Q No. Section-A (21 x 1 = 21 Marks) Marks
def change(one, *two): print(type(two)) change(1,2,3,4) a) Integer b) Tuple c) Dictionary d) An exception is thrown
(a) writelines() (b) write() (c) writerow() (d) writer()
termed as ………………………………… (a) Compile time error (b) Exception (c) Runtime error (d) Logical error
Va= HowMany() OR 1+ Find the errors in the following Python code and rewrite the code after correcting errors and underline the corrected code. Def string#reverse(str1): rstr1=”” index=str1.len() while index>0; rstr1+=str1(index-1) index=index- 1 return rstr print(string_reverse(‘123abcd’))
Write a Python code snippet to open a CSV file named "data.csv" in write mode and write a single row of data into it using the csv.writer() object.Include the necessary import statement and ensure proper closing of the file after writing.
Q No. Section-C ( 3 x 3 = 9 Marks) Marks
N and pushes all those integers which are divisible by 5 from the listN into a Stack named FactNumbers. Write function pop_div5() to pop theVALUES are: [10, 5, 18, 35, 112]FactNumbers should store: [10, 5, 35]Q No. SECTION D (4 X 4 = 16 Marks) Marks
ii) Write a Python program to remove the characters of odd index values in a string.
i) Find the output of the following Python program: def makenew (mystr):
The output should be: Jerry Siddharth Underflow
b) Write a function in Python, Push (Vehicle) where, Vehicle is a dictionary containing details of vehicles - {Car_Name: Maker}. The function should push the name of car manufactured by "TATA' (including all the possible cases like Tata, TaTa, etc.) to the stack. For example: If the dictionary contains the following data: Vehicle={"Santro" : "Hyundai", "Nexon": "TATA", "Safari" : "Tata"} The stack should contain Safari Nexon
Q No. SECTION E (2 X 5 = 10 Marks) Marks
1 Pride and Prejudice 200 2 Gone with the wind 250 3 The little Prince 170 4 Anne of Green Gables 190 5 The Giving Tree 210