12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 03/02/2021
12th Standard Computer Science English Medium Reduced Syllabus Model Question paper With Answer Key- 2021 Part - 1
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
Which function returns the number of substrings occurs within the given range?
return ()
count ()
substring ()
range ()
2.
Adding more strings at the end of an existing string is known as
Con cat
Con catenation
Join
Append
3.
Which of the following operators are useful to do string manipulation?
+, -
*, /
+ *
; "
4.
DCL stands for
Dynamic Control Language
Data Communication Language
Data Control Language
Dynamic Data Control Language
5.
Which parameter used to display ( ) the percentage value using Python string formatting in pie chart?
percent
autopct
pet
percentage
6.
In database, the data stored in ___________
Tables
Sets
Lists
DBMS
7.
A group of related statement that perform a specific task is called as ______
Lists
Tuples
Control statements
Functions
8.
In Python matplotlib is a
control structure
dictionary
library
list
9.
Which values cannot be counted?
Integer
String
Float
Null
10.
print (type ('a')) displays
11.
A ________ is a string used to terminate lines produced by writer ( )
Line
Custom Delimiters
Line Terminator
Quotes
12.
How many important control structures in python?
2
3
4
many
13.
Which of the following operator is used to intersect two sets in python?
|
^
&
$
14.
Which of the following is not a type of llteral?
Numeric
Expression
String
Boolean
15.
What plays a vital role in Python programming?
Statements
Control
Structure
Indentation
16.
A sequence of immutable objects is called
Built in
List
Tuple
Derived data
17.
Which of the following defines what an object can do?
Operating System
Compiler
Interface
Interpreter
18.
Define Data Control Language and also list the command under this.
19.
Write the usage of the following format string characters.
(i) % c
(ii) % d (or) % i
(iii) % s
20.
Write a program to accept a string and print it in reverse order.
21.
Find the error in the following program to get the given output?
class Fruits:
def __init__(self, f1, f2):
self.f1 = f1
self.f2 = f2
def display(self):
print("Fruit 1 = %s, Fruit 2 = %s" %(self.f1, self.f2))
F = Fruits ('Apple', 'Mango')
del F.display
F.display()
Output: Fruit 1 = Apple, Fruit 2 = Mango
22.
What are class members? How do you define it?
23.
What are string literals? Explain.
24.
Why access control is required?
25.
What it means "String in phython are immutable"?
26.
How will you manipulate the strings?
27.
How the SQL DISTINCT class is helpful to you?
28.
Write a note on public and private data members of python class.
29.
Write the syntax for the following
(i) Creating objects
(ii) Accessing class members
30.
Do you modify a string in Python?
31.
Write a python program to execute the following C++ program
To implement Multilevel Inheritance:
// C++ program to implement Multilevel Inheritance
// Now select File ⟶New in Notepad and type the C++ program
c++ Program.
#include < iostream >
using namespace std;
// base class
class Vehicle
{
public:
Vehicle ( )
{
cout<< "This is a Vehicle" << endl;
}
};
class threeWheeler: public Vehicle
{ public:
three Wheeler ( )
{
cout << "Objects with 3 wheels are vehicles" << endl;
}
};
// sub class derived from two base classes
class Auto: public threeWheeler{
public:
Auto ( )
{
cout<< "Auto has 3 Wheels"<< endl;
};
// main function
int main ( )
{
//creating object of sub class will invoke the constructor of base classes
Auto obj;
return 0;
}
// Save this file as inheri_cpp.cpp
32.
Write a program to check and print if the given number is negative or positive using class.
33.
Explain the concept access control.
34.
Explain about string operators in python with suitable example.
1.
(b)
count ()
2.
(d)
Append
3.
(c)
+ *
4.
(c)
Data Control Language
5.
(b)
autopct
6.
(a)
Tables
7.
(d)
Functions
8.
(c)
library
9.
(d)
Null
10.
(c)
11.
(c)
Line Terminator
12.
(b)
3
13.
(c)
&
14.
(b)
Expression
15.
(d)
Indentation
16.
(c)
Tuple
17.
(c)
Interface
18.
Data control language: A Data Control Language (DCL) is a programming language used to control the access of data stored in a database. It is used for controlling privileges in the database (Authorization). The privileges are required for performing all the database operations such as creating sequences, views of tables etc.
SQL commands which come under Data Control Language are:
| Grant | Grants permission to one or more users to perform specific tasks. |
| Revoke | Withdraws the access permission given by the GRANT statement. |
19.
(i) character
(ii) Signed decimal integer
(iii) String
20.
str1 = input ("Enter a string:")
Index=-1
while index >= -(lentstrl1)):
print ("Subscript[",index,"] :" + str1 [index])
index +=-1
Output:
Enter a string: welcome
Subscript [ -1 ] : e
Subscript [ -2 ] : m
Subscript [ -3 ] : 0
Subscript [ -4 ] : c
Subscript [ -5 ] : I
Subscript [ -6 ] : e
Subscript [ -7 ] : w
21.
In line No.8, del F.display will not come.
22.
Variables defined inside a class are called as "Class Variable" and functions are called as "Methods. Class variable and methods are together known as members of the class. The class members should be accessed through objects or instance of class. A class can be defined anywhere in a Python program.
Defining classes: In Python, a class is defined by using the keyword class. Every class has a unique name followed by a colon (:).
Syntax for Defining a Class:
class class_name:
statement_1
statement_2
....................
....................
statement_n
23.
(i) In Python, a string literal is a sequence 0 characters surrounded by quotes. Python supports Single, double and triple quotes for a string.
(ii) A character literal is a single character surrounded by single or double quotes. The value with triple-quote u ''' ''' is used to give multi-line string literal.
Program:
To test String Literals:
# Demo Program to test String Literals
strings = "This is Python"
char = "C"
multiline_str = ''''This is a multiline string with more than one line code.'''
print (strings)
print (char)
print (multiline_str)
# End of the Program
Output:
This is Python
C
This is a multiline string with more than one line code.
24.
(i) Access control is a security technique that regulates who or what can view or use resources in a computing environment.
(ii) It is a fundamental concept in security that minimizes risk to the object.
(iii) In other words access control is a selective restriction of access to data.
(iv) In object oriented programming languages is implemented through access modifiers.
25.
Strings in python are immutable. That means, once you define a string modifications or deletion is not allowed.
26.
(i) Once you define a string, python allocate an index value for its each character.
(ii) These index values are otherwise called as subscript which are used to access and manipulate the strings. The subscript can be positive or negative integer numbers.
27.
The DISTINCT clause is helpful when there is need of avoiding the duplicate values present in any specific columns/table. When we use distinct keyword only the unique values are fetched.
28.
(i) The variables which are defined inside the class is public by default. These variables can be accessed anywhere in the program using dot operator.
(ii) A variable prefixed with double underscore becomes private in nature. These variables can be accessed only within the class
29.
(i) Object - name = class_name ()
(ll) Object - name = class_member
30.
Strings in python are immutable. That means, once you define a string moditications or deletion is not allowed. However, we can replace the existing string entirely with the new string.
31.
//Now select File ➝ New in Notepad and type the Python program
# Save the File as classpy.py
# Python classpy.py -i inheri_cpp command to execute c++ program
Python Program:
import sys, os, getopt
def main (argv):
cpp_file ="
exe_file ="
opts.args= getopt.getopt (argv, "i:",['ifile='])
for o, a in opts:
1ifile. ("'-"1", --ifile"):
cpp_file = a + '.cpp'
exe_file = a + '.exe'
run (cppfile, exe_file)
def run(cpp_file, exe_file):
print ("Compiling" + cpp_file)
os.system ('g++ ' + cpp_file + '-o' + exe_file)
print ("Running" + exe_file)
print ("------------------- ")
print
os.system (exe_file)
print
if __name__ =='__main__"
main (sys.argv[1:])
32.
class test;
def check (self, num)
if num> 0:
print (num, "is positive number")
else:
print (num, "is negative number")
n = test ()
x = int (input("Enter the number"))
n. check (x)
33.
(i) Access control is a security technique that regulates who or what can view or use resources in a computing environment.
(ii) It is a fundamental concept in security that minimizes risk to the object.
(iii) In other words access control is a selective restriction of access to data. IN Object oriented programming languages it is implemented through access modifiers.
(iv) Classical object-oriented languages, such as C++ and Java. control the access to class members by public, private and protected keywords.
(v) Private members of a class are denied access from the outside the class. They can be handled only from within the class.
(vi) Public members (generally methods declared in a class) are accessible from outside the class. The object of the same class is required to invoke a public method. This arrangement of private instance variables and public methods ensures the principle of data encapsulation.
(vii) Protected members of a class are accessible from within the class and are also available to its sub-classes. No other process is permitted access to it. This enables specific resources of the parent class to be inherited by the child class.
(viii) Python doesn't have any mechanism that effectively restricts access to any instance variable or method. Python prescribes a convention of prefixing the name of the variable or method with single or double underscore to emulate the behaviour of protected and private access specifiers.
(ix) All members in a Python class are public by default. whereas by default in C++ and java they are private. Any member can be accessed from outside the class environment in Python which is not possible in C++ and java.
34.
String Operators:
Python provides the following operators for string operations. These operators are useful to manipulate string.
(i) Concatenation (+):
Joining of two or more strings is called as Concatenation. The plus (+) operator is used to concatenate strings in python.
Example:
>>> "welcome" + "Python"
'welcome python'
(ii) Append (+ =):
Adding more strings at the end of an existing string is known as append. The operator += is used to append a new string with an existing string.
Example:
>>> str1 = "welcome to"
>>> str1 + = "Learn Python"
>>> print (str1)
Welcome to Learn Python
(iii) Repeating (*):
The multiplication operator (*) is used to display a string in multiple number of times.
Example:
>>> str1= "welcome "
>>> print (str1 *4)
Welcome Welcome Welcome Welcome
(iv) String slicing:
Slice is a substring of a main string.
A substring can be taken from the original string by using [ ] operator and index or subscript values. Thus [ ] is also known as slicing operator. Using slice operator, we have to slice one or more substrings from a main string.
General format of slice operation:
str[start:end]
Where start is the beginning index and end is the last index value of a character in the string. Python takes the end value less than one from the actual index specified.
Example: I
Slice a single character from a string
>>>str 1 = "THIRUKKURAL"
>>>print (str 1 [0])
T
(v) Stride when slicing string:
Example :
>>>str1 = "Welcome to learn python"
>>>print(str1[::-2])
Output :
nhy re teolW
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards