All Practice Exams

100+ Free Karnataka II PUC Computer Science (KSEAB) Practice Questions

Karnataka School Examination and Assessment Board (KSEAB) II PUC Class 12 Computer Science (Code 41) practice questions are available now; exam metadata is being verified.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
100+ Questions
100% Free

Loading practice questions...

2026 Statistics

Key Facts: Karnataka II PUC Computer Science (KSEAB) Exam

~70 + 30

Common theory + practical/project mark split (total 100)

KSEAB II PUC science practical subject pattern

~3 h 15 m

Typical theory duration (often includes reading time)

KSEAB II PUC Computer Science model paper logistics

Code 41

Official subject code for II PUC Computer Science

KSEAB / DPUE Computer Science blueprint

~35%

Commonly reported overall pass threshold (confirm circular)

KSEAB II PUC pass criteria reporting

Mixed + practical

Official format is mixed written theory plus practical/project, not pure MCQ

KSEAB II PUC Computer Science assessment pattern

English MCQ adaptation

This free local bank is not the official mixed paper format

OpenExamPrep practice policy

KSEAB II PUC Computer Science (code 41) is a Class 12 board subject with ~70 theory + ~30 practical/project and theory lasting about 3 h 15 m. Pass is commonly ~35% overall (~30–35% careful wording) as notified. Fees are paid through colleges. This free 2026 bank is an English MCQ study adaptation — not an official paper simulation.

Sample Karnataka II PUC Computer Science (KSEAB) Practice Questions

Try these sample questions to test your Karnataka II PUC Computer Science (KSEAB) exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1In Python, which block is used to handle an exception that may occur during program execution?
A.except
B.catch
C.handle
D.rescue
Explanation: Python uses try/except for exception handling. Code that might fail is placed in try, and matching errors are handled in one or more except clauses.
2Which built-in exception is raised when a program attempts to divide an integer by zero in Python?
A.ValueError
B.ZeroDivisionError
C.ArithmeticError only (never subclassed)
D.IndexError
Explanation: Dividing by zero raises ZeroDivisionError, a subclass of ArithmeticError. Catching ZeroDivisionError handles this specific failure without hiding unrelated arithmetic issues.
3In a try/except/else/finally structure, when does the else block run?
A.Only if an exception was raised and caught
B.Always, whether or not an exception occurred
C.Only if no exception was raised in the try block
D.Only if the finally block is omitted
Explanation: The else clause of try runs when the try suite completes without raising an exception. It is useful for code that should run only on success, while finally still runs for cleanup regardless.
4What does the raise statement do in Python?
A.Silently ignores the last exception
B.Converts any exception into a return value of None
C.Terminates only the current except block without an exception object
D.Explicitly throws an exception (or re-raises the current one)
Explanation: raise ExceptionType(...) creates and throws an exception. Bare raise inside an except re-raises the active exception, which is useful after logging or partial handling.
5Consider: try: x = int('12a') except ValueError: print('A', end='') except Exception: print('B', end='') else: print('C', end='') finally: print('D', end='') What is printed?
A.AD
B.BD
C.ACD
D.ABCD
Explanation: int('12a') raises ValueError, so the first except runs and prints A. else is skipped because an exception occurred. finally always runs and prints D, producing AD.
6Which open mode creates a new file for writing or truncates an existing text file in Python?
A.r
B.w
C.a
D.x only (and never truncates)
Explanation: Mode 'w' opens for writing: if the file exists it is truncated to zero length; if not, it is created. Use carefully when you must not destroy existing content.
7What is the main advantage of using a with statement when opening files in Python?
A.It encrypts the file contents automatically
B.It converts every file to binary mode
C.The file is closed automatically when the block ends, even if an error occurs
D.It prevents any exception from being raised during I/O
Explanation: with open(...) as f: uses a context manager that guarantees f.close() on block exit, including abnormal exits from exceptions, reducing resource leaks.
8A text file contains exactly three lines: 'A\n', 'B\n', and 'C' (no trailing newline on the last line). How many strings does f.readlines() return?
A.2
B.4
C.1
D.3
Explanation: readlines() returns one string per line, including newline characters where present. Three lines yield three list elements: ['A\n', 'B\n', 'C'].
9Which statement about binary file modes in Python is correct?
A.Modes such as 'rb' and 'wb' transfer raw bytes without universal newline translation
B.Binary modes always store Python objects via pickle automatically
C.Binary modes can only open files smaller than 1 KB
D.'rb' is identical to 'r' on every platform for all text encodings
Explanation: Binary modes read/write bytes and skip text encoding and newline translation. They are used for images, executables, and other non-text data.
10File f is opened with open('data.txt','r'). After f.read(5) returns the first five characters, what does a subsequent f.tell() report if those characters were the start of the file?
A.0 (pointer always resets after read)
B.5 (file pointer is after the five characters read)
C.1 (pointer counts lines, not characters)
D.EOF constant −1 always
Explanation: Each successful read advances the file pointer. After reading five characters from offset 0, tell() returns 5 (in text mode the value is a opaque position but for simple ASCII files it matches the byte/character offset taught at this level).

About the Karnataka II PUC Computer Science (KSEAB) Practice Questions

Verified exam format metadata for Karnataka School Examination and Assessment Board (KSEAB) II PUC Class 12 Computer Science (Code 41) is pending. The practice questions above remain available while official exam length, timing, passing score, fee, and administrator details are reviewed.