IMPORTANT THEORY QUESTIONS FROM 12TH CBSE COMPUTER SCIENCE
Python Programming Theory
1. Difference between append() and extend()?
● append(): Adds its argument as a single element to the end of a list. The length of the
list increases by one.
● extend(): Iterates over its argument and adds each element to the list, extending the
list. The length increases by the number of elements in the iterable.
2. What is the difference between a Parameter and an Argument?
● Parameter: The variable listed inside the parentheses in the function definition (e.g.,
def myfunc(a, b): where a and b are parameters).
● Argument: The actual value sent to the function when it is called (e.g., myfunc(10,
20) where 10 and 20 are arguments).
3. Explain Local vs. Global Variables.
● Local Variable: A variable defined inside a function. it is only accessible within that
function.
● Global Variable: A variable defined outside any function. It can be accessed throughout
the program. To modify a global variable inside a function, the global keyword must be
used.
4. What is Pickling and Unpickling?
● Pickling: The process of converting a Python object hierarchy (like a list or dictionary)
into a byte stream so it can be saved into a binary file.
● Unpickling: The inverse operation, where a byte stream from a binary file is converted
back into a Python object.
5. Difference between seek() and tell()?
● tell(): Returns the current position of the file pointer (an integer) within the file.
● seek(offset, whence): Used to move the file pointer to a specific position. offset
is the number of bytes to move, and whence defines the reference point (0 for start, 1 for
current, 2 for end).
Database Management (SQL) Theory
1. Define Degree and Cardinality.
● Degree: The total number of attributes (columns) in a relation (table).
● Cardinality: The total number of tuples (rows) in a relation.
2. What are Primary and Alternate Keys?
● Primary Key: A column or set of columns that uniquely identifies each row in a table. It
cannot contain NULL values.
● Alternate Key: Any candidate key that was not chosen as the primary key.
3. Difference between DELETE and DROP commands.
● DELETE: A DML command used to remove specific rows from a table based on a
condition. The table structure remains.
● DROP: A DDL command used to remove the entire table (data + structure) from the
database.
Computer Networks Theory
1. Explain Star Topology with advantages and disadvantages.
Getty Images
● Definition: All nodes are connected to a central connection point like a hub or switch.
● Advantages: Easy to install and manage; if one cable fails, only that node is affected.
● Disadvantages: If the central hub fails, the entire network goes down; requires more
cable than Bus topology.
2. Difference between Circuit Switching and Packet Switching.
● Circuit Switching: A dedicated physical path is established between the sender and
receiver for the duration of the communication (e.g., traditional phone calls).
● Packet Switching: Data is broken into small "packets" that are sent independently over
the network and reassembled at the destination (e.g., the Internet).
3. What is the purpose of the ping command?
● It is a network utility used to test the reachability of a host on an IP network and to
measure the round-trip time for messages sent from the originating host to a destination
computer.
Data Structures Theory
1. What is a Stack and what is its principle?
● Definition: A linear data structure that follows the LIFO (Last-In-First-Out) principle.
● Operations:
○ PUSH: Adding an element to the top of the stack.
○ POP: Removing the top element from the stack.
● Applications: Undo mechanisms in editors, expression evaluation, and function call
management.