Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
12 views
Document 23
Uploaded by
tamtadhruv30
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
Download now
Download
Save Document 23 For Later
Download
Save
Save Document 23 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
12 views
Document 23
Uploaded by
tamtadhruv30
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
Download now
Download
Save Document 23 For Later
Carousel Previous
Carousel Next
Save
Save Document 23 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 8
Search
Fullscreen
CLASS: XII SESSION: 2022-23 COMPUTER SCIENCE (083) SAMPLE QUESTION PAPER (THEORY) SECTION A gate TUE or False q 4 spython treats uppercase and lowercase letters equally.” 1 which of the following is an invalid datatype in Python? 1 1 @ fooat (b) _ integer o oe (4) complex ‘ wnat type of error is returned by following code Al pict={2" * ‘Apple’, ‘B': ‘Banana’, ‘C’: ‘Cat'} print (Dict [0}) @) KeyError (b) KeyNotFoundError () NotFoundError (d) — SyntaxError 4, Consider the given expression:True and False or not True Which of the folowing will be correct output if the given expression is evaluated? 1 (a) The (b) False () NONE (d@) NULL 4, Select the correct output of the code: a= ‘We all are 2022 batch hardworking students” a= asplit(‘0’) | b= a0) +S" + alt] print (b) 41 (a) Error (>) We all are 2$ 22 batch hardworking students (©) We all are $ batch hardworking students (@) We all are 2022 $ batch hardworking students veri of the following mode in file writing statement results orgenerates an ror? 1 99 Xil-Computer Science 6 bh8. Which of the following comm 9 10, 12, o * (a) None of the above 7. Fillin the biank ns present in database in g disused 10 $08 3 ‘Ay comma (o) display fables (0 ee sing ves ofa ands wit enange exstd atrbutes 1 (2) show tables (©) describe tables ‘elation? DELETE TABLE (6) UPDATE TABLE (b) DROP TABLE (a) ALTER TABLE Which of the folowing statement(s) would a8 97 &*7OF after executing thy {following code? 1 30 # Statement 1 for ¢ in range(0.): # Statement 2 it # Statement 3 # Statement 4 Elseif c%5==0: # Statement 5 print (c+3) # Statement 6 else print(c+10) # Statement 7, (@) Statement 3 (b) Statement 4 (©) Satement 5 (d) Statement § and 7 Fil inthe blank Js atbute, whose values are used as a key, in place of Primary Key (2) Domain (b) Foreign Key 4 (c Candidate Key (4) None “mode” ) file_object=open(‘flename’, ‘mode" ) (6) open=file_object('fiename’) mode") (8) _file_object open="fiename’ "mode" Fill in the blank: 1 Xil-Computer Science gre SELECT statement when combine in cefault order. wih order by clause, retuns records ee (© Desc 1 (@)_ Bath (@) and (6) sci ‘the protocol that is used fh ion (a) and (by (a) Tenet ©) sw lent to server. 1 (TOPAP _ 3 wll the folowing expres wr +3442 15 — be evaluated to in Python? 1 8 oon i 7 - 's used 10 display the pattem matching for atibutes of relation 1 (@ IS NULL tir wrear rel tke (Equals to ‘After execution of SQL insert statement, in command is need to wie, make changer soreness wien (a) Alter ® R (c) Update (@) commit 1 t7 and 18 are ASSERTION AND REASONING based questions. Mark the correct 7. 18. choice as (@) 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 (c) Ais True but R is False (@) Ais false but R is Tue Assertion ): Access mode ‘a’ opens a file for appending Reason (R): The file pointer is at the end of the file if the fle exists 1 ‘Assertion (A): Bult in function are user defined functions which are created by the user Reason (R): print() and input () are built in functions 1 SECTION B 101 Xil-Computer Science a |Explain the Use of 4 GING example to support f@) ‘ritton @ code fo input a number And 1 Rewrite the correc ‘et exam update act rei) PrN ahoL exam tema) TOTAL = 0 for © in (7,6.4.9) T= TxTICNT] TOTAL = float(T) +.¢ 102 Key’ in @ Relational Database Man ‘Your anawer, Write the ful forma of the following: WAP (i) VoIP NagomentSyatem, 2 2 Xi-Computer Science Men Whee and ayy ee 0. n ba, oR Calagorize the folowing cone, CREATE, UPDATE, ALTER, Dlr POL or DM: ee ty Table: Bank Account Name ype ce Sevrgn Parthodas Curent Miron Curent i ‘Table: Branch Code Gly a) Doth a2 Mumba 403 Nagpur How many rows and columns willbe there inthe cartesian product ofthe above tables. 103 Xt-Computer Science :.oM Employee: rade FR SELECT DSTNCT SUING) FROM Employee SELECT Gos CON cOUNTIGade PT: WHERE (uy SELECT Enane FROM EPOVR® Goso>=7O0 ORDER BY EME (w) SELECT AVG(Gross) FROM Employee Gross BETWEEN 4000 AND 7000; 27. Wite a user defined faneion to depay the total number Of Words presen, 3 Le ee Soe em pee can tc rset Sans ‘The countwords() function should display the output as: aes OR Write in pyton to count the number lines in a text fle ‘Ci farting wih an alphabet Wor ‘H! myvt IF the file contents are as follows: in the fe ; ‘A text fle “Quotes. Tt” has the following data written in it; | ‘Whose woods these are | t XllkComputer Science vis House iI the vilage though, jot see me stopping her je will "© To watch hi pit output of the function should he: ” "O88 fil up with snow. worw:t worn: 2 the outputs forthe folowing quetieg \RHOOL 2nd ADMIN given below “ZA (to Gy) based on the relations TABLE : ScHooL TABLE : ADMIN DESIGNATION | VICE PRINCIPAL COORDINATOR COORDINATOR HOD ‘SENIOR TEACHER SENIOR TEACHER, MALE, oD ‘SELECT SUBJECT, count(*) FROM School GROUP BY SUBJECT; ‘SELECT MAX(003), MIN(DOJ) FROM SCHOOL; ‘SELECT TEACHERNAME, DESIGNATION FROM SCHOOL S, ADMIN A WHERE S.CODE = ACODE AND EXPERIENCE > 10; SELECT TEACHERNAME, SUBJECT FROM SCHOOL S, ADMIN A WHERE S.CODE= A.CODE AND DESIGNATION =HOD’; (b) Write the command to view all databases in mySq\ 105, Xil-Computer Science28, 30, Write a funetion in Python. which accepis a list LSt Of numbers. ay, ‘odd number and even numbers separately in (WO lIStS and din). 3) Allist contains following record of @ Student [Stud no, name, Fee) Write te ftoning user dened functions 10 Perform given gg fon the stack named EMP: on, + Push_elementto push an object containing Stud_no ang 9, 4 an, y theme 3 5000 to the stac me ‘student who are paying fee more than Ck Stug. © oF = Pop_element(}10 pop the objets from the stack and display y ‘Also isola ‘Stack Emply' when there are elements in pg Mem, For example ‘ack, If the lists of student details: “Angelia”, 4000) 11003, “Amrit 7000) ‘The stack should contain [1001,"John*, 5500] [1003, “amnt”,7000] ‘Stack Empty 4) Saransh has created a dictionary containing names and Salary as key value pairs of few Employees. White a program, with separate usc, defined functions to perform the following operations: Push the keys (name of the empl where the corresponding value ( Pop and display the deleted elements, For example: If the sample content of the dictionary is as follows: Re(“Aman*:15000, “Raman’:20000, “BOB™:9000, “PAWAN":7000, “ANUT:9000,"Mukesh’:8000} The output from the program should be: Aman Raman SECTION D 106 XuleComputer Science f the dictionary into a stack eater than 10000, Ih continuation ofthe above, he following number of computers (mea ees have panned to instal te in each oftheir oftana Production 110 Media 2a Finance a Research 6 |, Suggest the most sultabe place (e. Branch) to instal the server of te organization with a suitable reason, fi, Suggest an ideal layout for connecting all branches of Hygerabad i. Production, Media, Research and Finance. Also wite the type of Topology. land which wired transmission media out of Ethemet cable \wire/Optical Fibre should company use for very fast data transmission? 107 XiLComputer Science#Statement 2 _—__# Statement 3 jed successfully’) ane nett th tia, acon add n ea Veo Coney OR one ge 2g predict the output of the code given below: ont bem a “got change(otd_S): Ct ce co Lm Length = len(old_S) en nen = 2 ey for i in range(0, Length): a if (old_Sli] >= ‘A and old_S[i) <= ‘2: one new_S = new_S +old_Sfil.lower() ine ont elif old_Sfilislowerd): eo ving 100070 i tRe t20 Gary new_$ = new_S + old_Sfil.upper() elif old_Sfi) 0: et 8) gon ete ing = Hrd = 60 getty between Python and MYSay. new_S=new_$#"@" oe ate: te ne ok Y : ee named Game, new_S-new $+" rn 2S be accented print(new_$) ar ves oe moe Hite old_S="Welcome$T0$2021" eee enenes cae cote cnet 5) rte tig 8D OT ect fp) The cade given below reads the folowing record from the ‘able named satement 1 ~ 1 7 a ‘command that inserts the record in the Player and displays only those records who have Score greater than ‘Satement 2-1 e700 75:1d ~ integer Name — string Game — string Score — integer fale Sucet recat permanenty in the database Note the following to establish connectivity between Python and MYSQL: aera > oa Username is root igre 36 Password is 0) comecttosacaloe user="00",password="iger, | The table exis 1YSQL database name Game. Write the following missing statements to complete the code: ‘Statement 1 — to form the cursor object Statement 2 — to execute the query that extracts records of those players whose Scores are greater than 60. Statement 3- to read the complete result of the query (records whose ‘Scores are greater than 60) into the object named data, from the table 109 Xil-Computer Science atobase="Game) ‘#Statement 1 (0:00 format(id, name, game) 108 XileComputer Scienceof recads present in the CSV fig a CONTR) - To cat fe maT raed OR le and a ane pot of erence beween a text fi ov fle ey 4 te en deine tees: © ads) To acept and add deta of @ mobile user to a CSV fie “pote cov. Each ed ens ofa Ist wth elements as id, name, b.s0, bil 1 sore id, name, mobile number and mobile ba respec, (@) sarc To splay the records of the person having mobile bil is ‘more tan 1000, Grad x B c ‘and cardinality of the above table? 1 following record into the table Id - 5, S.Name - Sangeeta, Score - 75, Grade B b. Increase the Score of the students by 2% whose name ends with “S OR (Option for part ii onty) ay Wiite the statements to: a, _ Delete the record of students securing ‘D’ Grade. b. Add a column DofB in the table with datatype as date. ‘Ajay has written a code for operation on a binary file “stud.dat” with dat ‘2 2s admnno, name and fee. The file contains 15 records. 4 He now has to update a record-based on the admnno entered by the user and update the fee. The updated record is then to be written in the file ‘temp.dat. The records which are not to be updated also have to be written to the file temp.dat. If the admnno is not found, an appropriate message should to be displayed. ‘As a Python expert, help him to complete the following code based on the requirement given above:SSSot(input(Enter admnno to update their fee::“)) ¢ While True: tty. ~~ #Saatement 3 # rec{‘admnno’}==sid found=True rec{fee}int(input(‘Enter new fee:: *)) Pickle. #Statement 4 else: Pickle dump(rec.fout) except break # found—=true: a Print("The fee of student admnno *,admnno,” has been Updated.» Print("No student with such admnno is not found") fincloseg) fout closet) o Which module should be imported in the (©) Write the correct statement temp.dat (Statement 2) (@) Which statement should binary file, stud. dat Fill in the blank in Statement 4 to write the updated data in the fle, temp.dat Program? (Statement 1) required to open a temporary file named Azy fil in Statement 3 to read thedata from the 112 Xi-Computer Science
You might also like
TAS computer science
PDF
No ratings yet
TAS computer science
4 pages
Sahodaya Comp Set 2 QP
PDF
100% (6)
Sahodaya Comp Set 2 QP
9 pages
SQP
PDF
No ratings yet
SQP
17 pages
4th 5th and 6th Paper
PDF
No ratings yet
4th 5th and 6th Paper
33 pages
Class 12 Sample Paper
PDF
No ratings yet
Class 12 Sample Paper
13 pages
13th 14th and 15th Paper
PDF
No ratings yet
13th 14th and 15th Paper
24 pages
CS
PDF
No ratings yet
CS
14 pages
CS Sample Paper 11-14
PDF
No ratings yet
CS Sample Paper 11-14
30 pages
12-CS-BOARD-SET-1-QP
PDF
No ratings yet
12-CS-BOARD-SET-1-QP
6 pages
Class 12th - QuestionBank - ComputerScience
PDF
No ratings yet
Class 12th - QuestionBank - ComputerScience
184 pages
Class: Xii (SET 1) Time Alotted: 3Hrs Subject:Computer Science (083) Maximum Marks: 70
PDF
No ratings yet
Class: Xii (SET 1) Time Alotted: 3Hrs Subject:Computer Science (083) Maximum Marks: 70
9 pages
XII KV - CS - PB1 - AGRA - QP - Set1
PDF
No ratings yet
XII KV - CS - PB1 - AGRA - QP - Set1
10 pages
IP Annual REEXAM 23-24
PDF
No ratings yet
IP Annual REEXAM 23-24
7 pages
54 Hs Xii A SC Com CSC 23
PDF
No ratings yet
54 Hs Xii A SC Com CSC 23
11 pages
Sample Paper3
PDF
No ratings yet
Sample Paper3
18 pages
Class Xii Computer Science Mock Test Paper 01 QP
PDF
No ratings yet
Class Xii Computer Science Mock Test Paper 01 QP
12 pages
Maximum Marks: 70 Time Allowed: 3 Hours General Instructions
PDF
No ratings yet
Maximum Marks: 70 Time Allowed: 3 Hours General Instructions
13 pages
SQP 10 - QP
PDF
No ratings yet
SQP 10 - QP
10 pages
12 Computer Science PMT
PDF
No ratings yet
12 Computer Science PMT
3 pages
Set 1 First Model Examination Cs
PDF
No ratings yet
Set 1 First Model Examination Cs
10 pages
Xii CS PB1
PDF
No ratings yet
Xii CS PB1
10 pages
KV Preboard 2 - 240330 - 154920
PDF
No ratings yet
KV Preboard 2 - 240330 - 154920
17 pages
Computer Science Xii
PDF
No ratings yet
Computer Science Xii
8 pages
Max Marks:50: Computer Science
PDF
No ratings yet
Max Marks:50: Computer Science
8 pages
ComputerScience SQP (2023)
PDF
No ratings yet
ComputerScience SQP (2023)
15 pages
Sample Paper 1
PDF
No ratings yet
Sample Paper 1
9 pages
class12 cs set 1 (1)
PDF
No ratings yet
class12 cs set 1 (1)
11 pages
SQP 03 - QP
PDF
No ratings yet
SQP 03 - QP
19 pages
Cs Practise Paper Atomic Energy Education Society
PDF
No ratings yet
Cs Practise Paper Atomic Energy Education Society
10 pages
pb2
PDF
No ratings yet
pb2
11 pages
CLASS XII CENTUM PHASE-II CS QP 29-11-2024 (1)
PDF
No ratings yet
CLASS XII CENTUM PHASE-II CS QP 29-11-2024 (1)
6 pages
Sample Paper 1 2023-24
PDF
No ratings yet
Sample Paper 1 2023-24
8 pages
1274506-Class 12 CS - A1 - 2023-24 - Answers
PDF
No ratings yet
1274506-Class 12 CS - A1 - 2023-24 - Answers
9 pages
QP-Computer Science-12-Common Exam
PDF
No ratings yet
QP-Computer Science-12-Common Exam
10 pages
CS Set 1 QP
PDF
No ratings yet
CS Set 1 QP
11 pages
SQP 45 - QP
PDF
No ratings yet
SQP 45 - QP
10 pages
12cs Revision Sunday Test 1 Qp
PDF
No ratings yet
12cs Revision Sunday Test 1 Qp
14 pages
MODEL BOARD EXAMINATION - II SET - I
PDF
No ratings yet
MODEL BOARD EXAMINATION - II SET - I
8 pages
Xii Practice Paper 2
PDF
No ratings yet
Xii Practice Paper 2
14 pages
cs practical file
PDF
No ratings yet
cs practical file
18 pages
KV Agra
PDF
No ratings yet
KV Agra
7 pages
CSSC 2022-Class Xii-Csc-Qp
PDF
100% (1)
CSSC 2022-Class Xii-Csc-Qp
14 pages
Computer Science Class XII
PDF
No ratings yet
Computer Science Class XII
38 pages
CS_XII_Comptt_15-7-24_QP
PDF
No ratings yet
CS_XII_Comptt_15-7-24_QP
15 pages
COMPUTERS-CLASS12-SAMPLE Q PAPER, Ans - MID TERM EXAM (2024-25)
PDF
No ratings yet
COMPUTERS-CLASS12-SAMPLE Q PAPER, Ans - MID TERM EXAM (2024-25)
20 pages
SQP 12 - QP
PDF
No ratings yet
SQP 12 - QP
7 pages
Best India
PDF
No ratings yet
Best India
12 pages
SQP 04 - QP
PDF
No ratings yet
SQP 04 - QP
10 pages
XII 1st PRE BOARD QP Withsolution 2023
PDF
No ratings yet
XII 1st PRE BOARD QP Withsolution 2023
13 pages
Mock Paper 2
PDF
No ratings yet
Mock Paper 2
11 pages
One Mark Sep 2023
PDF
No ratings yet
One Mark Sep 2023
6 pages
12_computer_science_sp_09_solution
PDF
No ratings yet
12_computer_science_sp_09_solution
17 pages
SQP 09 - QP
PDF
No ratings yet
SQP 09 - QP
11 pages
CS_Pre_Board_1_Exam_Class_XII_Session-2022-23
PDF
No ratings yet
CS_Pre_Board_1_Exam_Class_XII_Session-2022-23
8 pages
Class Xii Computer Science Mock Test Paper 01 Ms
PDF
No ratings yet
Class Xii Computer Science Mock Test Paper 01 Ms
17 pages
Class 12 Cs Rivision
PDF
No ratings yet
Class 12 Cs Rivision
4 pages
CBSE Class 12 Computer Science Question Paper 2024
PDF
No ratings yet
CBSE Class 12 Computer Science Question Paper 2024
15 pages
SQP 2
PDF
No ratings yet
SQP 2
11 pages
Gr12_PB-2_QP
PDF
No ratings yet
Gr12_PB-2_QP
9 pages