Skip to main content
BharatBoard

Last verified: 28 November 2026 across official school board and government recruitment portals.

BharatBoard is a private, independent guide. It does not represent any government entity and does not provide any government service. Information is summarised from official board and government websites.

Tap any MCQ option to check
Original practice paper. Not an official board paper.Session 2026–27

Karnataka Board (KSEAB) · Class 12 · Set 2

Computer Science

Code 4115 questions20 marks1 hour

Practice for the 2027 board exams, session 2026-27. Exams are usually held in February, March and April.

Independent practice paper — verify on official board sources

Disclaimer: BharatBoard is an independent student and parent guide — not affiliated with, associated with, or endorsed by any Central Board, State Board, school, educational institution, recruitment commission, or government body, and does not represent any government entity. We recommend that you contact and verify all exam results, date sheets, syllabi, school admission dates, eligibility criteria, fee schedules, scholarships, and government job notifications directly with the respective school, institution, Central Board, State Board, or recruitment body via their official websites and notifications. These questions are original practice items for revision. Follow the official syllabus, the prescribed textbooks, and your school or institution. Model answers are a study aid. They are not an official marking scheme.

Karnataka Board (KSEAB) Class 12 Computer Science, Set 2, is an original BharatBoard revision set of 20 marks. It is shorter than a full board paper. The official syllabus and sample papers on the Karnataka Board (KSEAB) website remain the authority.

Timed Exam Mode

Official 60-minute writing countdown

01:00:00

General instructions & how to use this paper

  1. This revision set has 15 questions and 20 marks. Ten questions are one mark. Five questions are two marks. Attempt every question. A calculator is not needed.
  2. Timing is typical months only — always verify the exact dates on the official board website, which change every session.

Section A

· Multiple-choice questions

Attempt all ten 1-mark questions.

10 marks
Q1

Inside a Python function, variable `count = 0` is defined at module top level. Which keyword allows the function to reassign that outer `count` rather than creating a local variable?

1 mark

Model answer · Option C

Declaring `global count` binds assignments inside the function body directly to the module-level variable in the global namespace.

Q2

How do `f.readline()` and `f.readlines()` differ when reading a multi-line text file in Python?

1 mark

Model answer · Option B

`readline()` advances by a single newline-terminated string per call, while `readlines()` loads all unread lines into a Python list.

Q3

In Python binary file handling, which exception cleanly signals that `pickle.load(f)` has reached the end of the `.dat` file during a `while True` read loop?

1 mark

Model answer · Option A

When no further serialised bytes remain in a binary stream, `pickle.load()` raises `EOFError`, allowing the loop to break gracefully.

Q4

Opening a file in Python with mode `"ab+"` enables which combination of operations?

1 mark

Model answer · Option D

In `"ab+"`, `a` appends without truncation and creates missing files, `b` selects binary stream mode, and `+` permits reading.

Q5

Which application-layer protocol translates human-readable domain names like `ncert.nic.in` into numeric IP addresses?

1 mark

Model answer · Option C

DNS acts as the distributed directory of the Internet, resolving memorable hostnames into routable IPv4 or IPv6 addresses.

Q6

What distinguishes HTTPS from plain HTTP during online form submission?

1 mark

Model answer · Option B

TLS encryption under HTTPS protects sensitive session cookies, credentials, and form payloads in transit across public networks.

Q7

In SQL, which command category do `ALTER TABLE` (adding a column) and `DROP TABLE` belong to?

1 mark

Model answer · Option A

Commands that define, modify, or remove database schema structures (`CREATE`, `ALTER`, `DROP`) belong to Data Definition Language.

Q8

Table `BOOKS` has 8 rows and table `PUBLISHERS` has 4 rows. How many rows and columns result from an unfiltered Cartesian Product (`SELECT * FROM BOOKS, PUBLISHERS`) if they have 5 and 3 columns?

1 mark

Model answer · Option D

A Cartesian product multiplies cardinalities (8 × 4 = 32 rows) and sums degrees (5 + 3 = 8 columns).

Q9

Which SQL clause sorts query output from highest score to lowest score on attribute `TotalMarks`?

1 mark

Model answer · Option C

SQL uses `ORDER BY <column> DESC` for descending order (`ASC` is the default ascending order).

Q10

After executing `cur.execute("SELECT roll, name FROM students")` on a 10-row table in `mysql.connector`, what does `cur.fetchmany(3)` return?

1 mark

Model answer · Option B

`cursor.fetchmany(size)` retrieves up to `size` remaining rows as a list of tuples and advances the cursor position.

Section B

· Short-answer questions

Attempt all five 2-mark questions.

10 marks
Q11

Differentiate between positional arguments and keyword arguments in Python function calls with a short illustration.

2 marks

Model answer

Positional arguments bind strictly by left-to-right order (`power(2, 5)`), whereas keyword arguments explicitly name parameters (`power(exp=5, base=2)`), allowing flexible order.

Q12

Explain the difference between an Equi-Join and a Natural Join on two tables sharing column `DeptID`.

2 marks

Model answer

An Equi-Join matches rows using `A.DeptID = B.DeptID` and retains `DeptID` twice in the output, whereas a Natural Join automatically matches identical column names and eliminates the duplicate column.

Q13

Distinguish between a Router and a Repeater in computer networking.

2 marks

Model answer

A repeater operates at the physical layer to regenerate weakened signals over long cable runs, whereas a router operates at the network layer using IP addresses to forward packets across different networks.

Q14

State the difference between `DELETE FROM Emp;` and `DROP TABLE Emp;` in SQL.

2 marks

Model answer

`DELETE` is a DML command that removes rows (optionally filtered by `WHERE`) while preserving the empty table schema, whereas `DROP TABLE` is a DDL command that destroys both data and table structure.

Q15

Why is twisted-pair Ethernet cable limited to ~100 metres per segment whereas optical fibre spans many kilometres without signal interference?

2 marks

Model answer

Copper twisted pair suffers electrical attenuation and electromagnetic crosstalk, whereas optical fibre guides light pulses via total internal reflection immune to electromagnetic noise.

Official syllabus & blueprint sources

Syllabus scope and question-paper structure were verified against the official portals below, which remain the sole authority.