• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 11 pages
Class notes

Class 12th notes computer science

Document preview thumbnail
Preview 2 out of 11 pages

Class 12th computer science cbse important notes of python my sql and etc

Content preview

SAMPLE QUESTION PAPER (THEORY)
CLASS: XII SESSION: 2024-25
COMPUTER SCIENCE (083)

Time allowed: 3 Hours Maximum Marks: 70

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.


Q No. Section-A (21 x 1 = 21 Marks) Marks

1. State True or False:
(1)
The Python interpreter handles logical errors during code execution.

2. Identify the output of the following code snippet:
text = "PYTHONPROGRAM"
text=text.replace('PY','#')
print(text)
(1)
(A) #THONPROGRAM
(B) ##THON#ROGRAM
(C) #THON#ROGRAM
(D) #YTHON#ROGRAM

3. Which of the following expressions evaluates to False?
(A) not(True) and False
(B) True or False (1)
(C) not(False and True)
(D) True and not(False)

4. What is the output of the expression?
country='International'
print(country.split("n"))
(A) ('I', 'ter', 'atio', 'al') (1)
(B) ['I', 'ter', 'atio', 'al']
(C) ['I', 'n', 'ter', 'n', 'atio', 'n', 'al']
(D) Error




Page: 1/11

, 5. What will be the output of the following code snippet?
message= "World Peace" (1)
print(message[-2::-2])

6. What will be the output of the following code?
tuple1 = (1, 2, 3)
tuple2 = tuple1
tuple1 += (4,)
print(tuple1 == tuple2) (1)
(A) True
(B) False
(C) tuple1
(D) Error

7. If my_dict is a dictionary as defined below, then which of the following
statements will raise an exception?
my_dict = {'apple': 10, 'banana': 20, 'orange': 30}
(A) my_dict.get('orange') (1)
(B) print(my_dict['apple', 'banana'])
(C) my_dict['apple']=20
(D) print(str(my_dict))

8. What does the list.remove(x) method do in Python?
(A) Removes the element at index x from the list
(B) Removes the first occurrence of value x from the list (1)
(C) Removes all occurrences of value x from the list
(D) Removes the last occurrence of value x from the list

9. If a table which has one Primary key and two alternate keys. How many
Candidate keys will this table have?
(A) 1
(1)
(B) 2
(C) 3
(D) 4

10. Write the missing statement to complete the following code:
file = open("example.txt", "r")
data = file.read(100)
____________________ #Move the file pointer to the (1)
beginning of the file
next_data = file.read(50)
file.close()

11. State whether the following statement is True or False:
The finally block in Python is executed only if no exception occurs
(1)
in the try block.




Page: 2/11

Connected book
 image
Ian Sinclair Computer Science
Publisher: 2014 ISBN: 9781483104256 Edition: Unknown

Document information

Uploaded on
March 25, 2026
Number of pages
11
Written in
2025/2026
Type
Class notes
Professor(s)
Own
Contains
All classes
$8.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
1
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions