Time allowed: 3 hours · Maximum marks: 70 · AW-12CS-BP-71083
| EventID | EventName | EventDate | Venue |
|---|---|---|---|
| E1 | Blitz Open | 2025-04-13 | Multi-Purpose Hall |
| E2 | Junior Chess League | 2025-05-18 | Auditorium Hall |
| E3 | Rapid Chess Cup | 2025-06-11 | Multi-Purpose Hall |
| E4 | Puzzle Solving Round | 2025-10-10 | Activity Room 3 |
| MemberID | MName | Club | Grade | Points |
|---|---|---|---|---|
| 101 | Vikram | Art Club | 8 | 76 |
| 102 | Aarav | Chess Club | 9 | 66 |
| 103 | Nikhil | Science Club | 8 | 79 |
| 104 | Asha | Chess Club | 11 | 84 |
| 105 | Yash | Science Club | 12 | 73 |
| 106 | Aditya | Art Club | 11 | 27 |
| MatchID | Fixture | MatchDate | Ground |
|---|---|---|---|
| M1 | House Cup | 2025-05-08 | Indoor Hall |
| M2 | Under-17 Semi-final | 2025-05-10 | Main Ground |
| M3 | Friendly Match | 2025-05-27 | Main Ground |
| M4 | Zonal Qualifier | 2025-06-23 | Main Ground |
| M5 | Under-14 Final | 2026-01-20 | Indoor Hall |
| From | To | Distance |
|---|---|---|
| Block C | Block D | 155 m |
| Block C | Block A | 95 m |
| Block C | Block B | 150 m |
| Block D | Block A | 90 m |
| Block D | Block B | 115 m |
| Block A | Block B | 120 m |
Computer Science: Board Exam Practice Paper · AW-12CS-BP-71083 · For the parent or teacher: award the marks shown for each step, even when the final answer is wrong.
| Q | Answer and marks for each step | Marks |
|---|---|---|
| Section A (21 × 1 = 21 marks) | ||
| 1 | (d) 4 split() with no argument splits at spaces | 1 |
| 2 | (a) files-store-data-for-later join() puts the separator between the words | 1 |
| 3 | (c) {'mango': 45, 'papaya': 38, 'banana': 85, 'apple': 75} assigning to an existing key changes it; a new key is added at the end | 1 |
| 4 | (b) RollNo RollNo is the only attribute here whose values are all different and never NULL (two students share marks) | 1 |
| 5 | (b) True 20 L * 4 repeats the list 4 times, so it has 20 items | 1 |
| 6 | (c) 33 global x makes the function change the variable outside it | 1 |
| 7 | (c) 4 check each character in turn | 1 |
| 8 | (a) simplex | 1 |
| 9 | (c) 1 rows where Name LIKE '%i%' | 1 |
| 10 | (a) 2 1 1 occurs twice; its first index is 1 | 1 |
| 11 | (b) len() | 1 |
| 12 | (a) every node is attached to one backbone cable | 1 |
| 13 | (d) 8 5 + 3: every attribute of both | 1 |
| 14 | (d) FileNotFoundError (an IOError) | 1 |
| 15 | (a) tuple | 1 |
| 16 | (d) (20, 100) return a + b, a * b returns a tuple of two values | 1 |
| 17 | (b) 520 MHz 590 − 70: bandwidth is the range of frequencies | 1 |
| 18 | (a) AB count indices from 0; the stop index is not included | 1 |
| 19 | (c) 3 DISTINCT keeps one of each value: Desk, Paper, Writing | 1 |
| 20 | (d) A is false, but R is true. A is false: pickle writes bytes, so it needs a binary mode, not a text mode. R is true. | 1 |
| 21 | (d) A is false, but R is true. A is false: 'Shreya' does not start with D. R is true. | 1 |
| Section B (7 × 2 = 14 marks) | ||
| 22 | Global variable: defined outside every function; it can be used anywhere in the program. Local variable: defined inside a function; it can be used only inside that function. Example: speed = 3 # global def display(): level = 49 # local print(speed, level) display() print(speed) Output: 3 49 3 Here speed is global: it is used both inside and outside display(). level is local to display(): using it outside display() gives a NameError.
| 2 |
| 22 OR | 2 Red
| 2 |
| 23 | ['FF', 9, '#', 'KK', 'BB', '#']
| 2 |
| 24 | 150 150
| 2 |
| 24 OR | def count_start(words, ch): count = 0 for w in words: if w.startswith(ch): count += 1 print(count)
| 2 |
| 25 |
| 2 |
| 25 OR |
| 2 |
| 26 | [135, 10, 209, 185] 209 3
| 2 |
| 27 | DDL (Data Definition Language) commands define or change the structure of tables, e.g. CREATE, ALTER, DROP. DML (Data Manipulation Language) commands work on the data in tables, e.g. INSERT, UPDATE, DELETE. Example: ALTER TABLE EVENT ADD Age INT; / DELETE FROM EVENT;
| 2 |
| 27 OR |
| 2 |
| 28 |
| 2 |
| 28 OR | (a) A switch connects computers in a network and sends each packet only to the computer it is meant for. (b) A router connects different networks and finds the best path for data from one network to another.
| 2 |
| Section C (3 × 3 = 9 marks) | ||
| 29 | def CountVowels(): f = open("para.txt", "r") count = 0 data = f.read() for ch in data: if ch in "aeiouAEIOU": count += 1 print("Vowels:", count) f.close() CountVowels() For the file above it displays: Vowels: 31
| 3 |
| 29 OR | def StartsWith(): f = open("story.txt", "r") for line in f: if line[0] == "T": print(line, end="") f.close() StartsWith() For the file above it displays: The river flows past our town The bus was late today
| 3 |
| 30 | R = {'Zoya': 77, 'Ishaan': 79, 'Yash': 44, 'Aditi': 55} Toppers = [] def Push_name(): for name in R: if R[name] >= 60: Toppers.append(name) def Pop_name(): while len(Toppers) > 0: print(Toppers.pop()) print("Stack Empty")
| 3 |
| 31 | def avg_len(words): total = 0 count = 0 for w in words: total += len(w) count += 1 return total / count my_words = ['network', 'window', 'memory', 'screen'] print("Average word length:", avg_len(my_words)) It prints: Average word length: 6.25
| 3 |
| 31 OR | pairs = ((9, 7), (8, 6), (3, 3), (4, 4)) def cnt_odd(t): c = 0 for a, b in t: if a % 2 == 1 and b % 2 == 1: c += 1 return c print("Number of odd-odd pairs:", cnt_odd(pairs)) It prints: Number of odd-odd pairs: 2
| 3 |
| Section D (4 × 4 = 16 marks) | ||
| 32 |
| 4 |
| 32 OR |
| 4 |
| 33 | import csv def AddStudent(): Roll_No = input("Enter Roll No: ") Name = input("Enter Name: ") Marks = input("Enter Marks: ") with open("Students.csv", "a", newline="") as f: w = csv.writer(f) w.writerow([Roll_No, Name, Marks]) print("Record added.") def ShowToppers(): count = 0 with open("Students.csv", "r") as f: for row in csv.reader(f): if int(row[2]) >= 90: print(row[1]) count += 1 print("Count:", count)
| 4 |
| 34 |
| 4 |
| 35 | import mysql.connector con = mysql.connector.connect(host="localhost", user="manager", password="lib@2025", database="StoreDB") cur = con.cursor() cur.execute("SELECT PName, Price FROM product WHERE Price > 193") rows = cur.fetchall() for row in rows: print(row) con.close()
| 4 |
| Section E (2 × 5 = 10 marks) | ||
| 36 | import pickle def AddStaff(): Emp_No = int(input("Enter Emp No: ")) Name = input("Enter Name: ") Department = input("Enter Department: ") Salary = int(input("Enter Salary: ")) rec = [Emp_No, Name, Department, Salary] with open("Staff.dat", "ab") as f: pickle.dump(rec, f) print("Record added.") def ShowSalaryAbove(limit): count = 0 with open("Staff.dat", "rb") as f: try: while True: rec = pickle.load(f) if rec[3] > limit: print(rec) count += 1 except EOFError: pass print("Records found:", count) For example, if the file holds [501, 'Tara', 'Accounts', 31000], [502, 'Ishaan', 'Accounts', 41000], [503, 'Farhan', 'Library', 45000], [504, 'Sana', 'Admin', 30000], ShowSalaryAbove(31000) displays: [502, 'Ishaan', 'Accounts', 41000] [503, 'Farhan', 'Library', 45000] Records found: 2
| 5 |
| 37 |
| 5 |