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

Advertisement

11.

How do we implement abstract method in python? Give an example for the same.


Abstract method: An unimplemented method is called an abstract method. When an abstract method is declared in a base class, the derived class has to either define the method or raise 'NotImplementedError'.

class Shape(object):
	def findArea(self):
		pass

class Square(Shape):
	def __init__(self,side):
		self.side = side
	def findArea(self):
		return self.side * self.side

93 Views

Advertisement
12.

What will be the status of the following list after the First, Second and Third pass of the insertion sort method used for arranging the following elements in descending order?

22, 24, 64,
34, 80, 43
Note: Show the status of all the elements after each pass very clearly underlining the changes.

51 Views

13.

For a given list of values in descending order, write a method in python to search for a value with the help of Binary Search method. The method should return the position of the value and should return -1 if the value not present in the list.

48 Views

14.

Write Insert(Place) and Delete(Place) methods in python to add Place and RemovePlace considering them to act as Insert and Delete operations of the data structure Queue.

50 Views

Advertisement
15.

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

49 Views

16.

Evaluate the following postfix notation of expression. Show status of the stack after every operation.
22,11,/,14,10,,+,5,2

67 Views

17.

Write a statement in Python to perform the following operations:

  • To open a text file 'BOOK.TXT' in read mode
  • To open a text file 'BOOK.TXT' in write mode

72 Views

18.

Write a method in python to write multiple line of text contents into a text file myfile.txt line.

66 Views

Advertisement
19.

Consider the following definition of class Staff, write a method in python to search and display the content in a pickled file staff.dat, where Staff code is matching with ‘S0105’.

class Staff:

	def __init__(self,S,SNM):
		self.Staffcode=S
		self.Name=SNM
	def Show(self):
		print(self.Staffcode,' ',
			self.Name)

 

75 Views

20.

Observe the following STUDENTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in LIST? Also, find the Degree and Cardinality of the LIST.

STUDENTS

No  Name 
1 Tara Mani 
2 Jaya Sarkar 
3 Tarini Trikha

EVENTS

EVENTCODE EVENTNAME
1001 Programming 
1002 IT Quiz

LIST

No  Name  EVENTCODE EVENTNAME 
1 Tara Mani 1001 Programming 
1 Tara Mani 1002 IT Quiz
2 Jaya Sarkar 1001 Programming
2 Jaya Sarkar 1002 IT Quiz
3 Tarini Trikha 1001 Programming
3 Tarini Trikha 1002 IT Quiz

 

56 Views

Advertisement