0% found this document useful (0 votes)
6 views

CS Preboard Paper

The document outlines the pre-board examination for Computer Science (083) for Class XI at S Bina Mohit Memorial School for the session 2024-25. It includes general instructions, the structure of the question paper divided into five sections with varying marks, and a variety of questions covering Python programming, SQL queries, and database management. The examination consists of multiple-choice questions, programming tasks, and theoretical questions requiring detailed answers.

Uploaded by

Abhisikta Ray
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views

CS Preboard Paper

The document outlines the pre-board examination for Computer Science (083) for Class XI at S Bina Mohit Memorial School for the session 2024-25. It includes general instructions, the structure of the question paper divided into five sections with varying marks, and a variety of questions covering Python programming, SQL queries, and database management. The examination consists of multiple-choice questions, programming tasks, and theoretical questions requiring detailed answers.

Uploaded by

Abhisikta Ray
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 14
S BINA MOHIT MEMORIAL SCHOOL SESSION: 2024-25 Pre-Board Examination Subject: Computer Science(083) Full Marks:70 lass: XI Time: 8 Hrs. “General instructions: ania, This question paper contains 37-questions, All questions are compulsori However, Internal choices have been provided in some) questions. Attempt only ohe’of the cholees In such questions The paper Is divided ito 5 Sections A,B,C, D and E, i Section A consists of 21 questions (1 to 21). Each question carries 1 Mark Section B consists of 7 questions (22 to 28). Each question carries 2 Marks. ‘section C consists of 3 questions (25 to 31). Each question carries 3 Marks. Section D consists of 4 questions (32 to 35)..Each question carries 4 Marks. Section E consists of 2 questions (36 to 37). Each question carrles 5 Marks. All programming questions are to be answered using Python Language only. In case of MCQ;'text of the correct answer should also be written. QNo. Section-A (21 x1 = 21 Marks) Marks: 1 ‘State True ot False: ‘The Python interpreter handles logical errors during code (a) execution.‘ ¢ ¥ 2 Identify the output of the following code snipp text = ™PYTHONPROGRAM" textatext. replace (‘PY', '#') print (text) (A) #THONPROGRAM - (B)_ ##THONHROGRAM (C)_ #THONHROGRAM. (0) #YTHONHROGRAM a ‘Which of the following expressions evaluates to False? AA) not(True) and False (B) True or False (C)_not(False and True) (D) True and not{False) (1) What is the output of the expression? country=' International’ Print (country. split (!n")) (A) (1 ter, ‘atio’, alt) f (B) (", ter’, ‘atiof at’) 1 ‘ter’ 'n’,‘atlo', ‘nt, al") (a) What will be the output of the following code snippet? message= "Morld Peace" print (massage |-2::~ 21) 7 (1) ‘What will be the output of the following code? tuplel = (1, 2, 3) tuple2 = tuplel tuplel += (4,) print(tuplel == tuple2) (A)True (B) False ~ (C)tupl (O)Etror (a) If my_dict isa dictionary as defined below, then which of the following statements will raise an exception? my_dict = ('apple': 10, ‘banana': 20, ‘orange’: 30) (A) my_dict.get(‘orange’) (B) print(my_dict('apple’, 'banana']) (C) my_dietl'apple’]=20 (0) print{st( my. det) a (8) What does the list.remove(x) method do in Python? (A) Removes the element at index x from the list (B) Removes the first occurrence of value x from the list (C)Removes all occurrences of value x from the list (D)Removes the last occurrence of value x from the list () Ifa table which has one Primary key and two alternate keys, How many Candidate keys will this table have? (aya (B)2 (C3 - (D)4 (a) 10. Write the missing statement to complete the following code: file = xample, txt", "2") ‘data = read (100) Move the file pointer to the beginning of the file next_data = file.read(50) file.close() a Fre ‘State whether the following statement |s True or False: ‘The finally block In Python f sie / if no exception ‘occurs in the try block (a) 12. What will be the output of the following code? c = 10 def add(): global ¢ cmet 2 print (c,end='#") add() oak print (c,end='$') (a) 120154 (B) 15H12% (c)12815% (0) 12%15# a 13. Which SQ command can change the degree of an existing relation? a 14. ‘What will be the output of the query? ‘SELECT * FROM products WHERE product_name ‘LIKE "Appt! > (A) Details ofall products whose names start with ‘App’ od (B) Details of all products whose names end with ‘App’ (C)Names of all products whose names start with ‘App’ (D) Names of all products whose names end with ‘App’ (a) 15. in which datatype the value stored is padded with spaces to fit the specified length.» !s" (A)DATE (B) VARCHAR» (C)fLohr (0) cHAR (a) 16. ‘Which aggregate function can be used to find the cardinality of a table? (A) sum() i (B)count(). (Chava) (O)maxi) (a) v7. ‘Which protocol Is used!to transfer files over the Internet? (AyHTTP (B) FTP ~ (C)PPP (D)HTTPS. (a) Which network device Is used to connect two networks that use different protocols? (A) Modem (B) Gateway ~~ (C)switch (D) Repeater a) 19. ‘Which switching technique breaks data Into smaller packets for transmission, allowing multiple packets to share the same network resources. (a) (920 and Q21 are Assertion(A) and Reason(R) based questions. Mark the correct choice as: (A)Both A and R are true and R is the correct explanation for A (B)Both A and R are true and Ris not the correct explanation for A (C)Als True but R Is False (D)Als False but Ris True 20. Assertion (A): Positional arguments In’Python functions must be passed in the exact order’ in which ‘they are defined inthe function signature, Reasoning (R); Ths is because Python functions automatically assign V. defautt values to positional arguments. (a) 21. ‘Assertion (A): A SELECT command in SQL can have both WHERE and HAVING clauses. Reasoning (R): WHERE and HAVING clauses are used to check conditions, therefore, these can be used interchangeably. () No Sectlon-B (7 x 2=44 Marks} Marks 2. How is a mutable object different from an Immutable object in Python? Identify on mutable abject and one immutable object from the following: (2,2), [1,2], {1:1,2:2}, 123" (2) 23. Give two examples of each of the following: (I) Arithmetic operators (Il) Relational operators (2) 24, Mf Lt={4,2,3,2,1,2,4,2, . <1, and L2s[10,20,30, ..., then (Answer using builtin functions only) wo ! by kage ‘A) Write a statement to count the occurrences of 4 In L1. oR B) Write a statement to sort the elements of list L1 In ascending order. (2) (uy) ‘A) Write a statement to insert all the elements of L2 at the end of Li. OR B) Write a statement to reverse the elements of list L2. 25. | \dentify the correct output(s) of the following code. Also write the minimum. and the maximum possible values of the variable b. import random ta a="Wisdom" a oe b=random. randint (1,6) for i in ., o range (0,b}2) prin€(a[i] ,end="#') (aywet @waie (wast [oy wais 26. ‘The code provided below Is intended to swap the first and last elements of a given tuple. However, there are syntax and logical errors In the code. Rewrite It after removing all errors, Underline all the corrections made. »_fixet_last(tup) if len(tup) < 2: retuzn tup new_tup = (tup{-1],) + tup[1:-1] + (tup[0}) return new_fup result = swap first _last((1, 2, 3, 4)) Print ("Swapped tuple: " result) (2) 27. 0) ‘A) What constraint should be applied on a table column so that duplicate values are not allowed in that column, but NULL is allowed. on B) What constraint should be applied on a table column so that NULLis not allowed in that column, but duplicate values are allowed. ht (2) i) ‘A) Write an SQ commmahd 6 remove the Primary Key constraint from a table, named MOBILE, IV_ID Is the primary key of the table. oR B) Write an SQL command to make the column M_ID the Primary key of an already existing table, named MOBILE, 28. « dh \ ‘A) List one advantage and one disadvantage of star topology. OR B) Expand the term SMTP. What is the use of SMTP? (2) No. Section-C (3x3 =9 Marks) Marks| 29. A) Write a Python function that displays all the words containing ‘@cmaill from a text file “Emalls.txt". ¥ ‘OR B) Write a Python function that finds and displays all the words longer than 5 characters fram a text file "Words txt*. (3) 30, A) You have a stack named BooksStack that contains. ‘records of books. Each book record is represented as alist containing book_title, ‘author_name, and publication_year. ‘Write the following user-defined functions in Python to perform the ‘Specified operations on the stack BooksStack: (I) push_book(Booksstack, mew_book): This function takes the Stack BooksStack and a new book record new_book as arguments and pushes the new book record onto the stack. (1) Pop_book(Booksstac): This function pops the topmost book Tecord from the stack and returns it. If the stack is already empty, the function should display "Underfiow", (mi) Peep(BbokStack): This function displays’ the topmost element (3) sof the stack without deleting It. If the stack Is; empty, the function should display ‘None’, OR (8) Write the definition ofa user-defined function ‘push_even(N)* Which accepts alist of integers In narameter ‘N* and Pushes all those Integers which are even from the ist'N* into 4 Stack named “EventNumbers’. Write function poo_even() to op the topmost ‘umber from the stack and returns It. Ifthe stack is ‘already empty, the function should display "Empty", Write funetion Disp_even() to display all element ofthe stack without deleting them, ifthe sack, Is empty, the function should display ‘None’ For example: : é If the integers input into the lst ‘VALUES? are; 10, 5, 8, 3, 12) : \ Then the stack 'EvenNumbers' should store: (10,8, 12) a1. Predict the output of the following code: d= {"apple": 15, "banana": 7, Neherry": 9} strl = "" for key in d: str = str + str(d[key]) + "@" + %\n" str2 = stri[:-1] print (str2) or, \ ‘Y (3) Predict the output ofthe following code: , Line=[4,9,12,6,20] for Tah line: for jin range (1,T85) : print (j,/#/,end="”) print () QNo. Section-D (4x 4= 16 Marks) Marks 32, _ | Consider the table ORDERS as given below Told [C.Name | | Product [Quantity | Price 1001 _| Jitendra “| “Laptop. 1 | 12000 1002_,| Mustafa | Smartphone, 92 | 10000 4003[ Dhwanl_[ Headphone | a 1500 ‘Note: The table contains many more records than shown here. (4) A) Write the following queries: (I) Toaisplay the total Quantity for each Produc, excluding Products with total Quantity less than 5, (Wl) Todisplay the orders table sorted by total price in “descending order. (lll) To display the distinct customer names from the Orders tabl (Iv) Display the sum of Price ofall the orders for which the quantity is null. oR 8) Write the output (2) Select c_name, sum(quantity) as total_quantity from orders group by c_name; (11) Select * from orders where product like "ephones' ; Ste (III) Select 9 44,"¢ name, product, quantity, Price from orders whére price between 1500 and 12000; a (IV) __ Select! max(price) from ofders csv file *"Happiness,csv" contains the data of a survey. Each record of the le contains the following data: © Name of a country ‘© Population of the country ‘+ Sample Size (Number of persons who participated in the survey in that country) ‘* Happy (Number of persons who accepted that they were Happy) For example, a sample record of the file may be: ['Signiland’, 3673000, S000, 3426) te the following Python functions to perform the specified operations ponthis file: * (1) Read allthe data from the file inthe form af Iist and display al i those records for which the population Is more than 5000000. (4) Count the number of records in the file. 34, aman has been entrusted with the management of Law University atabase. He needs to access some information from FACULTY and -OURSES tables for a survey analysis. Help him extract the following information by writing the desired SQL queries as mentioned below. Table: FACULTY FID | FName | LName Hire Date _| Salary 102 | Amit Mishra 32-10-1998 _| 12000 103 | Nitin wyas |p | _24-12-1994 | 8000 (4) 104 | Rakshit | Son! 185-2001 _| 14000 105 | Rashint_| Malhotra vi1.9-2004 | 11000 106 _[asulekha | Srivastava 362006 _| 10000 Table: COURSES 10 | FID cName Fees cat_| 402 | Grid Computing 40000 22106 | System Design 16000 23°] 104 | Computer Security | "8000 c24_| 106 | Human Biology 15000 C25|, 102 | Computer Network | 20000 C26]. 105 | Visual Basic, [6000 In thelr Course names. Desigr (1) To'display.complete details (from both the tables) of those| Faculties whose salaty|s lessthan 12000. (ll) To'display the details of courses whose fees 1g/In the range of 20000 to $0000 (bath values included), (Ill) To increase the fees of all cour (IV) (A) To display names (FName and LName} of faculty taking yster by 500 whieh have "Computer' | OR | (8) To display the Cartesian Product of these two tables. 35. ‘Atable, named STATIONERY, n ITEMDB database, has the following structure: Field Type itemNo_ int(11) itemName varchar(15) price float aly Int(14) Write the following Pythdn function to perform the specified operation: AddAndDisplay() To input details ofan item and!store it in the table STATIONERY. The furiction should then retrieve and display all records from the STATIONERY table where the Price Is greater than 120. ‘Assume the following for Python-Database connectivi Host: localhost,’ User! Foot,, Password: Pencil (4) (lll) Write a function to update the data of candidates whose experience |s more than 10 years and change their designation to "Senior Manager’. 4 All Write a function to read the data from the binary file and display ‘the data of al those candidates who are not "Senior Manager", QNo. SECTION € (2X5 = 10 Marks) ~~ Marks| 36. Surya is a manager working in a recruitment agency. He needs to manage ’ , the records of various candidates. Far this, he wants the following Information of each candidate to be stored: > Candidate_1D- integer: ~ Candidate_Namnestring ~ Designation =string You, as a programmer of the company, have been assigned to do this job for Surya. (1) Write a function to input the data of a candidate and append itin a binary file. (5) 37, Event Horizon Enterprises isan event planning organization. It is planning to set up its India campus in Mumbai with its head office in Delhi. The Mumbai campus will have four blocks/buildings - ADMIN, FOOD, MEDIA, DECORATORS. You, as a network expert, need to suggest the best network-related solutions for them to resolve the issues/problems mentioned in points (to (V), keeping in mind the distances between various blocks/buildings and other ‘given parameters. Block to Block distances (in Mtr.) From To Distance "ADMIN. _| FOOD am ‘ADMIN. | MEDIA ‘96m ‘ADMIN. | DECORATORS 4am FOOD _| MEDIA’ 5am FOOD | DECORATORS 46m MEDIA | DECORATORS 42m Distance of Delhi Head Office from Mumbai Campus = 1500 km Number of computers in each ofthe blocks/Center Is as follows: ‘ADMIN 30 |. | FOOD 18 "MEDIA 25 (DECORATORS 20 DELHI HEAD OFFICE 18 (5) 0) ay 0) (Wy) “) side the| Suggest the most appropriate location of the serve MUMBAI campus. Justify your choice. Which hardware device will you suggest to connect all the computers within each building? Draw the cable layout to efficiently connect various buildings within the MUMBAI campus. Which cable would you suggest for the most efficient data transfer over the network? Is there a ee of 3 a repeater in the given cable layout? Why/ Why not? iA A) What would’be your recomritendation for enabling lve visual communication between the Admin’ Office at the Mumbai ccampus‘and the DELHI Head Office from the following options: ya) Video Conferencing b) ernall i ‘¢) Telephony ) Instant Messaging 4 OR B) What type of network (PAN, LAN, MAN, or WAN) will be set up among the: ‘computers connected in the MUMBAI campus?

You might also like