XII – Computer Science – Public questions (2019 – 2023)
Part – D ( 5 mark questions ) :
1. (a) Discuss about Linear Search algorithm with example.
(OR)
(b) Explain input ( ) and print ( ) functions with example.
2. (a) (i) Write a program to display all 3 digit even numbers.
i=100 (or)
while(i<=999): for i in range (100, 1000, 2):
print(i)
print(i)
i=i+1
(ii) Write the output for the following program.
i=1
1
while(i<=6):
for j in range(1,i):
1 2
print(j,end=’\t’) 1 2 3
print(end=’\’) 1 2 3 4
i+=1 1 2 3 4 5
(OR)
(b) Explain the following built – in functions.
(i) id( ) (ii) chr( ) (iii) round( ) (iv) type( ) (v) pow( )
3. (a) Write the output for the following Python commands :
str1=”Welcome to Python”
(i) print(str1) Welcome to Python
(ii) print(str1[11 : 17]) Python
(iii) print(str1[11 : 17 : 2]) Pto
(iv) print(str1[: : 4]) Wotyn
(v) print(str1[: : -4]) nytoW
(OR)
(b) How to define constructor and destructor in Python ? Explain with example.
.
4. (a) Explain the different set operations supported by Python with suitable example.
(OR)
(b) Differentiate DBMS and RDBMS.
5. (a) Write a SQL statement to create a table for employee having any five fields and create a table
constraint for the employee table.
Create table employee(emp_id integer, emp_name char(20), gender char(1), age integer, salary
integer, primarykey(emp_id, emp_name));
(OR)
(b) Write the features of Python over C++.
6. (a) Explain the types of variable scope .
(OR)
(b) Explain data types in Python with suitable example .
7. (a) Write the output for the following Python programs .
(i) j=15 15 14 13 12 11 10
while(j>=10):
print(j, end=’\t’)
j=j-1
else:
print(“\n End of the loop”)
(ii) k=5
1 2 3 4
while(k<=9):
1 2 3 4 5
for i in range(1,k):
1 2 3 4 5 6
print(i, end=’\t’)
1 2 3 4 5 6 7
print(end=’\n’)
1 2 3 4 5 6 7 8
k=k+1
(OR)
(b) Write about the following Python string functions .
(i) capitalize( )
(ii) swapcase( )
(iii) center( )
(iv) islower( )
(v) title( )
8. (a) Debug the following Python program to get the given output :
வெளியீடு :
Corrected Program
Inside add( ) function x value is : 10
x=0
In main x value is : 10
def add( ):
நிரல் :
global x
x=0
x = x + 10
define add:
print(“Inside add( ) function x value is :”, x)
globally x:
x=x+10 add( )
print(“Inside add() function x value is :”) print(“In main x value is :”, x)
add
print(“In main x value is:”) (OR)
(b) What is set in Python ? Explain the following set operations with suitable example.
(i) Union
(ii) Intersection
(iii) Difference
9. (a) Explain about constructors and destructors in Python with suitable example .
(OR)
(b) Explain the types of data model .
10. (a) Explain the types of constraints in SQL with suitable example .
(OR)
(b) List the differences between CSV and excel sheets (XLS) file .
11. (a) What is Binary Search ? Discuss with example .
(OR)
(b) Discuss in detail about Tokens in Python .
12. (a) Write a detail note on for loop .
(OR)
(b) Explain the scope of variables with an example .
13. (a) (i) What is slicing ?
(ii) What is output for the following Python Commands ?
str = “ Thinking with Python “
(i) print(str[::3]) Tnnwhyo
(ii) print(str[::-3]) nt igkh
(iii) print(str[9:13]) with
(OR)
(b) What is the purpose of range ( ) ? Explain with an example .
14. (a) Explain the characteristics of DBMS .
(OR)
(b) Write the different types of constraints and their functions .
15. (a) Write the Python script to display all the records of the following table using fetchmany ( ) .
Icode ItemName Rate
1003 Scanner 10500
1004 Speaker 3000
1005 Printer 8000
1008 Monitor 15000
1010 Mouse 700
பைத்தான் நிரல்
(OR)
(b) Write any five key differences between Histogram and Bar Graph .
16. (a) (i) What are called Paramenters ?
(ii)Write a note on : Parameter without type and Parameter with type .
(OR)
(b) Explain LEGB rule with example .
17. (a) Explain Bubble Sort Algorithm with example .
(OR)
(b) Construct the following SQL statements in the student table .
(i) SELECT கூற் று GROUP BY Clause ையன்ைடுத்தி
(ii) SELECT கூற் று ORDER BY Clause ையன்ைடுத்தி
18. (a) Explain input ( ) and output ( ) functions with example .
(OR)
(b) Explain the purpose of the following functions :
(i) plt.xlabel
(ii) plt.ylabel
(iii) plt.title
(iv) plt.legend( )
(v) plt.show( )
19. (a) Write a detail note on for loop .
(OR)
(b) Differentiate Excel file and CSV file .
20. (a) Explain the different set operations supported by Python with suitable example .
(OR)
(b) Explain each word of the following command .
Python <filename.py> - <i> <C++ filename without cpp extension>
21. (a) Discuss about linear search algorithm .
(OR)
(b) Explain the different types of function with an example .
22. (a) What is nested tuple ? Explain with an example .
(OR)
(b) Explain about SQLite and the steps to be used .
23. (a) Write a detail note on ‘for’ loop.
(OR)
(b) Explain the different types of operators used in Python .
24. (a) Write the different types of constraints and their functions ?
(OR)
(b) Explain the characteristics of DBMS .
25. (a) Write the different methods to read a file in Python .
(OR)
(b) What is the purpose of range ( ) ? Explain with an example .
26. (a) What is a List ? Why List, can be called as pairs ? Explain with suitable example .
(OR)
(b) Discuss about linear search algorithm .
27. (a) Discuss in details about Token in Python .
(OR)
(b) Explain the following built-in-function .
(i) id( )
(ii) chr( )
(iii) round( )
(iv) type( )
(v) pow( )
28. (a) What is Nested Tuple ? Explain with an example .
(OR)
(b) Explain the different types of relationship mapping .
29. (a) Write the syntax for getopt ( ) and explain tis arguments and return values .
(OR)
(b) Differentiate DBMS and RDBMS .
30. (a) Explain about differences between Histogram and Bar Graph .
(OR)
(b) Explain ‘continue’ statement with an example .
31. (a) What is Binary Search ? Explain with an example .
(OR)
(b) How will you facilitate data abstraction ? Explain it with suitable example .
32. (a) Explain input( ) மற் றும் print( ) functions with examples .
(OR)
(b) Explain the scope of variables with an example .
33. (a) Explain about string operators in Python with suitable example .
(OR)
(b) What are the different ways to insert an element in a list ? Explain with suitable example .
34. (a) Explain the characteristics of DBMS .
(OR)
(b) Explain about SQLite and the steps to be used .
35. (a) Write the different methods to read a file in Python .
(OR)
(b) Write any five features of Python .
oOo