0% found this document useful (0 votes)
3 views6 pages

12csc Minimized Material

The document provides a comprehensive overview of various concepts in computer science, particularly focusing on programming, data structures, algorithms, and database management. It covers topics such as subroutines, functions, abstract data types, control structures, and data visualization, along with examples and definitions. Additionally, it discusses Python programming specifics, including operators, functions, and data types, as well as SQL commands and data handling techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

12csc Minimized Material

The document provides a comprehensive overview of various concepts in computer science, particularly focusing on programming, data structures, algorithms, and database management. It covers topics such as subroutines, functions, abstract data types, control structures, and data visualization, along with examples and definitions. Additionally, it discusses Python programming specifics, including operators, functions, and data types, as well as SQL commands and data handling techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

VELAMMAL MATRICULATION HIGHER SECONDARY SCHOOL

12-COMPUTER SCIENCE -MINIMIZED MATERIAL


2m and 3m:
Ch1:
1. What is a subroutine?
Subroutines are small sections of code that are used to perform a particular task that
can be used repeatedly
2. Define Function with respect to Programming language.
A function is a unit of code that is often defined within a greater code structure
3. Write the inference you get from X:=(78).
• It is not an expression rather it is a function definition
• Where the value 78 is bound to the variable name x
4. Differentiate interface and implementation.
Interface Implementation
• Interface :just defines what an object can do, but won’t actually do it
• Implementation :carries out the instructions defined in the interface
5. Mention the characteristics of Interface.
• The class template specifies the interfaces to enable an object to be created and operated properly.
• An object's attributes and behaviour is controlled by sending functions to the object.
Ch2:
What is abstract data type?
Abstract Data type (ADT) is a type for objects whose behavior is defined by a set of values and operations.
What is a Pair? Give an example.
Pair is a compound structure which is made up of list or Tuple
Eg l[(0,10),(1,20)]
1. Differentiate Concrete data type and abstract data type.
CDT ADT
A concrete data type is a data type whose abstract data type the representation of a
representation is known data type is unknown
direct implementations independent of its implementation.
simple concept offer a high level view
2. Which strategy is used for program designing? Define that Strategy.
Wishful thinking, formation of belief and making decision according to what might be pleasing to imagine instead of
appealing to reality
Ch3:
1. What is a scope?
Scope refers to the accessibity of a variable with in one part of a program to another part of the same program.
3. What is mapping?
The process of binding a variable name with an object is called mapping
4. What do you mean by Namespaces?
Namespaces are containers for mapping names of variables to objects.
5. How Python represents the private and protected Access specifiers?
Private variable prefixed with double underscore
Protected variable prefixed with single underscore
Ch4:
1. What is an Algorithm?
It is a step-by-step procedure for solving a given problem.
2. Write the phases of performance evaluation of an algorithm.
• A Priori estimates: theoretical performance analysis of an algorithm.
• A Posteriori testing: performance measurement.
3. What is Insertion sort?
It is a simple sorting algorithm
It takes elements from the list one by one and inserting in correct position in to a new sorted list.
4. What are the factors that influence time and space complexity.
Time factor
Space factor
• Speed of the machine
• Compiler and other system Software Tools
• Operating System
• Programming language used
• Volume of data required
4. Write a note on asymptotic notation.
Asymptotic Notations are languages that use meaningful statements about time and space complexity.
(i) Big O
Used to describe the worst-case (upper bound) of an algorithm.
(ii) Big Ω
Reverse of Big O, used to describe the best case (lower bound)
(iii) Big Θ
Algorithm has a complexity with lower bound = upper bound,
Algorithm has a complexity
O (n log n)
Ω (n log n)
Θ (n log n),
The running time of algorithm always falls in n log n in the best-case and worst-case.
Ch5:
1. What are the different modes that can be used to test Python Program?
Interactive mode
Script mode
2. Write short notes on Tokens.
Python breaks each logical line into a sequence of elementary lexical components known as Tokens.
1) Identifiers,
2) Keywords,
3) Operators,
4) Delimiters and
5) Literals.
4. What is a literal? Explain the types of literals?
Literal is a raw data given to a variable or constant
1) Numeric-contain digits a=5
2) String-set of characters enclosed within single, double or triple quotes a=’hello’
3) Boolean-have two values: True or False.
5. Write short notes on Exponent data?
An Exponent data contains
• decimal digit part
• decimal point
• exponent part
• followed by one or more digits.
Eg 12.E03
1. Write short notes on Arithmetic operator with examples.
used to perform simple arithmetic operations
operator name eg Output
+ Addition >>>5+2 7
- Subtraction >>>5-2 3
* Multiplication >>>5*2 10
/ Division >>>5/2 2.5
% Modulus >>>5%2 1
** Exponent >>>5**2 25
// Floor division >>>5//2 2
2. What are the assignment operators that can be used in Python?
= is the assignment operator to assign values to variable.
operator name Eg Output
= Assignment operator >>>a=5 a=5
+= Added and assign >>>a+=2 a=a+2
-= Subtracted and assign >>>a-=2 a=a-2
*= Multiplied and assign >>>a*=2 a=a*2
/= Divided and assign >>>a/=2 a=a/2
%= Modulus and assign >>>a%=2 a=a%2
**= Exponent and assign >>>a**=2 a=a**2
//= Floor division and >>>a//=2 a=a//2
assign
3. Explain Ternary operator with examples.
• Ternary operator is also known as conditional operator
• evaluate something based on a condition being true or false.
• Replacing the multiline if-else
• make the code compact.
syntax
Variable Name = [on_true] if [Test expression] else [on_false]
Eg
a= 49 if 49<50 else 50
4. Write short notes on Escape sequences with examples.
• the backslash "\" is a special character, also called the "escape" character.
• It is used in representing certain whitespace characters:
• \t-tab
• \n-newline
• \r-carriage return.
Eg print(“hello\npython”)
Ch6:
1.define control structure and List the control structures in Python.
A program statement that causes a jump of control from one part of the program to another is called control structure
3. Write is the syntax of if..else statement
if <condition>:
statements-block 1
else:
statements-block 2
4. Write the syntax of while loop.
while <condition>:
statements block 1
[else:
statements block2]
5. List the differences between break and continue statements.
Break Continue
terminates the loop skip the remaining part of a loop
Control flows to the statement immediately after the Start with next iteration.
body of the loop.
Syntax : break Syntax: continue

Ch7:
1. What is function?
Functions are nothing but a group of related statements that perform a specific task
2. Write the different types of function
User-defined Functions-functions defined by the users themselves
Built-in Functions- functions that is inbuilt within python
Lambda Functions- functions that are anonymous unnamed function
Recursion Functions- functions that calls itself
3. What are the main advantages of function?
It avoids repetition and makes high degree of code reusing.
It provides better modularity for your application.
4. What is base condition in recursive function?
The condition that is given in any recursive function is known as base condition.
5. Differentiate ceil() and floor() function?
ceil() floor()
Returnsthe smallest integer greater than or equal to x Returns the largest integer less than or equal to x
math.ceil (x) math.floor (x)
>>>math.ceil(26.7) >>>math.floor(26.7)
Output: Output:
27 26

6. What are the points to be noted while defining a function?


Function blocks begin with the keyword “def” followed by parenthesis ().
Parameters should be placed within the parentheses
The code block comes after a colon (:) and its indented.
return None exits a function
return expression
Ch8:
1. What is String?
• it is a data type
• used to handle array of characters.
• It is a combination of letters, numbers, or special symbols
• enclosed within single, double or even triple quotes.
Ex. “Python”
2. Do you modify a string in Python?
No string is immutable
3.How will you delete the string in python?
del command is used to delete the string
4. Write a short about the followings with suitable example:
(a) capitalize( ) (b) swapcase( )
(a) capitalize( ):
Used to capitalize the first character of the string
Syntax: capitalize()
Eg: city="chennai"
print(city.capitalize())
Output: Chennai
b) swapcase( )
It will change case of every character to its opposite case vice-versa.
Syntax: swapcase()
Eg: str1="tAmiL NaDu"
print(str1.swapcase())
Output: TaMIl nAdU
5.What is the use of format( )? Give an example.
• The format( ) function used with strings
• It is very versatile and powerful function
• Used for formatting strings.
eg
a=5
print ("The value of a is { }".format(a))
Ch9:
1. What is List in Python?
It is a “sequence data type”
It is an ordered collection of values
enclosed within square brackets [ ].
Each value of a list is called as element.
Eg l=[1,4,5]
2. Differentiate del with remove( ) function of List.
Del remove()
used to delete elements if its index is used to delete elements if its index is
known. unknown.
delete multiple elements or entire list delete a particular element
3. What are the advantages of Tuples over a list?
List Tuple
List is mutable tuple is immutable
List enclosed within square brackets tuple enclosed within parenthesis
Iterating list is faster Iterating tuples is faster
4. Write a short note about sort( ).
Sorts the element in list.
Syntax: List.sort(reverse=True|False, key=myFunc)
Ex:
m=[10,30,20]
m.sort()
print(m)
Ch10
1. What is class?
Class is the main building block in Python.
Object is a collection of data and function that act on those data.
Class is a template for the object.
2. What is instantiation?
The process of creating object is called as “Class Instantiation”.
3. What is the purpose of Destructor?
It is used to remove the memory space created for the object.
4. What are class members? How do you define it?
Class variable and methods are together known as members of the class.
Class variable: variable declared inside the class
Method:method is also called function
Ch 11:
1.List some examples of RDBMS.
SQL server, Oracle, mysql, MariaDB, SQLite
2.List some example of DBMS
Dbase,foxpro
2.What is data consistency?
Data Consistency means that data values are the same at all instances of a database
3.What is the difference between Hierarchical and Network data model?
Hierarchical data model Network data model
a child can have only one parent node, a child may have many parent nodes
one-to-many relationship many-to-many relationships.
It is not easier and faster it is easier and faster
4.What is normalization?
Normalization reduces data redundancy and improves data integrity
5.What is the role of DBA?
• manages the complete DBMS
• managing the license keys,
• managing user accounts and access
• takes care of the security of the DBMS,
6.Write a note on different types of DBMS users.
• Database Administrators
• Application Programmers or Software Developers
• Database designer
• End User

Ch -12
1.What is the difference between SQL and MySQL?
SQL MySQL
Structured query language is a language to It is database management system/RDBMS
access the database
2.Write any three DDL commands.(any three)
Create To create tables in the database.
Alter Alters the structure of the database.
Drop Delete tables from database.
Truncate Remove all records from a table,
3. Write the use of Savepoint command with an example.
used to save a transaction temporarily
Syntax SAVEPOINT savepoint_name;
Eg SAVEPOINT A;
4. Write a SQL statement using DISTINCT keyword.
Select distinct place from Student;
Ch:13
1.What is CSV File?
CSV (Comma Separated Values) files.
A CSV file is a human readable text file where each line has a number of fields, separated by commas or some other
delimiter.
2.Mention the two ways to read a CSV file using Python.
i)reader function
ii) DictReader class.
3.What is use of next() function?
used to skip the first row while sorting.
4.What is the difference between reader() and DictReader() function?
csv.reader Dict reader
It works with list/tuple It works with dictionary
It does not take additional arguements It take additional arguments
It is a function It is a class
Ch 14:
1.What is the theoretical difference between Scripting language and other programming language?
Scripting language Programming language
It require interpreter It require compiler
Ex.java script ,vb script,php Ex.c++
2.Differentiate Compiler and Interpreter.
Interpreter Compiler
Translates program one statement at a Translates it as a whole into machine
time. code.
Python,ruby. C,C++
3.Write the expansion of
(i) SWIG-Simplified Wrapper Interface Generator
(ii) MinGW-Minimalist GNU for Windows
4.What is the use of cd command. Give an example.
cd command refers to change directory
Ex: cd python
Ch -15
1.Which method is used to connect a database? Give an example.
connect() method is used to connect a database
cn= sqlite3.connect ("Academy.db")
2.Write the command to populate record in a table. Give an example.
insert command to populate record in a table
Ex. c.execute(“insert into employee values(101,’jaya’)”)
3.Which method is used to fetch all rows from the database table?
The fetchall() method is used to fetch all rows from the database table
4.Mention the difference between fetchone() and fetchmany()
Fetchone Fetchmany
Returns the next row of a query result set none in Returns the next number of rows of the query
a case no row left result set

Ch -16 • Line plot


1.What is Data Visualization? • Scatter plot
Data Visualization is the graphical representation of • Histogram
information and data • Box plot
2. List the general types of data visualization. • Bar chart and
• Charts • Pie chart
• Tables 4. How will you install Matplotlib?
• Graphs Python -m pip install -U matplotlib
• Maps 5. Write any three uses of data visualization.
• Infographics • help users to analyze and interpret the data easily.
• Dashboards • It makes complex data understandable and usable.
3. List the types of Visualizations in Matplotlib. • helps to show relationship between one or more
variables.

You might also like