PDF Google Drive Downloader v1.1


Report a problem

Content text Computer Science Solved Papers.pdf

Computer Science 2025 Time allowed : 3 hours Maximum Marks : 70 General Instructions : (i) This question paper contains 37 questions. (ii) All question are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions. (iii) The paper is divided into 5 Sections — A, B, C, D and E. (iv) Section A, consists of 21 questions (1 to 21). Each question carries 1 mark. (v) Section B, consists of 7 questions (22 to 28). Each question carries 2 marks. (vi) Section C, consists of 3 questions (29 to 31). Each question carries 3 marks. (vii) Section D, consists of 4 questions (32 to 35). Each question carries 4 marks. (viii) Section E, consists of 2 questions (36 to 37). Each question carries 5 marks. (ix) All programming questions are to be answered using Python Language only. (x) In case of MCQs, text of the answer should also be written. SECTION–A (21 × 1 = 21) 1. State True or False: “A Python List must always contain all its elements of same data type.” [1] Ans. False Explanation: Python lists allow storage of different types of data . For Instance : L = [1,2,3,4] L1 = [“Abc”,12,15.5,True] 2. What will be the output of the following statement? [1] print(14 % 3 ** 2* 4) (A) 16 (B) 64 (C) 20 (D) 256 Ans. (C) 20 Explanation : 14 % 3 ** 2 * 4 = 14 % 9 * 4 = 5 * 4 = 20 (** has the highest priority) 3. Identify the correct output of the following code snippet: [1] game=”olympic2024” print(game.index(“C”)) (A) 0 (B) 6 (C) –1 (D) ValueError Ans. (D) ValueError Explanation : The character ‘C’ is not present in the string “Olympic2024”, the index() function returns a valueError. 4. Which of the following is the correct identifier? [1] (A) global (B) Break (C) def (D) with Ans. (B) Break Explanation : All of the others are keywords in python . The word break is a keyword. 5. Identify the invalid Python statement out of the following options: [1] (A) print ( “A” , 10 , end=” *” ) (B) print ( “A” , sep=”*” , 10 ) (C) print ( “A” , 10 , sep=”*” ) (D) print ( “A” *10) Ans. (B) print ( “A” , sep=”*” , 10 ) Explanation : To print certain values with a separator, all the values should be specified first and then the sep keyword has to be used. 6. Consider the statements given below and then choose the correct output from the given options: [1] L=[‘TIC’, ‘TAC’] print(L[::-1]) (A) ['CIT', 'CAT'] (B) ['TIC', 'TAC'] (C) ['CAT', 'CIT'1 (D) ['TAC', 'TIC'] Ans. (D) [‘TAC’, ‘TIC’] Explanation : The statement L[: : –1] means to print the contents of the list in reverse order. 7. Which of the following operator evaluates to True if the variable on either side of the operator points towards the same memory location and False otherwise? [1] (A) is (B) is not (C) and (D) or Ans. (A) is
2 CBSE Computer Science 2025 Explanation : is, the identity operator returns True by checking the variables on either side of it , that whether they are pointing towards the same memory location., otherwise it returns False. 8. Consider the statements given below and then choose the correct output from the given options: [1] D={ ‘S01 ‘ : 95, ‘S02’ : 96} for I in D : print (I , end= ‘ # ‘ ) (A) S01#S02# (B) 95#96# (C) S01,95#S02,96# (D) S01#95#S02#96# Ans. (A) S01#S02# Explanation : The Statement “for I in D” means , for I in D.keys(), hence the statement picks each of the keys of the dictionary and prints them with end as ‘#’ 9. While creating a table, which constraint does not allow insertion of duplicate values in the table? [1] (A) UNIQUE (B) DISTINCT (C) NOT NULL (D) HAVING Ans. (A) UNIQUE Explanation: The UNIQUE constraint restricts duplicate values in the column where it is applied. 10. Consider the statements given below and then choose the correct output from the given options: def Change (N) : N = N + 10 print (N, end= ‘ $$ ‘ ) N = 15 Change (N) print (N) (A) 25$$15 (B) 15$$25 (C) 25$$25 (D) 2525$$ Ans. (A) 25$$15 Explanation : The value of the formal parameter to the function is incremented by 10 inside the Change() function and printed as 25. Outside the function the actual value of N is printed, which is 15. Hence the output is 25$$15 11. Consider the statements given below and then choose the correct output from the given options : [1] N=’5’ try: print ( ‘WORD ‘ + N, end=’ #’ ) except: print ( ‘ERROR’ , end= ‘ # ‘ ) finally: print ( ‘OVER’ ) (A) ERROR# (B) WORD5# OVER (C) WORD5# (D) ERROR#OVER Ans. (B) WORD5# OVER Explanation : There is no exception here , so the try and finally blocks are executed , therefore print(“WORD”+ N , end=’#’) and print(‘OVER’) are executed giving “WORD5#OVER” 12. Which of the following built-in function/ method returns a dictionary? [1] (A) dict() (B) keys () (C) values() (D) items() Ans. (A) dict() Explanation: The dict() function creates an empty dictionary and returns the memory handle of the dictionary created to the variable on the left. 13. Which of the following is a DML command in SQL? [1] (A) UPDATE (B) CREATE (C) ALTER (D) DROP Ans. (A) UPDATE Explanation: Update is a data manipulation command which makes changes to the data of the table. Create, Alter and DROP are all data definition commands to create , change or remove a table. 14. Which aggregate function in SQL displays the number of values in the specified column ignoring the NULL values? [1] (A) len() (B) count() (C) number() (4) num() Ans. (B) count() Explanation: The count() function is an aggregate function that counts the number of NON NULL values in a column. 15. In MYSQL, which type of value should not be enclosed within quotation marks? [1] (A) DATE (B) VARCHAR (C) FLOAT (D) CHAR Ans. (C) FLOAT

Related document

x
Report download errors
Report content



Download file quality is faulty:
Full name:
Email:
Comment
If you encounter an error, problem, .. or have any questions during the download process, please leave a comment below. Thank you.