12th Computer Science Important 1 Mark Questions Chapter Wise
The one-mark section of Class 12 Computer Science is built from precise definitions and small Python facts. If you know the exact term the textbook uses for each idea, most questions take seconds. Here is what each chapter's book back questions test.
Unit 1: Function
- Small sections of code that perform a particular task are subroutines
- Variables in a function definition are parameters; values passed in are arguments
- An interface defines what an object can do; the implementation carries it out
- Pure functions give the same result for the same arguments; impure functions cause side effects
Unit 2: Data Abstraction
- Constructors build an abstract data type; selectors retrieve information from it
- A data type whose representation is known is concrete; one whose representation is unknown is abstract
- Bundling two values together gives a pair; classes let you name the parts of a multi-item object
Unit 3: Scoping
- Scope is the visibility of variables in different parts of a program
- Binding a name to an object is mapping, done with
=; namespaces are the containers for these mappings - Local scope refers to variables defined in the current function
- Private members are accessible only within the class; protected members also in subclasses; public members from outside
Unit 4: Algorithmic Strategies
- The word algorithm comes from the mathematician al-Khowarizmi
- Efficiency is measured by time and space; selection sort needs the minimum number of swaps
- Big O is the worst case, Big Ω is its reverse, and Θ represents the average case
- Binary search is also called half-interval search
- Storing previously calculated values in dynamic programming is memoization
Unit 5: Python Variables and Operators
- Python was developed by Guido van Rossum;
>>>is the interpreter prompt - Ctrl + N creates a new program;
#starts a comment; a comma prints several items on one line - Relational operators are also called comparative operators; the ternary operator is the conditional operator
Unit 6: Control Structures
- Python has three important control structures: sequential, alternative (branching) and iterative
elifis short for else if; indentation defines blockspassis used as a placeholder;foris a definite loop- An if or else line must end with a colon
Unit 7: Python Functions
- A function that calls itself is recursion; an anonymous function is a lambda
defbegins a function block andreturnexits it- Required arguments are passed in the correct positional order
- Data types need not be declared, but keywords cannot be used as function names
Unit 8: Strings and String Manipulation
- Strings are immutable;
+concatenates; triple quotes create multiline strings [ ]is the slicing operator, and the stride is the third argument of a slice%Eprints exponential notation in upper case;{ }are placeholders forformat()- A subscript can be positive or negative
Unit 9: Lists, Tuples, Sets and Dictionary
len()counts elements;append()adds one element andextend()adds severaltype()tells you the data type of an object- Symmetric difference contains elements in either set but not in both
- In a dictionary, a colon separates each key from its value
Unit 10: Python Classes and Objects
- Functions defined inside a class are methods; members are accessed with the dot operator
__init__()runs automatically when an object is created;__del__()is the destructor- A private variable is prefixed with
__; creating an object is instantiation
Unit 11: Database Concepts
- A table is a relation and a tuple is a row
- The hierarchical model represents parent-child, one-to-many relationships
- E F Codd proposed the relational model and is called the father of relational databases; Chen developed the ER model
- σ (sigma) is the symbol for SELECT in relational algebra
Unit 12: Structured Query Language (SQL)
- DDL commands define and modify table structures
ALTERchanges a table's structure;DROPdeletes a table with its structureSELECTgenerates queries;ORDER BYsorts the result
Unit 13: Python and CSV Files
- A CSV file is a flat file; CRLF means Carriage Return and Line Feed
- Python's
csvmodule handles CSV files; binary mode is for non-text files next()skips a row;DictReader()maps rows to dictionaries
Unit 14: Importing C++ Programs in Python
- HTML is not a scripting language
- Importing a C++ program into Python is called wrapping; Boost is a framework for it
- API stands for Application Programming Interface; the OS module interfaces with Windows
Unit 15: Data Manipulation through SQL
- SQLite is a relational database system; a cursor traverses and fetches records
- Changes are saved with commit;
execute()runs an SQL command AVG()andMAX()are aggregate functions;DISTINCTremoves duplicatessqlite_masteris the master table
Unit 16: Data Visualization using Pyplot
matplotlib.pyplotis the package for 2D charts; PIP installs packages- A dashboard combines resources into a single visual display
- A line chart shows a trend over time;
plt.pie()draws a pie chart andautopctshows percentages
How to revise this section
Test yourself rather than re-reading. Turn each bullet into a question, answer it from memory, and keep a single page of the ones you miss. The full solved sets are on the Class 12 Computer Science section, where every chapter also has a timed practice test.