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/06/2021
QB365 provides detailed and simple solution for every book back questions in class 12 Computer Science subject.It will helps to get more idea about question pattern in every book back questions with solution.
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.
Write any three uses of data visualization.
2.
What is the use of Where Clause.Give a python statement Using the where clause.
3.
What is the difference between the write mode and append mode.
4.
Write a Python program to read a CSV file with default delimiter comma (,).
5.
Write any three DDL commands.
6.
Write a SQL statement to modify the student table structure by adding a new field.
7.
8.
What is the role of DBA?
9.
Write a class with two private class variables and print the sum using a method.
10.
What will be the output of the following code?
list = [2**x for x in range(5)]
print (list)
11.
Write a shot note about sort( ).
12.
What will be the output of the given python program?
str1 = "welcome"
str2 = "to school"
str3 = str1[:2] + str2[len(str2)-2:]
print (str3)
13.
Write a short about the followings with suitable example:
(a) capitalize( )
(b) swapcase( )
14.
What is composition in functions?
15.
What happens when we modify global variable inside the function?
16.
Write the basic rules for global keyword in python.
17.
Using if..else..elif statement write a suitable programs to display largest of 3 numbers.
18.
Write a note on Asymptotic notation.
19.
What are the factors that influence time and space complexity.
20.
Write short notes on Escape sequences with examples.
21.
Explain Ternary operator with examples.
22.
Define Enclosed scope with an example.
23.
24.
What is the side effect of impure function. Give example.
25.
Why strlen is called pure function?
1.
(i) Data Visualization help users to analyze and interpret the data easily.
(ii) It makes complex data understandable and usable.
(iii) Various Charts in Data Visualization helps to show relationship in the data for one or more variables.
2.
The WHERE clause is used to extract only those records that fulfill a specified condition. In this example we are going to display the different grades scored by male students from "student table.
import sqlite3
connection = sqlite3.connect ("Academy.db")
cursor = connection.cursor()
cursor.execute ("SELECT DISTINCT (Grade) FROM student where gender = "M")
result = cursor.fetchall()
print(* result, sep ="\n")
Output:
('B,')
('A,')
('C,')
('D,')
3.
Write mode:
Open a file for writing. Creates a new file if it does not exist or truncates the file if it exists.
Append mode:
Open for appending at the end of the file without truncating it. Creates a new file if it does not exist.
4.
Program: To read a csv file with comma (,)
#importing csv
import csv
#opening the csv file which is in different location with read mode
with open('c:\\Pyprg\ \sample1.csv', 'r') as F:
#other way to open the file is
f=('C:\\pyprg\\sample1.csv', 'r')
reader = csv.reader(F))
#printing each line of the Data row by row.
print (row)
F. close( )
Output:
['SNO','NAME', 'CITY']
['12101', 'RAM', 'CHENNAI']
['12102', 'LAVANYA' "TIRUCHY']
['12103', 'LAKSHMAN', 'MADURAI']
5.
Data Definition Language:
(i) Create Command: To create tables in the database.
CREATE TABLE Student
(Admno integer,
Name char(20),
Gender char(1),
Age integer,
Place char(10),
);
(ii) Alter Command: 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.
ALTER TABLE <table-name> ADD <column-name><data type><size>;
To add a new column "Address" of type 'char' to the Student table, the command is used as
ALTER TABLE Student ADD Address char;
(iii) Drop Command: The DROP TABLE command is used to remove a table from the database.
The table can be deleted by DROP TABLE command in the following way:
DROP TABLE table-name;
6.
ALTER TABLE <table-name> ADD <column- name><data type><size>;
Example: ALTER TABLE Student MODIFY Address char (25)
7.
8.
Database Administrator or DBA is the one who manages the complete database management system. DBA takes care of the security of the DBMS, managing the license keys, managing user accounts and access etc.
9.
Code:
class Sample:
def_init_(self, n1, n2):
self._n1=nt
self_n2-n2
def sum(self):
print ("Class Variable 1:" self_n1)
print ("Class Variable 2:", self_n2)
S=Sample (5,10)
S.sum()
Output:
Class Variable 1:5
Class Variable 2: 10
Sum: 15
10.
Output: [1,2,4,8,16]
11.
Sort ( ) :
It sorts the element in list.
Syntax :
List.sort(reverse=True|False,key=myfunc)
Sorts the element in list :
Both arguments are optional
(i) If reverse is set as True, list sorting is in descending order.
(ii) Ascending is default.
(iii) Key=myFunc; "myFunc" - the name of the user defined function that specifies the sorting criteria.
Example :
MyList = [Thilothamma', "Tharani', 'Anitha','SaiSree', 'Lavanya')
MyList.sort( )
print(MyList)
MyList.sort(reverse=True)
print(MyList)
Output :
['Anitha', 'Lavanya', 'SaiSree', 'Tharani', 'Thilothamma']
['Thilothamma', 'Tharani', 'SaiSree', 'Lavanya', 'Anitha']
12.
Output:
Weool
13.
| Syntax | Description | Example |
| (a) capitalize() | Used to capitalize the first character of the string | >>> city="chennai" >>> print(city, capitalize( )) Chennai |
| (b) swapcase( ) | It will change case of every character to its opposite case vice-versa. | >>> strl="tAmilL NaDu" >>>print(strl.swapcase( )) TaMIl nAdU |
14.
(i) The value returned by a function may be used as an argument for another function in a nested manner.
(ii) This is called composition, For example, if we wish to take a numeric value or an expression as a input from the user, we take the input string from the user using the function input() and apply eval() function to evaluate its value.
15.
If we modify the global variable, we can see the change on the global variable outside the function also.
Example:
x=0 # global variable
def add():
global x
x=x+5 # increment by 5
print ("Inside add() function x value is:",x)
add()
print ("In main x value is:", x)
Output:
Inside add() function x value is: 5
In main x value is: 5 #value of x changed outside the function
16.
Rules of global Keyword: The basic rules for global keyword in Python are:
(i) When we define a variable outside a function, it's global by default. you don't have to use global keyword.
(ii) We use global keyword to modify the value of the global variable inside a function.
(iii) Use of global keyword outside a function has no effect.
17.
Code :
n1 = int(input(:Enter the first number:"))
n2 = int(input("Enter the second number:")
n3 = int(input(:Enter the third number:")
if(n1?=n2) and(n1>=n3) :
biggest = n1 ;
elif(n2>=nl)and (n2>=n3) :
biggest = n2
else:
biggest = n3
print("The biggest number between",n1,",",n2"and"n3"is",biggest)
Output :
Enter the first number : 1
Enter the second number : 3
Enter the third number : 5
The biggest number between 1, 3 and 5 is 5
18.
Asymptotic Notations are languages that uses meaningful statements about time and space complexity. The following three asymptotic notations are mostly used to represent time complexity of algorithms:
(i) Big O: Big O is often used to describe the worst -case of an algorithm.
(ii) Big \(\Omega \):Big Omega is the reverse Big O, if Big O is used to describe the upper bound (worst - case) of a asymptotic function, Big Omega is used to describe the lower bound (best -case).
(iii) Big \(\Theta \):When an algorithm has complexity with lower bound = upper bound, Say that an algorithm has a complexity O(n log n) and \(\Omega \) (n log n), it's actually has the complexity \(\Theta \) (n log n), which means the running time of that algorithm always falls in n log n in the best-case and worst-case.
19.
(i) Time Factor -Time is measured by counting the number of key operations like comparisons in the sorting algorithm.
(ii) Space Factor -Space is measured by the maximum memory space required by the algorithm.
20.
(i) In Python strings, the backslash "\" is a special character, also called the"escape" character.
(ii) It is used in representing certain whitespace characters: "\t" is a tab, "\n\" is a newline, and "\r" is a carriage return.
(iii) For example to print the message "It's raining", the Python command is
>>> print ("It \ 's raining")
It's raining
Python supports the following escape sequence characters.
| Escape sequence characters | Description | Example | Output |
| \\ | Backslash | >>> print('\\ test") | \test |
| \' | Single - quote | >>> print("Doesn\'t") | Doesn't |
| \'' | Double - quote | >>>print("\"'python\"") | "python" |
| \n | New line | Print ("python"\n","lang..") | Python lang. |
| \t | Tab | Prlnt ("python'","\t","lang.,") | Python lang.. |
21.
(i) Ternary operator is also known as conditional operator that evaluate something based on a condition being true or false.
(ii) It simply allows testing a condition in a single line replacing the multiline if-else making the code compact. The syntax for conditional operator is,
Variable Name = [on_true] if [Test expression]
else [on_false]
(iii) Example:
min = 50 if 49 < 50 else 70 # min = 50
min = 50 if 49 > 50 else 70 # min = 70
22.
(i) All programming languages permit functions to be nested. A function (method) within another function is called nested function.
(ii) A variable which is declared, inside a function which contains another function definition with in it, the inner function can also access the variable of the outer function. This scope is called enclosed scope.
(iii) When a compiler or interpreter search for a variable in a program, it first searches Local, and then searches Enclosing scopes. Consider the following example
|
1. Disp(); |
Entire program |
Output of the program 10 10 |
23.
24.
The variables used inside the function may cause side effects though the functions which are not passed with any arguments. In such cases the function is called impure function.
For example the mathematical function random() will give different outputs for the same function call.
let randomnumber :=
a := random()
if a > 10 then
return: a
else
return: 10
25.
(i) Strlen is a pure function because the function takes one variable as a parameter, and accesses it to find its length.
(ii) This function reads external memory but does not change it, and the value returned derives from the external memory accessed.
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