0% found this document useful (0 votes)
17 views12 pages

KV Preboard 2

Class 12 paper

Uploaded by

sam25112008
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)
17 views12 pages

KV Preboard 2

Class 12 paper

Uploaded by

sam25112008
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/ 12
4 AAA-1207 TS oe eee P-12 PRE-BOARD 2 EXAMINATION 2024-25 Class: Xil Subject: COMPUTER SCIENCE (083) Time Allowed: 3 HRS MM: 70 General Instructions: (v) (vi) wii) viii) This question paper contains five sections, Section A to E. All questions are compulsory. Section A consists of 21 questions (1 to 21) carrying 01 mark each. Section B consists of 7 questions (22 to 28) carrying 02 marks each. Section C consists of 3 questions (29 to 31) carrying 03 marks each. Section D consists of 4 questions (32-35) carrying 04 marks each. Section E has 02 questions (36-37) carrying 05 marks each. All programming questions are to be answered using Python Language only. SECTION-A ‘State True or False: “Python supports dynamic type binding.” 1 |= Which of the following is an invalid identifier in Python? 1 (a)_name (b) inum —_(c)num1_(d)_num_4 Given the following dictionary: 1 Which statement will update marks of the dictionary? "name"."Vijay", "class":12, “marks”:78} marks = 88 A + 7 { lowing will be correct output if i eth put if the given AAA-1207. 2 5 | Select the correct output of the code: 7 a= "Gautam, Vijay, Vivek, Abhinav" a =a.split(’ b= al] + "= print (b) . a. Gautam=Vijay-Abhinav ~ y-Vivek aft] + "+ af-1] c, Gautam: d,__ Gautam Vijay Abhinav & | How do we open a text file in read mode? 4 (aja (b) r (c)w, (d) None of the above: Fill in the blank: command is u! database. (a) update _(b)remove (c)alter___(d)drop ised to remove table permanently from Which of the following commands will delete the content of a table from MYSQL database? (ay DELETE (b) DROP (c) REMOVE ALTER. ich of the following statement(s) would give an error after 4 ecuting the following code? NS=ithis is our Pre Board Exam" # Statement 1 \ # Statement 2 # Statement 3 # Statement 4 # Statement 5 tells us the number of rows in a 3 AAA-1207 (a) open(“myfite’, (b) open(“myfile.txt’, “r*) | (c) opent(“myfile.txt’, “w") (d) None of these 12| Fill in the blank: 4 The Clause in MySQL is used to print the rows of table in ascending/ descending order. (a) DESCRIBE , > | (b) ORDERING S ~ (c) GROUP BY ? (d)__ ORDER BY. | 43] Fill in the blank: is the protocol used to send 1 1 emails. (a) VoIP__(b) SMTP_(c) PPP. (a)POP What will the following expression be evaluated to in Python: 1 print(18.0/6 + (10 - 4) (a) 9.75__(b)9.0 (c) 8 (d) 8.95 Which function is used to display the structure of a table ina/ 1 database? describe ° delete show select, establish a connection between Python and SQL 1 ase, which of the following module is imported in python python-mysql-connector |-python-connector ie following statements is correct for variable 1 1on language? names must begin with an underscore. einame length is a maximum of 2. mmands is used to delete all rows able? 4 ON aaynor ~ 4 OS c) DELETE d) ALTER _ | 49| When is the wildcard in WHERE clause used? a) An exact match is necessary fora CREATE statement. i b) An exact match is not possible in a SELECT statement. | c) An exact match is necessary for a SELECT statement ~ \ d) None of the above. | a0 and 21 are ASSERTION AND REASONING baseq) -— questions. Mark the correct choice as: 1 (a) Both A and R are true and R is the correct explanation for | A (b) Both A and R are true and R is not the correct | explanation for A | (c) Ais True but R is False | (d)_ Ais false but R is True 20] Assertion (A):- In default arguments calling of the functions, [~7~ the parameters having default values are written in the end during declaration. Reasoning (R):- If values are passed for the parameters having default values, python considers the value already defined during declaration of function Assertion (A): CSV (Comma Separated Values) is a file) 1 rmat used for data storage in a tabular format. on (R): For reading text files in Python, we need to Section-B 3 written a code to check if a string is a palindrome | 2 His code is having errors. Rewrite the correct code Ag relevant corrections. Make sure to underline the ‘ou make. (Hint: A palindrome is a string which ‘same when read from forward or backward. AN, NITIN) 5 a nntz07 AAA-1207 topology. Write two points of difference between Star and Hybrid (a) Given the following python code. What is i x = ["Akshay",20000,"B+","Jammu"["CS' Mathematics"]] print(x[4][-1]) Given the following python code. What is its output? x my CS Exam. y = x.split() count = 1 for iin y: if i[0].lower( count *= 2 ello There. Today is a very good day. | am having print(count) A 2 What is the use of Primary Key in DBMS? Give examples. ‘a. What is the full form of. 41. FTP 2. POP3 b. What is the use of HTTP? djict the output of the following Python code: n OR OR 5 of DDL and DML each. SECTION-C. : 7 Gonsider the following table. What will be its output? i . [Empl eniame Salary i me Empid Na Salary z B 25000 SI c 35000 © a D 15000, SELECT AVG(Salary) FROM Employee; g table Employee and find the ent queries: ~ 2. Consider the followin: output of the subsequ' EMPLOYEE Empid Name Salary E01 SIYA 54000 E02 JOY NULL E03 ALLEN 32000 E04 NEEV 42000 ‘| a, SELECT Salary+100 FROM EMPLOYEE WHERE Empid = “E03”, b. SELECT Name FROM EMPLOYEE WHERE Empid = “E04”. c. Identify the primary key from the above table d. How much is the degree of the above table @ifunction in Python that count the number of words file myfile.txt”. > myfile.txt contents are as follow: was boasting, how fast he could run. ighing at the turtle for being so slow. e, the turtle challenged him to a race. function should be: z “__Aaa-1207 E OR _| Assume that a text file named myfile.txt already contains ‘some text written into it write a function named vowelwords(),that reads the file myfile.txt and create a new file named destination.t swhich shall contain only those words from the file myfile.txt which start with an uppercase vowel(i.e. with ‘A’,'E’,",'0','U’) for example if the file myfile.txt contains Carry Umbrella and Overcoat When it Rains then the file destination. txt shall contain Umbrella Overcoat Ta Write the outputs of the SQL queries (i) to (iii) based on jiven tables: Watches G]Watch_name [Price | Type igh Time 70000 [Ladies | 100 Time 75000 |Gents | 150 72500 |Ladies | 200 Qty_store hion | 13500 Ladies 135 e | 14000 Unisex 150 Sale Aty_sold Quarter 0 i 2 5 1 | er | aaactgor ————— 2 ii, SELECT QUARTER, AVG( GROUP BY QUARTER; (QTY_SOLD) FROM WATCHES WATCHID = S.WATCHID iv. SELECT WATCH_NAME, PRIC'! BY PRICE; “Students”. woo3 1 woos SOSC*~*«* 1 wo02 15 1 i, SELEGT MIN (PRICE), MAX(QTY_STORE) FROM WATCHES; QTY SOLD) FROM SALE iii, | SELECT WATCH_NAME, QTY_STORE, w, SALE S WHERE W. GROUP BY S.WATCHID,; E FROM Watches ORDER b Write the command to describe the structure of a table SUM {2 SECTION-D Write the SQL commands for the following queries (a) to (e) 44142 on the basis of the following tables SHOP and ACCESSORIES. Table: PRICES Name Price 1D “| Mother Board 22000 so11 5000 so11 5000 3023 Li 2d 3000 $015 9 13000 $027 7 4000 $039 ml 9 AAA-1207 6000 $042 5500 S051 TO9 | Mouse 3500 S055 T10 | Hard Disk a. To display Name and Price of all the Accessories in ascending order of their Price. b. To display average price of all the accessories. c. Write the statements to: 1 To display Minimum and Maximum Price of each * Name of Accessories 2 To display all the items Name and Price having price range between 5000 to 10000 (both inclusive) OR (Option for part c only) d, Write the statements to: 1 Delete the record of all the keyboards 2 Increase the price of accessory having No TO8 by 2000 rupees. trying to write a code in Python with Binary files. He # Statement-1 .dat",” ") #Statement-2 14142 AAA-1207 10 aainistudeni( name l= student marks ‘!) # Statement-3 except 8 (‘File completely read”) a. Which module should be imported i mode in Statement-2? that no file ig the in statement-1? b. What should be the access c. What should be written in statement-3 so ending exception is raised by Python while readin: file? 34 value), where Arr is ali Write a function in Python Push(Arr, i B a of Strings. From this list push all the Strings starting with or “g into a stack implemented by using a list. Display the stack if it has at least one element, otherwise display appropriate error message. OR Write a function in Python, Pop(Arr), where Arr is a stack implemented by a list of numbers. The function should return .. the value deleted from the Stack only if itis a multiple of 6. 35, a) Conside the following table — Book and Publisher Table: Book Bcode Name. Type Bot Amar Gatha_| Fiction Bo2 Paramount _|CA BO3 Merit One CA Table :Publisher Acode City B01 Delhi Bo2 Mumbai Bo3 Nagpur the output of the followin: ig statement? 80M Book NATURAL JOIN Publisher. : lueries based on the aa M41 AAA-1207 table TECH_ COURSE given below CID_|CName FEES STARTDATE | TID C20 | Animation and | 12000 2022-07-02 | 101 VEX C202 | CADD 45000 2021-11-15 | NULL C203 | DCA 10000 2020-10-01 | 102 C204 | DDTP. 9000 2021-09-15 | 104 C205 | Mobile 18000, 2022-11-01 | 101—~ Application and development C206 | DIGITAL 160007 | 2022-07-25 | 103 MARKETING a) SELECT DISTINCT TID FORM TECH_COURSE; b) SELECT TID,COUNT(*) ,MIN(FEES) FROM TECH_COURSE GROUP BY TID HAVING . ® COUNT(TID)>1; s c) SELECT CName FROM TECH_COURSE WHERE U FEES>15000 ORDER BY CName; d) SELECT AVG(FEES) FROM TECH_COURSE WHERE FEES BETWEEN 15000 AND 17000 ; SECTION-E 3@ Significance of newline = “” argument in open() 5 python program to input the values for a ser in the form of [sname,fname,dob] and a CSV file namely “students.csv”. OR imported to work with Binary Files in Wython program to increase the salary of all ¥55000. Assume that the employees data is lle namely “employee.dat” in the form of fas [ename,salary,dob] AAA-1207 42 37| The Tech Corporation (TTC) is a professional consultancy | 5 company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (v) below: Block to Block Distance Expected no. of computers HR Conference | 110 HR 26 HR Finance [40 Finance | 150__| Conference | Finance 80 Conference | 80 4. Which will be the most appropriate block, where TTC should plan to install their server? 2. Draw a block to block cable layout to connect all the buildings in the most appropriate manner for efficient ommunication #/Microwave/Optical Fiber the device will be suggested by you to connect iter in each of the buildings? planning to connect its offices in Hyderabad than 1 km. Which type of network will be

You might also like