0% found this document useful (0 votes)
34 views15 pages

CS Board 2024

Sample paper..for cutter science by CBSE

Uploaded by

guptaarya132
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
34 views15 pages

CS Board 2024

Sample paper..for cutter science by CBSE

Uploaded by

guptaarya132
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 15
&RQP: a TOn mea te) aad eries &RQ ‘3 wea. Roll No. on the title page of the answer-book COMPUTER SCIENCE = Time allowed : 3 hours Maximum Marks : 70 NOTE Please check that this question paper contains 15 printed pages. (ID Please check that this question paper contains 35 questions. (ID) QP. Code given on the right hand side of the question paper should be written on the title page of the answer-book by the candidate, (IV) Please write down the serial number of the question in the answer-book before attempting it. (V) 15 minute time has been allotted to read this question paper. The question paper will be distributed at 10.16 a.m. From 10.15 a.m. to 10.30 a.m., the candidates will read the question paper only and will not write any answer on the answer-book during this period. 219) t P.T.O. eee General Instructions : (i) Please check this question paper contains 35 questions. (i) The paper is divided into 6 Sections - A, B, C, D and E. ; ' (iii) Section A, consists of 18 questions (1 to 18). Each question Canes I mark. ; . (iv) Section B, consists of 7 questions (19 to 26). Hach question a 2 marks. : ; (v) Section ©, consists of 5 questions (26 to 30). Each question Carrie 3 marks, : : (vi) Section D, consists of 2 questions (31 to 32). Each question carries 4 marks. i ; (vii) Section E, consists of 3 questions (33 to 35). Each question carries 5 marks. (viii) All programming questions are to be answered using Python Language only. SECTION - A State True or False : While defining a function in Python, the positional parameters in the function header must always be written after the default parameters. The SELECT statement when combined with clause, returns records without repetition. (a) DISTINCT (b) DESCRIBE (©) UNIQUE @ NoLL What will be the output of the following statement : print (16#5/4#2/5-8) @) © -3.33 (b) 6.0 0.0 (@) -13.33 What possible output from the given options is expected to be displayed when the following Python code is executed ? import random Signal = ['RED', 'YELLOW', 'GREEN'] for K in range(2, 0, -1) : R = random. randrange (K) print (Signal[R], end = '#') YELLOW # RED # (b) RED # GREEN # GREEN # RED # (d) YELLOW # GREEN # 2 (a ———— 5. In SQL, the aggregate function which will display the cardinality of the table is 1 (@) sum() (b) count (#) © avg() @) sum(*) 6. Which protocol out of the following is used to send and receive emails over a computer network ? 5 (a) PPP (b) HTTP © FIP (@) sure 7, Identify the invalid Python statement from the following : 1 (a) @ = dict() (b+) e = {} © #20 (@) g = dict{} 8. Consider the statements given below and then choose the correct output from the given options : 1 myStr="MISSISSIPPI" print (myStxr[:4]+"#"+myStr[-5:]) (a) MISSI#SIPPI (b) MISS#SIPPI (c) MISS#IPPIS (d) MISSI#IPPIS 9. Identify the statement from the following which will raise an error: 1 (a) print ("A"*3) (b) print (5*3) © print("15" + 3) (@) print ("15" + "13") 10. Select the correct output of the following code : 1 event="G20 Presidency@2023" Leevent.split(' ') print (L[::-2]) (a) ‘G20! (b) ['Presidency@2023'] © ['G620'] (d) 'Presidency@2023' 2191 3 P.T.O. Eee 16. Consider the following Python statement : Feopen ('CONTENT. TXT') Which of the following is an invalid statement in Python ? @) © F.seek (1,0) (b) F.seek(0,1) F. seek (0,-1) (a) F.seek (0,2) Q. 17 and 18 are ASSERTION (A) and REASONING (R) based questions. Mark the correct choice as (a) () © @ Both (A) and (R) are true and (R) is the correct explanation for (A). Both (A) and (R) are true and (R) is not the correct explanation for @. (A) is true but ) is false. (A) is false but (R) is true. 17. Assertion (A) : CSV file is a human readable text file where each line Reason (R) has a number of fields, separated by comma or some other delimiter. writerow() method is used to write a single row in a CSV file. 18. Assertion (A) : The expression "HELLO". sort() in Python will give an error. Reason (R) : sort() does not exist as a method/function for strings in Python, SECTION -B 19. (A) G) Expand the following terms ; 1+1=2 XML, PPP (i) Give one difference between circuit switching and packet switching. OR (B) @ Define the term web hosting. 2191 (ji) Name any two web browsers. 5 PTO, s and displays whether they are 20. The code given below accepts five number even or odd : F a Observe the following code carefully and rewrite it after removing syntax and logical errors : Underline all the corrections made. def EvenOdd() for i in range(5)! num=int (input ("Enter a number") if num/2==0: print ("Even") else: print ("odd") EvenOdd() 21. (A) Write a user defined function in Python named showGrades(S) which takes the dictionary S as an argument. The dictionary, S contains Name: [Eng,Math, Science] as key:value pairs. The function displays the corresponding grade obtained by the students according to the following grading rules : Average of Eng,Math,Science Grade >=90 A <90 but >=60 B movie el ee For example : Consider the following dictionary ‘S=("AMIT"; [92 ,86,64] ,"NAGMA" : [65 42,43] , "DAVID" : [92,90,88]} The output should be : aAMIT-B NAGMA - C DAVID - A OR 2191 6 22. 23. 2191 (B) Write a user defined function in Python named Puzzle (W,N) which takes the argument Was an English word and WN as an integer and returns the string where every Nt alphabet of the word Wis replaced with an underscore ("_"). ai For example : if W contains the word "Mitievtston” and w is 3, then the function should return the string "ti_EV_ST_N". Likewise for the word "TELEVISION" if N is 4, then the function should return "TEL_VIS_ON". Write the output displayed on execution of the following Python code : 2 LS=["KIMALAYA", "NILGIRI", "ALASKA", "ALPS"] D={} for S in LS : if len(S)%4 = 0: D[S] = len(s) for KinD: print (K,D[K], sep = "#") (A) Write the Python statement for each of the following tasks using built-in functions/methods only : 1+1=2 @ To remove the item whose key is "NISHA" from a dictionary named Students. For example, if the dictionary Students contains {"ANITA":90, "NISHA":76, "ASHA":92}, then after removal the dictionary should contain {"ANITA":90, "ASHA" : 92} (ii) To display the number of occurrences of the substring "is" in a string named message. For example if the string message contains "This is his book", then the output will be 3. OR (B) Atuple named subject stores the names of different subjects. Write the Python commands to convert the given tuple to a list and thereafter delete the last element of the list. t P.T.O. 24, (A) Ms. Veda created a table named Sports it 25. @) na MySQL database, containing edlumne Game_id, Page and G_nemd@ i 2 After creating the table, she yealized that the attribute, Category has to be added. Help her to write a command to add the Category column, Thereafter, write the command to insert the following record in the table : Game_id: G42 P_Age : Above 18 G_name : Chess Category : Senior OR Write the SQL commands to perform the following tasks : @ __ View the list of tables in the database, Exam. Gi) View the structure of the table, Term1 . Predict the output of the following code : 2 def callon(b=20,a=10) : bebta a=b-a print (b,"#",a) return b x=100 y=200 x=callon (x,y) print (x,"@",y) yecallon (y) print (x,"@",y) 2191 aE SECTION - C %6 s="RaCecar Car. Radar" L=S.split() for Wink : x=W. upper () af x==x[::-1]: for I in x: print (I,end="*") else: for I in WwW: print (I,end="#") print () queries that follow : orpNo| r7em |ory|RaTe| oRDATE 1001 | Rtcz | 23 | 120 | 2023-09-10 1002 | PULSES | 13 | 120, | 2023-10-18 1003 | RICE | 25 | 110/| 2023-11-17 1004 | wHeat | 28 | 65y| 2023-12-25 1005 PULSES | 16 | 110] 2024-01-15 1006 | wHEaT | 27 | 55 | 2024-04-15 [2907 wHeaT | 25 | 60/ | 2024-04-30 (i) SELECT ITEM, SUM(QTY) FROM ORDERS GROUP BY ITEM; Write the output n execution of the following Python code : Consider the table ORDERS given below and write the output of the SQL 1x3=3 (ii) SELECT ITEM, QTY FROM ORDERS WHERE ORDATE BETWEEN '2023-11+01' AND '2023-12-31'; (ii) SELECT ORDNO, ORDATE FROM ORDERS WHERE ITEM = ‘WHEAT’ AND RATE>=60; . 291 i P.T.O.

You might also like