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: 01/10/2020
12th Standard Computer Science English Medium Important 5 Mark Creative Questions (New Syllabus 2020)
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.
Explain ALTER command in detail.
2.
Write a python program to display the number of vowels and consonants in the given string.
3.
Write the key differences between Histogram and bar graph.
4.
Write a python program to find HCF of two numbers using recursion.
5.
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
6.
Write a python program to execute the following C++ program.
Transpose of a matrix(2 D array) C++ program:
#include < iostream >
using namespace std;
int main ( )
{
int a[3][3], i, j;
for(i=0; i< 3; i++)
{
for(j=0; j<3; j++)
{cout<< "enter the value for
array["<< i+ 1<< "]"<< " ["<< j+ 1<< "] :";
cin >>a[i][j];
}
}
system ("cIs");
cout<< "\n\nOriginal Array\n";
for(i=0; i<3; i++) {
for(j=0; j<3; j++ )
cout<< a[i][j]«' ';
cout<< endl; }
cout<< "\n\n The Transpose of Matrix\n";
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
cout<< a[j][i]<< ' ';
cout<< endl;
}
return 0;
}
// Save this file as trans_cpp.cpp
7.
Write a python program to execute the following C++ program.
/*. To check whether the number is palindrome or not using while Ioop.*/
// Now select File →New in Notepad and type the C++ program
#include < iostream >
using namespace std;
intmain ( )
{
int n, num, digit, rev = 0;
cout<< "Enter a positive number: ";
cin >>num;
n= num;
while(num)
{digit = num % 10;
rev = (rev * 10) + digit;
num = num / 10; }
cout<< "The reverse of the number is: " << rev <<endl;
if(n == rev)
cout< < "The number is a palindrome";
else
cout << "The number is not a palindrome";
return 0;
}
// Save this file as pali_cpp.cpp
8.
Write a program to calculate area and circumference of a circle.
9.
Write a program in python to display the following output.
(i) 5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
(ii) 1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
10.
Write a program in python to display the following output.
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
11.
How will you write the CSV file with custom denote characters? Explain with an example.
12.
Write a program to read a specific column in a CSV file.
13.
Write a program to create a list of numbers in the range 1 to 10. Then delete all the even numbers from the list and print the final list.
14.
Write a program to create a list of numbers in the range 1 to 10. Then delete all the odd numbers from the list and print the final list.
15.
Differentiate Algorithm and program
16.
Explain the concept access control.
1.
ALTER Command:
(i) The ALTER command is used to alter the table structure like adding a column, renaming the existing column, change the data type of any column or size of the column or delete the column from the table. It is used in the following way:
(ii) ALTER TABLE <table-name>
(iii) To add a new column "Address" of type 'char' to the Student table, the command is used as
(iv) ALTER TABLE Student ADD Address char;
To modify, existing column of table, the ALTER TABLE command can be used with MODIFY clause like wise:
(v) ALTER < table-name > MODIFY < column-name > < data type > < size >;
ALTER TABLE Student MODIFY Address char (25);
(vi) The above command will modify the address column of the Student table to now hold 25 characters.
(vii) The ALTER command can be used to rename an existing column in the following way:
(viii) ALTER < table-name > RENAME old-column- name TO new-column-name;
(ix) For example to rename the column Address to City, the command is used as :
(x) ALTER TABLE Student RENAME Address TO City;
(xi) The ALTER command can also be used to remove a column or all columns. for example to remove a particular column, the DROP COLUMN is used with the ALTER TABLE to remove a particular field, the command can be used as:
ALTER < table-name > DROP COLUMN < column-name >;
(xii) To remove the column City from the Student table, the command is used as :
ALTER TABLE Student DROP COLUMN City;
2.
str1=input ("Enter a string:")
str2="aAeEiloOuU"
v,c=0,0
for i in str1:
if i in str2:
v+=1
else:
c+=1
print ("The given string contains {} vowels and {} consonants".format(v.c))
Output:
Enter a string: Tamilnadu School Education.
The given string contains 11 vowels and 15 consonants.
3.
| S.No | Histogram | Bar graph |
| i) | Histogram refers to a graphical representation; that displays data by way of bars to show the frequency of numerical data. | A bar graph is a pictorial representation of data that uses bars to compare different categories of data. |
| ii) | A histogram represents the frequency distribution of continuous variables. | Conversely, a bar graph is a diagrammatic comparison of discrete variables. |
| iii) | Histogram presents numerical data | Bar graph shows categorical data |
| iv) | Items of the histogram are numbers, which are categorised together, to represent ranges of data. | As opposed to the bar graph, items are considered as individual entities. |
| v) | A histogram, this cannot be done, as they are shown in the sequence of classes. | In the case of a bar graph, it is quite common to rearrange the blocks, from highest to lowest. |
| vi) | The width of rectangular blocks in a histogram mayor may not be same | The width of the bars in a bar graph is always same. |
4.
# python program to find HCF
def HCF (x,y):
if(x > y):
s = y
else:
s = x
for I inrange (1, s + 1):
if ((x % I = = 0) and (y% i = = 0)):
hcf = i
return hcf
x = int (input ("Enter Number 1"))
y = int (input ("Enter Number 2"))
print (HCF (x, y))
5.
//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:])
6.
//Now select File⟶New in Notepad and type the Python program
# Save the File as transpose.py. Program that compiles and executes a .cpp file
# Python tanspose.py -i trans_cpp
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:
if o in ("-i", "< -ifile"):
cpp_file = a + '.cpp'
exe_file = a + '.exe'
run(cpp_file, exe_file)
defrun( 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:])
7.
# Save the File as pali.py . Program that compiles and executes a .cpp file
# Python c:\pyprg\pali.py -i c:\pyprg\pali_cpp import sys, os, getopt
def main(argv):
cpp_file ="
exe_file = "
opts, args= getopt.getopt(argv, "i:",['ifile='])
for o, a in opts:
if o in ("-i", "--ifile"):
cpp_file = a + '.cpp'
exe_file = a + '.exe'
run(cpp_file, 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__': # program starts executing from here
main(sys.argv[ 1:])
8.
class Circle:
pi=3.14
def _init_(self.radius):
self.radius=radius
def area(self):
return Circle. pi*(self.radius**2)
def circumference(self):
return 2*Circle.pi*self.radius
r=int(input("Enter Radius: "))
Ce=Circle(r)
print("The Area =",C.area())
print("The Circumference =", Cxircumferencet())
9.
(i) for i in range (5, 0,-1):
for j in range (1, i + 1):
print (i, end =' ')
print (end = '\n')
i+ = 1
(ii) for i in range (5, 0, -1):
for j in range (1, i + 1):
print (j end =' ')
print (i, end = '\n')
i+ = 1
10.
i=1
while (i < = 6):
for j in range (1,i):
print (j,end='\t')
print (end='\n')
i+=1
Output:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
11.
To write the CSV file with custom quote characters, by registering new dialects using csv. register_dialect( ) class of csv module.
Example:
import csv
csvData = [['SNO",Items'], ['1",Pen'], ['2",Book'], ['3"Pencil']]
csv.register_dialect('myDialect',delimiter = '|',
quotechar = '"', quoting=csv.QUOTE_ALL)
with open('c:\\pyprg\\ch13\\quote.csv', 'w') as csvFile:
writer = csv.writer(csvFile, dialect='myDialect')
writer. writerows( csvData)
print("writing completed")
csvFile.close( )
12.
Import csv
#opening the csv file which is in different location with read mode
f=open("c:\\pyprg\\ch13ample5.csv",'r')
#reading the File with the help of csv.reader( )
readFile=csv.reader(f)
#printing the selected column
for col in readFile:
print col[0],col[3]
f.close ( )
Sample5.csv File in Excel
13.
Program:
Num = []
for x in range(1, 11):
Num.append(x)
print("The list of numbers from 1 to 10 = ",Num)
for index, i in enumerate(Num):
if(i%2==0):
del Num[index]
print("The list after deleting even numbers = ", Num)
Output:
The list of numbers from 1 to 10 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
The list after deleting even numbers =. [1, 3, 5, 7, 9]
14.
Program:
n=[]
for x in range (1, 11)
n = append (x)
for x, i in enumerate (n):
if(i %2! = 0):
del n [x]
print (n)
15.
| Algorithm | Program |
|---|---|
| Algorithm helps to solve a given problem logically and it can be contrasted with the program | Program is an expression of algorithm in a programming language. |
| Algorithm can be categorized based on their implementation methods, design techniques etc | Algorithm can be implemented by structured or object oriented programming approach |
| There is no specific rules for algorithm writing but some guidelines should be followed. | Program should be written for the selected language with specific syntax |
| Algorithm resembles a pseudo code which can be implemented in any language | Program is more specific to a programming language |
16.
(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.
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