Subject

Computer and Communication Technology

Class

CBSE Class 12

Pre Boards

Practice to excel and get familiar with the paper pattern and the type of questions. Check you answers with answer keys provided.

Sample Papers

Download the PDF Sample Papers Free for off line practice and view the Solutions online.
Advertisement

 Multiple Choice QuestionsShort Answer Type

11.

What is operator overloading with methods? Illustrate with the help of an example using a python code.

67 Views

12.

Write a method in python to display the elements of list thrice if it is a number and display the element terminated with '#' if it is not a number.

For example, if the content of the list is as follows:

ThisList=['41','DROND','GIRIRAJ','13','ZARA']
414141
DROND#
GIRlRAJ#
131313
ZARA#

50 Views

13.

What will be the status of the following list after the fourth pass of bubble sort and fourth pass of selection sort used for arranging the following elements in descending order?
14, 10, –12, 9, 15, 35

69 Views

14.

Write a method in python to search for a value in a given list (assuming that the elements in the list are in ascending order) with the help of Binary Search method. The method should return –1 if the value does not present else it should return the position of the value present in the list.

56 Views

Advertisement
15.

Write PUSH (Books) and POP (Books) methods in python to add Books and remove Books considering them to act as Push and Pop operations of Stack.

64 Views

16.

Write a method in python to find and display the prime numbers between 2 to N. Pass N as an argument to the method.

63 Views

17.

Evaluate the following postfix notation of expression. Show status of the stack after every operation.
84, 62, –, 14, 3, *, +

60 Views

Advertisement

18.

Differentiate between the following:

  1. f = open(‘diary.txt’, ‘r’)
  2. f = open(‘diary.txt’, ‘w’)


  1. diary.txt is opened for reading data.
  2. diary.txt is opened for writing data.
54 Views

Advertisement
Advertisement
19.

Write a method in python to read the content from a text file diary.txt line by line and display the same on screen.

58 Views

20.

Consider the following definition of class Member, write a method in python to write the content in a pickled file member.dat.

class Member:
	def_init_(self,Mno,N) :
	self.Memno=Mno
	self.Name=N
	def Show(self):
		Display (self.Memno, '#',self.Name)
	def store_data(self):
		piFile = open('member.dat','wb')
		pickle.dump(self, piFile)
		piFile.close()

62 Views

Advertisement