CLASS 12 : PYTHON SAMPLE PAPER 2

By Rajesh Shukla

Sample Paper 1       Solution Sample Paper 1
Sample Paper 2       Solution Sample Paper 2

Class XII

Sample paper : 2

Subject : Python

Max. Marks: 70                                                                           Time : 3 hrs      

General Instructions:

  • All questions are compulsory.
  • Question paper is divided into 4 sections A, B, C and D.
  • Section A : Unit-1 [30 marks (Q1,Q2,Q3)]
  • Section B : Unit-2 [15 marks(Q4)]
  • Section C: Unit-3 [15 marks(Q5,Q6)]
  • Section D: Unit-4 [10 marks(Q7)]

Section A

Q.1.

a.

Which of the following is not a valid arithmetic operator in Python : [1]
(i) // (ii) – (iii) ^ (iv) /

b.

What is the difference between insert() and append() methods in list? [2]

c.

Name the python library module which needs to be imported to invoke the following functions?[2]
(i). cos() (ii). shuffle()

d.

Observe the following python code very carefully and rewrite it after removing all the syntactical errors with each correction underlined. [3]

#function definition
def square(n)
    s=n*n
    print("square = "s)
DEF cube():
    c=nn
    print("Cube = ",c)
#function calling
a=10
print("Number ",a);
square()
a=5
print("Number "a)
cube(a)

e.

Find the output of the following program ?[2]

text="HeLLo123Hi"
l=len(text)
ntext=""
for i in range(0,l):
    if(text[i].isupper()):
        ntext=ntext+text[i].lower()
    elif(text[i].isalpha()):
        ntext=ntext+text[i].upper()
    else:
        ntext=ntext+'bb'
print(ntext)

Q.2.

a.

Write the definition of a function show(x) in python which reads list of numbers stored in a list x and displays square of a number if it is even and cube if the number is odd in the following manner? [3]

Example : if list x contains 5 elements

X[0]

X[1]

X[2]

X[3]

X[4]

X[5]

4

3

6

5

10

2

After executing the function the output should be:
4:16
3:27
6:36
5:125
10:100
2:4

b.

Identify the valid declaration of X: [1]
X = [1, 23, -76, 6]
(i) list (ii) dictionary (iii) array (iv) tuple

c.

How many times will “hello” get printed in the below program?[3]

a=”Computer”
for i in a[3:6]:
print(“Hello”)

d.

Write a python program to plot a sine wave using line chart? [3]

Q.3.

a.

Write a program to perform insert and delete operations on a Queue containing employee details like empno,name,salary? [3]

b.

Write a python script to read a file named “story.txt”, count and print total vowels in the file?[4]

c.

Write a function table(n) in python to print table of a number, number n passed as the parameter.[3]

Section B

Q.4.

a.

Expand the following: [2]
(i). HTTP
(ii). FTP
(iii). PPP
(iv). POP

b.

What is cloud computing? What are its benefits? [3]

c.

Define the following: [3]
(i). Bridge (ii). Gateways

d.

Give advantage of email and world wide web services provided by internet? [3]

e.

Ram Goods Ltd. has following four buildings in Ahmedabad city. [4]

CLASS 12 : PYTHON SAMPLE PAPER 2
CLASS 12 : PYTHON SAMPLE PAPER 2

CLASS 12 : PYTHON SAMPLE PAPER 2
CLASS 12 : PYTHON SAMPLE PAPER 2

Computers in each building are networked but buildings are not networked so
far. The company has now decided to connect building also.
(a) Suggest a cable layout for these buildings.
(b) In each of the buildings, the management wants that each LAN segment gets
a dedicated bandwidth i.e. bandwidth must not be shared. How can this be
achieved?
(c) The company also wants to make available shared Internet access for each of
the buildings. How can this be achieved?
(d) The company wants to link its head office in GV1 building to its another office in
Japan.
(i) Which type of transmission medium is appropriate for such a link?
(ii) What type of network would this connection result into?

SECTION-C

Q.5.

a.

What is DJANGO. Give its features?[2]

b.

What are different components of Django?[2]

c.

Write a program to display all the records from employee table. Using MySQL-Python connectivity?[3]

Q.6.

a.

Explain group by and having clause? [2]

b.

CONSIDER THE FOLLOWING TABLES STORE and SUPPLIERS and answer the question. [6]
Table: Store

Item no.

Item

Scode

Qty

Rate

LastBuy

2005

Sharpener classic

23

60

8

31-jun-09

2003

Ball pen 0.25

22

50

25

01-feb-10

2002

Gel pen premium

21

150

12

24-feb-10

2006

Gel pen classic

21

250

20

11-mar-09

2001

Eraser small

22

220

6

19-jan-09

2004

Eraser big

22

110

8

02-dec-09

2009

Ball pen 0.5

21

180

18

03-nov-09

Table: suppliers

Scode

Sname

21

Premium stationary

23

Soft plastics

22

Tetra supply

(i) To display details of all the items in the store table in ascending order of Lastbuy.
(ii) To display itemno and item name of those items from store table whose rate is more than 15.
(iii). To display the details of those items whose supplier code is 22 or quantity in store ( (Qty) is more than 110 from the table STORE.
(iv) To display Minimum Rate of items for each Supplier individually as per Scode from the t able STORE.
(v) Select count(distinct Scode) From store;
(vi) Select Rate*Qty from Store where ItemNo=2004;

SECTION-D

Q.7

a.

What do you understand by the term “Open Data”.? [2]

b.

How can we prevent identity thefts.? [2]

c.

What do you mean by cyber security? [2]

d.

Explain phishing? [2]

e.

List some network security components?[2]

By Rajesh Shukla

Sample Paper 1       Solution Sample Paper 1
Sample Paper 2       Solution Sample Paper 2

CBSE Class 12 @ Python

  • Home Page class 12 @ Python
  • Class 12 @ Python Theory Syllabus
  • Class 12 @ Python Practical Syllabus
  • Revision Tour
  • Functions (Funcations, Inbuilt Functions, Python Modules, Python Packages)
  • Inbuilt Functions
  • Python Modules
  • Python Packages
  • Using Python Libraries
  • Python Data File Handling
  • Program Efficiency
  • Data Structures In Python
  • Data Visualization Using Pyplot
  • Computer Networks
  • MySQL
  • Interface Python with SQL
  • Society, Law and Ethics
  • Web Development with Django
  • Class 12 @ Python Sample Practical File
  • Class 12 @ Python Sample Papers
  • Class 12 @ Python Projects
  • Tutorials

    Technical Questions

    Interview Questions

    C Programming
    C++ Programming
    Class 11 (Python)
    Class 12 (Python)
    C Language
    C++ Programming
    Python

    C Interview Questions
    C++ Interview Questions
    C Programs
    C++ Programs