You are on page 1of 12
Section A . What kind of problems can occur as a health hazard of using technology? fy) (a) Vision problems (b) Muscle problems | (c) Obesity related problems (d) All of these Ans. (d) Allof these 2 Ans. - Kavita wanted to use an operating system to which she could make further development, what kind of operating system software she should use? (1) (a) Open source (b) Proprietary (c) FOSS (d) Both (a) and (c) (d) Both (a) and (c) A Series has by default a (a) positive indexes (c) only user defined indexes _(a) Positive indexes (b) both positive and negative (a) Series does not have index i |. Ta an information in order to commit crime is called a (a) date et identity thet saiigien as Identity theft (c) mail theft (a) persone ., Which of the following function retuy .e position of the first 5. occurrence of the sub-string within he ees that indicates the pt af (a) INSTR) ) RTRIM() M( ba (eNsTL) () LENGTH() (a) TRIM() Jack wanted to create a data stru q ture th and Marks of his ‘Tesematea Which dat, tract iat would store the Name, Stream. re he should use? ey (a) Stack (b) Series (c) DataFrame —_(d) None of these ys. (0) DataFrame 7, Which of the following is/are the benefits) of e-Waste management? a (@) Saving the environment (©) Creating jobs (c) Recovery of precious metals (d) Allof these ys. (Mo ese 8, Given below is a code, identify the error init ao import pandas as p Joysep.Series((22,44,66,88,99]) ‘The property to get the number of bytes occupied by the series is (aT (0) nbytes (6) shape (¢) index ns. (0) mbytes 9, The WWW is made up of the set of interconnected ....,.... that are linked together over the Internet. w {@) electronic documents (0) web pages (c) files (@) All of these ‘ans. (bo) Web pages 10. What will be returned by the following query? a SELECT ROUND(178.867,2); (a) 178.86 (0) 178.88 (0) 178.87 (a) 179.00 ‘ans. (0) 17087 11. In ue httpyAvwwarihant.com/index.htm, which component identifies the path of a web page’ a (a) http (b) www.arihant.com (6 index.htm (a) All of these ‘ns, (6) findex.iim Nek: lve a RE CITIES ="NUMBAI* by 12. Choose the correct query to display the left most 4 letters from the customers yp, Mumbai or Banglore. (a) mysql >SELECT LEFT(CNAME)FROM Customers HHE OR CITIES = “BANGLORE"; : 4 (b) mysqi>SELECT LEFT(CNAME,3)FROM Customers WHERE CITIES ="MUMBAL OR CITIES = “BANGLORE": (c) mysqi>SELECT LEFT(CNAME,4)FROM Customers WHERE CITIES = OR “BANGLORE": (d) mysql >SELECT LEFT(CNAME,4)FROM Customers WHERE CITIES OR CITIES = “BANGLORE*; ; Ans. (d) mysq)>SELECT LEFT(CNAME,4)FROM Customers WHERE CITIES ="MUMBAI OR CITIES = *BANGLORE*: “MUMBAI UMBAI* 13. Which one of the following is not a malware? (a) Computer virus (b) Spam (0) Worm, (@) Application Software Ans. (4) Application Software uy 14. Which of the following function returns only the day number from month of selected date? a (a) DAY(date) (b) DAYNO (date) } () DAY_NUMBER(date) (a) DATE (date) Ans. (a) DAY(date) 15. Which of the following function will display the specified number of characters from a particular position of the given string? a {a) MID() (b) SUBSTR() (c) Both (a) and (b) (@) None of these Ans. (c) Both (a) and (b) 16. The default date format is uy (a) MM-DD-vyyy (b) YYYY-MM-DD (9 DD-MM-vyvy (@) None of these Ans. (b) YYYY-MIM-OD Directions (Q.Nos. 17-18) Assertion and Reason based Questions. 17. Assertion A We cannot freely comment on anything. i} Reason R Use of technology like Internet, E-mail, cellphones, social media to harass, threaten, embarrass, or target a person is a cyber crime (a) Both A and R are true and R is the correct explanation of A. (b) Both A and R are true but R is not the correct explanation of A. (c) Ais true but R is false. (d) A is false but R is true. Ans. (a) We should not freely post any comments as there are cyber laws to deal with crimes lke cyber bullying and cyber trolling. Hi ‘stograms are used to describe distributions. uy Is in x-axis, the property used is “interval”. (Both Aand Rare tue and Ris the comet aphinatberot A &) Both A and R ate true but Ris hot the correct explanation of A (o) Ais true but Ris false : . (@) Ais false but Ris true, ._ (@) Histogram do not show individual : ANS Speci the intervals is “bins” vvalues but the distribution of values in intervals. The parameter to Section B aman freelance website developer, has been assigned a task to design few web pages for abook shop, Help Aman in deciding out of static web page and dynamic web page, what kind of web pages should be designed by clearly differentiating between static and dynamic web pages on atleast two points? i ‘man should develop dynamic web pages as they are more rich wit features, interactive and are better in performance. 19. Ans. Differences between static and dynamic web pages ate as follows “Tnsiaio web pages. pages wil main sare uni someone changes it manualy anaes “rsa web pages ntoraton a change ae. In jean wa page orTalon ae Changed eave Sate web pages a witen in engvages such &s— Oya webpages aro won in anquages Bch se HIML JavaScript CSS, ete COLARCASPASPNET CO ‘Dynamis Web Pos ih djramic web pages, content of pages a diferent or Or Priyanka, a beginner in IT field has just started learning web technologies. Help her in understanding the difference between website and web pages with the help of a suitable general example of each. ‘ans. Diterences between website and web page are as follows Wobste “Website is @ colection of web pages displayed on the tie {eb wit a clertike rower 1's a combination of web pages created using HTML Information is us Web Page {tis part of website that includes information and content and is dspayed on the browser to user or visor ten in HTML language, and OSS. “Ttrequires more time to Gevelop the website as Ie requias less time to develop @ web page @s compared compared to web pages. to te webste is Itnoludes content about several entes. Includes content or information about a sige enliy “There is no such extension included in the URL of tie URL of web page include extension. weds paoht = Its qute hard and complex to crealé the structure of iis quite easy and single to develop web page aller the nebste and ts prograrering website stnctise is being created. Riya has given the following command to obtain the highest salary SELECT MAX (EMP_SALARY) FROM Enployee WHERE GROUP BY DOJ: But she is not getting the desired output. Help her by writing the correct command. AS. SELECT DOJ, MAK(EMP_SALARY) FROM Employee GROUP BY DOJ; ) is ofa table with the help of 21. Aryan, a database administrator, has grouped record P of GROUp, clause. ough GROUP BY ty He needs to further filter groups of records generated ie ae ieee ae 4 Suggest suitable clause forit and properly, explainits usage ees xaMple, ‘Ans, He needs use the HAVING clause, Justa the WHERE cause fers n 0 a condi, HAVING clause can be used to fiter groups on basis of a conditior €.g. SELECT Dept, COUNT(*) FROM Emp GROUP BY Dept: ei Groups the records on Emp table by Dept and displays count of ea Me ‘ei department, SELECT Dept, COUNT(*) FROM Emp GROUP BY Dept HAVING CO ae Groups the records on Emp table by Dept and displays count of employees in each department, by, ey ‘those departments are shown whose number of employees are >5. Mh hs 22. A Social Science teacher wants to use a Pandas series to teach about Indian Historic, Monuments and its States. The series should have the Monument names as values an state names as indexes. Write the Python code to do so. @ Ans, import pandas as pd Monument=[ ‘Qutub Minar”, “Gateway of India’, ‘Red Fort’, ‘Taj Mahal] State=( ‘Delhi’, ‘Maharashtra’, ‘DeThi*, ‘Uttar Pradesh’ ] S=pd Series (Monument, index=State) prints) 23, Explain IPR in brief. @ ‘Ans. IPR are the rights given to persons over the creations oftheir minds. Common types of intellectual propery rights include copyright, trademarks, patents, industries design rights, trade dress and in some jurisdictions trade secrets. Some of them are as follows () Copyright (i) Patent (i) Trademark, Or ‘What are the e-Waste hazards? ‘Ans, e-Waste hazards on the environment are as follows (i) Acidification of soil (i) Air pottution (ii) Pollution of ground water (iv) Landfills with lead and heavy metals e-Waste hazards on the human health are as follows () Lung cancer (i) DNA carnage (ii) Asthmatic bronchitis (i) Chronic damage to the brain (¥) Damage to heart and liver ‘ider the following dataframe df1: 2 EName df1 oct 0, *Sal"} ‘Ans, 50000 ‘The command df1..ocl:0,"Sai"] prints the value of ‘Sal! column for row 0. L 35. Consider the following Series in Python a data ~ pd-Sertesi(5, 2, 3,7], indexet'a', *b 1) Write the Python statements to: (@) Display all odd values of the series, (ii) Display the number of elements in the series () print(data(dataz2!~01) (i)data.size Ans. Section C 26. Predict the output of the following queries, (3 (i) SELECT INSTRC exams@cbse.nic.in’,*.*); (ii) SELECT SUBSTR( ‘exams@cbse.nic.in',7,4); (iil) SELECT LEFT( “exams@cbse.nic. in’ 5); ans. (0 @ i) xan 27, Ritika is a new leamer for the Python Pandas and she is aware of some concepts of Python but is unable to create the DataFrame. Help her by writing proper statements which will create the DataFrame for the following data. (3) Name: ['Manpreet','Kavil’,Manu’,'Ria'] Phy:|70,60,76,89] Chem:[30,70,50,65] Ans. import pandas as pd Wame=(‘Manpreet’, ‘Kavil’, ‘Manu’, “Ria’) Phy=70, 60,76,89) Chem=[30, 70,50, 65] dfepd.DataFrame( ( “Name”: Name, “Phy”: Phy, “Chem: Chem) ) 28. Output of the above code [3] eae Naveen Rehana John Roja Mannat Waths| 9 2 9 es 4 Science ot et = Tire oarnetes Hindi 7 96 8 a) Based on above DataFrame, write the Python statements for the following. li) To add a new column with name of student ‘Prem’ in above DataFrame. (i) To set all the values to zero in DataFrame. (ii) To delete the row of Science marks, Ans. (i) DFC‘Prem’ J=(89, 78.76) (i) DFEsI-0 axis=0) (il) DF. drop oxtsn0 *Seience’. , nt user of Internet appiic, ent of Class IXth and he is a Te ee rieaediGfe PPIicatig, sh is a stude : 29. Sahar isa student of eg message on Bs ns . : ? you think he should do’ ia galing @ caed rH en aie manners and etiquettes while being 0 ii) Exhibiting pi issues? the law to handle such issues ete vances A na s ri aia teacher or other trusted adult and et them know that abe hey 11s. (i) Go 5 010 Cyber cell and complaint (ii) Netiquettes i) Cyber law (i) Cy - tically appearing on Mr. Navneet found that his login id and password are stom nicallvgppen mh key in the login page. Explain him how cookies are resp Schuh ‘Ans, Ceokice aro fies created by websites you vst. They make your online experience easier by saving browsing * information, With cookies, sites can keep you signed in, remember your site preferences and give you local relevant content. The purpose ofthe computer cookie sto hep the website keep track of your visits avy activity 30. Ms.Saumya is working on a MySQL table named ‘Hotel’ having following structure: (3) Table : Hotel Key Defaut Extra vere) vvarchar(20) “Tmobile no__varchar(t1) She needs to perform following task on the table {i) To fetch last 2 characters from the user_id column, (i) To display the values of name column in lower case. (iil) To display 3 characters from 3rd place from the column city. Suggest suitable SQL function for the same. Also, write the query to achieve the desired task. Ans. (i) Function RIGHT() ‘Query SELECT RIGHT(user_id,2) FROM Hotel : (il) Function LCASE() Query SELECT LCASE(name) FROM Hotel; (iil) Function SUBSTR() Query SELECT SUBSTR(city.3,3) FROM Hotel : Or While dealing with string data type in MySQL, its observed that sometimes unnecessary Space character comes in between which hampers the successful executing of a string manipulation module. Name the suitable MySQ1. function(s) to remove leading, trailing and both type of space characters from a string. Also, give MySQL queries to depict tha same, fa oonove Batre Wendie Liiag) tap SELECT LIRINCo#PSpoceanhe), Output ‘inain inipacesnasy | ans. ( (i) To remove traling spaces — RTRIMI) eg. SELECT RTRIM“H#Spacest#"); Output TRIM (*#Spaces#i=) {i To remove spaces in both sides— TRIM() e.g. SELECT TRIM(“#H#Spacesi#” Output RIN ("#Space! Note # denote space Section D Table: Furniture ype Datecsioak— Pace Double Bed 230002 200 12owe 25000 Based on above table, write the SQL. commands for the following: (i) To show all information about the baby cots from the Furniture table. (ii) To list the Itemname which are priced at more than 15000 from the Furniture table. (di) To list Itemname and Type of those items, in which Dateofstock is before 22/01/02 from the Furniture table in the descending order of Itemname, (iv) To display Itemname and Dateofstock of those items, whose ‘Iype is " Sofa" from Furniture table. (v) To insert a new row in the Furniture table with the following data: 14,""Velvet touch” , "Double Bed” {25/03/03}, 25000,30 ‘ns. () SELECT * FROM Furniture WHERE Type= "Baby Cot (i SELECT Itemname FROM Furniture WHERE Price>1500 (i) SELECT Itemmame, Type FROM Furniture WHERE Dateofstock < "22/01/02" ORDER BY Itemname bese: (i SELECT Itemnane , Dateofstock FROM Furniture WHERE Type= ‘Sofa’; (INSERT INTO Furniture VALUES (14, "Velvet touch’, ‘Double Bed’, "25/03/03", 25000, 30) (51 or Explain the following SQL functions using suitable examples. (i) RIGHT() (i) COUNT) (iii) YEAR() (iv) SUMO () MoD) ‘Ans. ()) RIGHT() This function returns a specified number of characters from the right ofthe string, Syntax RIGHT (string, Tength): (i) COUNT() This function returns the total numberof values or rows of the specified field or column, Cg, ("Vis special function, asi eturns the count of all rows in a specified table. It includes all the ny duplicate values. Syntax SELECT COUNT(*) FROM table name: (fi) YEAR This function returns the YEAR part from the given date argument. The return value is in t of 1000 to 9999 or 0 for nl date Syntax _YEAR(date/column_name); {v) SUMO This funeon returns the sum of values in the specified column, The SUM works on numeri only, Null values are excluded from the result returned, "elds Syntax SELECT SUN(column_name) FROM table_name; {v) MODQ This function returns the remainder of a number dividing by another number. Syntax MOD(Dividend, Divison) ang Nerang 32. JNV School at Hyderabad have their offices according to th H 1 followin through the details and answer the questions that follows, 5 Sagram INV, Hyderabad 5 eee Wn) Distance (in meta) _MESS fo SCHOOL —— _MESSto DORMETORY “NESS to GATE. “MESS w AN “$0#001 6 pomeTOR _DORMETORY to GATE DORNETORY to (i) Name the most suitable wing, where the server should be installed. Justify your answer, {i) Draw the cable layout to efficiently connect various wings JNV, Hyderabad and also “write the topology. {ii) Suggest a device/software and its placement that would provide data security for the entire network of the School. fix) (@) Which device will you suggest to be placet/installed in each of these wings to efficiently connect all the computers within these wings. (0) Suggest the placement of a repeater in the network with justification. (x) Suggest a device and the protocol that shall be needed to provide wireless Internet access to all smartphone/laptop users in the campus of JNV, Hyderabad. ans. () SCHOOL, it contains maximum number of computers (i) Star topology aN, ydorabad (i) Firewall should be installed in the SCHOOL, where the server's located. (i) (@) HubySwiteh (b) Repeater should be installed, where the dstance between the wings is 70 metre or more, As per the above layout, no repeater is required (v) Devices Wi-Fi or WIMAX or WiFi router Protocols 802.11, WAP, 802.16 33. Write the code in Pandas to create the following DataFrame for ‘Write the commands to do the following operations on the DataFrame given above: (i) To select the column Designation. (ii) To change index label from 1 to E101, 2 to E102, ... and so on, Ans, inport pandas as pd import numpy as np array = np.array(CC*Abht "DBA" 35000), CYanshika’ ‘Programmer’, 400003, URiya’,*Tester* 32000), [*chirag’, ‘Content Writer’.25000), x [*Tushar’, ‘Business Analyst’ 30000], [*Khushal", "Sales Executive’ 37000). [’mani*, "eb Designer’ ,42000]]) index_values = (1,2,3,4,5,6.7] colunm_values =C‘tame’, ‘Destgnation’, “Salary” df = pd.DataFrame(data = array, index = index_values. columns = column_values) print(df) (4) df{‘Designation’] (ii) df.rename Cindex={1 : ‘ELOL", 2: ‘E102", 3: “ELO3", 4 *£105", 6 : “EL06", 7 : “ELO7"I, inplace = True) {E10870, 05. Or Write the code for the following bar graph, sexy po on de a | Wl ® Hy al WH be yo yy OH i a : | “| H oa C ot ly sors (Bue) 1Grs Green| ‘Ans, import numpy as np import matplotlib.pyplot as plt N=5 boys = (22, 30, 35, 38, 26) girls = (25, 32, 30, 35, 29) boyStd = (4, 3, 4. 1, 5) girlStd = (3, 5, 2, 3, 3) ind = np.arange(N) width = 0.35 pl = plt.barCind, boys, width, yerr=boyStd, colors‘blue") p2 = plt.bar(ind, girls. width, bottomegirls, yerregirlStd, color="green”) plt.ylabel (*Scores") pit. xlabel ( Groups") pit.title(‘Scores by group\n’ + ‘and gender’) pit.xticks(ind, (*61", G2", "63", °64",°G5")) pit.yticks(np.arange(, 81, 10)) pit.legend((pl£0}, p2f0}),(*Boys”, *Girls')) pit.show() Section E 34. Consider the following DataFrame din: +143) : a 8 c ‘cer 480 10 350 Puchase 930 “0610 Sel 250410 380 “Target 4050960280 (a) Write the output of the following statement. (i) dfn CO°A*, *B1) (ii) dfn. loc [*Purchase’, :] (b) Write the code to replace the existing indexes of a DataFrame with O,PS and T, respectively. Or (option for part (b) only) ‘To create another DataFrame S11 and add above DataFrame to it. ans. (2) (0 “Order Puchase Set Target (A 330 B 550 Cc 610 Name : Purchase, dtype : int64 (b) dfn. index=t*0",*P',*S*,°T"] Or Sl .append(dfn) 35. ‘Table : Worker 2 +142) ‘Eats Nane Desig Pie it Rachey Shyam T3566 2004 BeAup at [2 Chander Nath 22Fe> 2010 12dul967 13 Fara {4shne-2009 14-Oct-1065 18__Ameen Afwed — Mechane E 2006 19-May-1064 18 Serva Cie _19-080-2005 Conde 1069, Consider the above table and write the SQL commands for the following: (i) To display the details of all workers in descending order of DOB. (ii) To display Name and Desig of those workers whose Plevel is either POO1 or PO02, (at) To display the detail of all the workers, whose DOB is in between '19-JAN-1984" and ‘18-JAN-1987', Or (Option for part (iii) only) To add a new row with the following data: 19, ‘Daya kishore’, ‘Operator’, ‘P003', '19-Jun-2008', '11-Jul-1984" ‘Ans. (i) SELECT * FROM Worker ORDER BY 00B DESC: (i) SELECT Name, Desig FROM Worker WHERE Plevel IN ("POOI", "PO02"); (ii) SELECT * FROM Worker WHERE DOB BETWEEN "19-JAN-1984" AND "18-JAN-1987": Or INSERT INTO Worker VALUES (19, ‘Daya kishore’. ‘Operator', *P003', *19-Jun-2o08", “1-dul-1984");

You might also like