0% found this document useful (0 votes)
42 views5 pages

12 TH Answer Key

Uploaded by

vetripublic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views5 pages

12 TH Answer Key

Uploaded by

vetripublic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

VETRI VIDYALAYA HR SEC

SCHOOL E – VELANUR
CLASS: XII-A,E1,E2,E3 SUBJECT:COMPUTER SCIENCE KEY ANSWER DATE:11-01-2021
1.B) Recursion 2.D) Def 3.C) Def 4.D)udaNlimaT 5.A)+ 6.A) {}
7.C) [10,20,30,40,50] 8.D) {1,3,6,9} 9.B) 8 10. B) . 11. B) Tamil
12. C) Edgar Frank Codd 13.B) Row 14. D) Alter 15.A) Select
16. What is function?
 Functions are named blocks of code that are designed to do one specific job.

 Types of Functions are User defined, Built-in, lambda and recursion.

 Function blocks begin with the keyword “def ” followed by function name and parenthesis ().
17. Main advantages of functions are ,
o It avoids repetition and makes high degree of code reusing.
o It provides better modularity for your application.
18. What is String?
 String is a data type in python, used to handle array of characters.
 String is a sequence of characters that may be a combination of letters, numbers, or special
symbols enclosed within single, double or even triple quotes.

19. HALF YEARLY EXAM HALF YEARLY EXAM HALF YEARLY EXAM HALF YEARLY
EXAM HALF YEARLY EXAM.
20. How will you access the list elements in reverse order?
 Python enables reverse or negative indexing for the list elements.
 A negative index can be used to access an element in reverse order.
 Thus, python lists index in opposite order.
 The python sets -1 as the index value for the last element in list and -2 for the preceding
element and so on.
 This is called as Reverse Indexing.
21. What is set in Python?
 In python, a set is another type of collection data type.
 A Set is a mutable and an unordered collection of elements without duplicates or repeated
element.
 This feature used to include membership testing and eliminating duplicate elements.
22. How will you create constructor in Python?
 “init” is a special function begin and end with double underscore in Python act as a
Constructor.
 Constructor function will automatically executed when an object of a class is created.
General format:
def init (self, [args .......... ]):
<statements>
23. List some examples of RDBMS.
 SQL Server
 Oracle
 MySQL
 MariaDB
 SQLite

24. SELECT * FROM Student WHERE Age<=18 ORDER BY Name;

25.

26.

27. What is the use of format( )? Give an example.


 The format( ) function used with strings is very powerful function used for formatting
strings.
 The curly braces { } are used as placeholders or replacement fields which get replaced along
with format( ) function.
EXAMPLE:
num1=int (input("Number 1: ")) num2=int (input("Number 2: "))
print ("The sum of { } and { } is { }".format(num1, num2,(num1+num2)))

OUTPUT:
Number 1: 34
Number 2: 54
The sum of 34 and 54 is 88

28. OUTPUT: [1, 2, 4, 8, 16]

29. Output:
>>>
Good Morning Bindu Madhavan
30. 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.


 SYNTAX FOR DEFINING A CLASS:
class class_name: statement_1 statement_2
…………..
…………..

statement_n

31. 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.

32. Create Command: To create tables in the database.


CREATE TABLE Student (Admno integer, Name char(20), Gender char(1), Age integer);
Alter Command: Alters the structure of the database.
ALTER TABLE Student ADD Address char;
Drop Command: Delete tables from database.
DROP TABLE Student;

33. Write the use of Savepoint command with an example.


 The SAVEPOINT command is used to temporarily save a transaction so that you can rollback
to the point whenever required.
Syntax: SAVEPOINT savepoint_name;
Example: SAVEPOINT A;

34. Types of Functions


 User defined Function
 Built-in Function
 Lambda Function
 Recursion Function Explains OR

STRING OPERATORS
Python provides the following string operators to manipulate string.
i)Concatenation (+)
(ii) Append (+ =)
(iii) Repeating (*)
(iv) String slicing
(v) Stride when slicing string Explains
35. range():
 The range( ) is a function used to generate a series of values in Python.
 Using range( ) function, you can create list with series of values.
 The range( ) function has three arguments.
Syntax of range ( ) function:
range (start value, end value, step value)
where,
 start value – beginning value of series. Zero is the default beginning value.
 end value – upper limit of series. Python takes the ending value as upper limit – 1.
 step value – It is an optional argument, which is used to generate different interval of values.

Example : Generating whole numbers upto 10


for x in range (1, 11):
print(x)
Output:
1
2
3
4
5
6
7
8
9
10 OR

A Set is a mutable and an unordered collection of elements without duplicates.


Set Operations:
The set operations such as
1.Union,
2. Intersection,
3.difference
4.Symmetric difference Explains

36. Types of Data Model


The different types of a Data Model are,
 Hierarchical Model
 Relational Model
 Network Database Model
 Entity Relationship Model
 Object Model Explains OR

Types of Relationships : There are the types of relationships used in a database.


1. One-to-One Relationship
2. One-to-Many Relationship
3. Many-to-One Relationship
4. Many-to-Many Relationship Explains

37. 1. Data Stored in a Tables


2. Reduced Redundancy
3.Data Consistency
4.Support Multiple user and Concurrent Access
5.Query Language
6. Security
7. DBMS Supports Transactions Explains OR

CODE:
x=int(input("Enter first number:")) y=int(input("Enter second number:")) if x>y:
min=x
else:
min=y
while(1):
if((min%x == 0) and (min % y == 0)): print("LCM is:",min)
break min=min+1
OUTPUT:
Enter first number:2 Enter second number:3 LCM is: 6

38. (i) To display the details of all employees in descending order of pay.
SELECT * FROM employee ORDER BY DESC;
(ii) To display all employees whose allowance is between 5000 and 7000.
SELECT * FROM employee WHERE allowance BETWEEN 5000 AND 7000;
(iii) To remove the employees who are mechanic.
DELETE FROM employee WHERE desig=‟Mechanic‟;
(iv) To add a new row.
INSERT INTO employee
(empcode,name,desig,pay,allowance)VALUES(S1002,Baskaran,Supervisor,29000,12000);
(v) To display the details of all employees who are operators.
SELECT * FROM employee WHERE design=‟Operator‟; OR

Constraint is a condition applicable on a field or set of fields.

Explains என்றும் அன்புடன்


ரா.அய்யப்பன் M.Sc.,B.Ed., M.Phil….,

@@@@@@@ வாழ்க வளமுடன் @@@@@@@@@@

You might also like