You are on page 1of 9
“ [Maximum Marks: 70) \ctions: As given in Practice p; aper 1 (rar) Section 1 15 questions from questions 1 to 21, Query carefully fenp_nane departnent Restinare LIKE’ Computer science given Query, which of the following cat i i following can be placed in the Fe Coraaice Sica oe canbe losin the Query Hank portion sl he "pane (b) © % id) S Toe printed by the given query?SELECT LENGTH(*WINNER") " E 6 8 (9 Jength of char data type is bytes (b) 255 bytes (©) 256 bytes (d) 456 bytes ‘transmission medium is most appropriate to carry data in a computer network that is exposed to electrical elded twisted pair (b) Optical fiber (©) Coaxial cable (@) Microwave none LAN can be transmitted to another LAN via the device (6) Bridge (©) Repeater (@ Modem od of list to add an element to the stack. (b) read() (©) append) @ asa) structure of pandas is/are (b) Data Frame (c) Both of the above (@) None of the the following statement is correct for importing pandas in python? (fb) import pandas as pd (@) import pandas as pas (@) Al oF he statement. ne is like a fixed-sizedict in that you can get and set values by index label tbe be passed into most NumPy methods expesting anndarray etween Series and ndarray is that operations between Series automatically 34B Pagceher euath® Informatics Practices (Python) —12 10. Choose the right statement to install matplotlib library. (b) pip installpyplot —_(c) pip matplotlib install (d) install matplottip (a) pip install matplotlib 11. The name and logo of the software will be protected under (a) Patent (0) Copyright (0) Trademark (@) Digital propery rig 12. Which of the following is disadvantage of open souree software? (a) Low quality software ()) tis customizable (©) Might have bugs as not tested critically (@) his free 13. Expand the terms ( Top (i vor ngs from his mobile to Mr Shyam mobile Suggest Wo sultable witeles opin, 14, Mr. Ram is interested in transferring hhe may opt for doing the same, XYZ School with 25 stand-alone computers is considering networking them together and adding a server. State yp advantages of doing this 16, Identify the URL and Domain Name. bitpsi/vww.rachnasagarin/books,php 17. What do you understand by the term identity theft? 18, Define Cyber Crime 19, Write the command which 20. Stealing of phone comes under eybrecrime, True/False, 21. Expand VOIP. remove the duplicate values in a column. Section II Each case study based questions 22 and 23 are compulsory. Attempt any four sub-parts from each question. Each sub question carries 1 Mark. 22. Two DataFrames Dfl and Df2 are given below: f Df DR [markt mark? mark mark? 0 10 15 0 30 20 1 ao | 45 1 20 25 2 5 30 2 20 30 3 40 70 3 50 30 Write the code for the following: (@) To add two DataFrames. (@ print(d£1. concat(d£2)) (ii) print(pd.add(dtt, £2) (iii) print(éf,add(¢e1, d£2)) (i) print (oe. add(dt2)) ©) To subiract Dfl and DR. (8) print (pd. subtract (d#2, d£1)) (ii) print(df. subtract (d£1,d£2)) (iii) print(d#2. subtract (df2)) (@) print (de. sub(ae2)) (©) To rename column mark as marks in both the dataframes, (0, 6£1.xenane(colums={ markt: ‘matks'}, inplace-True) (i) 482. renane({'mar4a: ‘marks’, inpl (iii) £1. rename (columns : (i) £4. renane (columns Practice Papers 349 ( To change index label of DAT from 0 to zero an id from 1 to one, (@ aft. ren: Lindexe fi 2870",2:"one"},inplacestive] aot eranel ress (CP oor rere en ) + Anplace-True} TO", 1:"one*)}, (jo) d£1.renane(index(0:zer0*,1 (ii). £2. rename indexes=(0 »Anplace:Trve) "one", inplacesTrue) (0) Which of the following command wilt displ 'y the column labels of the DataF 2 (9 print (d£.colums()) of the DataFrame dt (i) prine (dt, column (ii) print(4£. column) 0) (i) print(4e,colums) su Smridh has recently changed his s s comments on his social media profile. 1. he finds someone chasing him online, 9 (a) Smridh is a vietim of ., , demeaning. rerytime he goes online, @ Eavesdropping (i) Stolen identity (ti) Phishing (6) The action that Smridh should take: (0) Cyber stalking (0 He should ONLY share with his friends (@ He should NOT share with anyone as it can cause serious problem (ii) He should immediately report to the police (3) He should bring to the notice of his parents and school authorities, © v= Sa Set of moral principles that governs the behaviour of group or indivi the use of computers. iual and regulates (0 Copyright (i) Computer ethics (iii) Property rights () Privacy law (@ Smridh needs to protect his personal information or data from unintentional and intentional attacks and disclosure which is termed as . (® Digital right (i) Copyright (iii) Privacy () Intellectual property (¢) The act of fraudulently acquiring someone's personal and private information, such as online account names, login information and passwords is called as. () Phishing (ii) Fraud (ii) Scam KOE eansc Part B Section I A. Wit wo advantages of star topology over Bus pol. wee (without using any 48, Write a python program to create and find the Total salary of all employees in the given data frame(without using any function) 350. apecher aed® Informatics Pract 26. 27. 28, 30. 31. 32, 33. 37. 38. tices (Python) —12 Will the following code execute successfully? Ifnot, give the reason? import pandas as pd af =pd.ataFrane({‘A’: [John’s ‘Masters John’, ‘Mina’ ], fg’: ['Masters’. Graduate’], “c's (27, 23, 21) dé.pivot(‘A’, “8, ‘C’) 1d how is it useful? What kind of data gets stored in cookies Differentiate between Delete and Drop command in MySQL. OR plain with a su table example, What is the importance of a Primary Key in a table? E Mr, Sharma ereated two tables with CITY as Primary key in Table 1 and as Foreign Key in Table 2. While inset s not able to enter a value in column CITY. What could be the possible reason foy a row in Table 2, Mr. Sham Define E-waste. Name the government organization that take care of e-Waste management in India? xxplain the concept of split-apply-combine in groupby. What are the different ways to protect the rights of the developer in GPL? “Cyber Fraud is now-a-days every common term which we hear”. Explain this term. Section II “James is storing some personal information in his cyber hub”. Introduce him with their Privacy Law, . What is following statement doing? df.drop(["Total", “Order"], axis=1) . Write the output of the following commands: (Select ength(*Naveen Gupta”); (ii) Select Pou(2, -3); (iii) Select mid("CBSE Class XII", 3, 2); (iv) Select upper("rachna sagar"); Write two applications of cyber law. OR creasing the issue related to people's social life. Write the few points about how technology ii Section I Consider the following graph. Write the code to plot it: 50. 45: 40. 36. 30. 25 epciliag ‘Sehwag Virat Dhoni Kapil Dev. Gavaskar Ra opus on te BIEN data, answer Practice Papers 354 ’ the | Appname Piel | | ele LUDO oe —| Download | Teen Titan 120 197000. Marvel Comics 196000 272000 311000 b Way Surfer Crazy T 0 1 2 3 | ColorMe — 5 6 | Igram Pro, [7 | Mario “3 Matha Formula inport pandas as pd inport nunpy as np inport matplotlib as pit App None=(LUDO',“TeenT titan’, ‘Harve conics’, colarie: "Sub bay 5 ee. Y Surfer Crazy Taxi’, Igran Prot, “hario’, ‘Matha foo Price_1n.Rs-(75,120, 199, 245,550,55,175,75,140) Total_Downloads=[197000, 209000, «14000, 196000, 272000, 312000, 213000, 455000,276000] Year=[2015, 2014, 2025, 2016, 2036, 2014, 2018, 2019, 2020] ; (#) To create the Dataframe from the above list, (i) To print the maximum price (iii) To add the new column type with following values. Type=[ ‘Simple’, ‘Horror’, Puzzle’, ‘Simple’, ‘Action’, Action’, “Sirple’, ‘Action’, ‘Puzzle"] (®) To print the complete dataframe in ascending order of App Name. (») To print the sum and the count of the download for every year, 40. Consider the following tables Student and Hostel. Answer the questions, Table: Student (‘Admno | Name Gender | Adm date Class Fee | Hostel id /1001 | Tejas Gupta. «| M 2018-01-15 | VII 10000 | 002 | Muskan Khan |F 2018-06-01 | IX 12000 3 [1003.__| Rupinder Kaur), [FE 2017-07-01 |X 13000 [3 | | 1004 Kirishnav |[M 2018-06-01 | VII 10000 a 1005 | Kesar Chauhan | F 2018-0407 | Vil NULL (1006 | Robert iM 2017-02-01 _| Vill {11000 a [1007 | Shubham M 2019-01-01 | 1X [2060 loon cl Reani 3 2018-04-01 | VII | 10000 pth [1008 [Radhika | F 352 Fagecher wieh® Informatics Practices (Python)—12 ble; Hostel Hostel id Block_Name Incharge ] el Nehru Block | Sonia Mann | | Gandhi Block | Chetna Gupta | 3 | Patel Block Neelam Pal | Subhash Block [Gurpreet Singh | n Key. {2) What wil be the degree and cardinality oF the Cartesian product of Table Student and Table Hotty SQL commands for (A) to (H) and output for (1) to (1), (A) To display Admission number, name and class of male students, (B) To display students name in lower case whose name start with 8. (©) To display student details who are not paying fee, (D) Todlisplay student name whose year of admission date isin the range of2017and 2019 (Both daey ‘inclusive, (£) To add one more column phone of integer type in hostel table (F) Tod (@) Todispla hame and block name; play student’s admission number students, detail whose hostel incharge is chetnagupta, n number, name, and annual Fee o (11) To display a report tisting student adn students (Annual fee fej) (I) Select count(distinet hostel_id) from student; () Select Min(adm_¢ ie),Max(adm_date) from Doctor; (K) Select hostel_id, count(admno) from student hostel where student.hostel id = hostel hostel_id group by hostel ids (L) Select avg(fee) from student where class = «VII OR Write commands in SQL for (i) to (iii) and output for (v). | Storeta Name ean Cite | NoofEmployees | DateOpenca SalesAmount [stor] Planet fashion | Karol Bagh Delhi 7 2015-10-16 | 300000 | sto Trends [Nehru Nager | Mumbai | 14 2015-08-09 | 400000 lg S103 Vogue "Vikas Vihar Delhi 10 2015-06-27 | 200000 | |__sioa' Super tstion | Defence Colony | Dent 8 [2015-02-18 | 450000 | | sios Rage Bandra Mumbai 5 2015-09-22 | 600000 (0 To display name in upper case with all the removed space from both sides (ifany), location, city, SalesAmount of stores in descending order of SalesAmount (i) To display length of the stores name long with SalesAmount of those stores that have ‘fashion’ anywhere in their store mes. (iti) To display Store Fecation and Date Opened of stores that were opened before Ist March, 2015. (iv) To display the details of all the stor res which opened in the year 2015, (») To display the structure of the table, ve). —— ——— —— 2. (b) Rc Panree eave GPa 1.0 3. (b) 4 0 8. @ 1. (b) oe aa 9% (a) 10. (@) 5. (b) ee) { TCP: Transmission Control Protocot I. (@) 12. {iy VOIP : Voice Over Internet Protocol 4. placooth, Will Dire X Resource Sharing, Rel fe URL hs/wwstachnasogaivbooks php pomain Name : rachnasaganin +, jdenity Theft: Il is gaining someone else's ide lse's identity, without his/her know isther knowledge and uses it to commit fraud. cyber Crime: Its an unlayful activity done through a eo packing, phishing, dumpster diving ete igh & computer oF computer network. Types of eyber crimes ate b bility, Cost Effective 1p. Distinct 10, False sh Quantile 1, (@) (ii) print (é#t.add(a#2)) ( iit) print (df2. subtract (a#2)) (0) (@ déi.-renane(cotums={ ‘mark (@) (ii) 4#2. rename (index={ (© (iv) print (dt. columns) 33, (@) (in) Cyber stalking (6) (iv) He should bring to the notice of his parents and school authorities. (0) (ii) Computer ethies (@ (iii) Privacy © (i Phishing ‘¢ Faster communication in star topology as compared to Bus topology. ne of connection allows freedom of removing or adding nodes from the network. ‘Ritesh’, ‘Aakash’ ‘Nanu’], “Salary’:[15000, 16000, 180001) mnarks’}, inplace=Txue) “zero” ,1:"one"}, inplace=True) ‘© Independent 48, de{‘Eno' :[1,2,3], ‘Ename’: df-pd.DataFrane(d) print(dé), suni-0 for (index, values) in df,iterrows(): sunt+-values[2] _ #lteration on Salaries print ("Sun of the Salary”, sunt) 46. No, This code will generate an error, because Pivot() ea column combination. ValueError: Index contains duplicate en ilities is visited, ranot work with data having multiple values for same rows and yeries, cannot reshape. is server sends certait n information about the browser, which is e visited sites. 27. When a Website with cookie capabi stored in the hard drive as a text file, It's a way for the server ‘to remember things about th zB DELETE, i DROP A @ It is DDL Command. _\ © Iisa DML Command. from the relation |¢ Tlisused toremove the records along with its table’ sone ® It is used to remove record(s) ‘e Drop table Delete from
SS 354 Topecker werk® Informatics Practices (Python)—12 OR ies a tuple/ row/ record uniquely, “The Primary Key is an attribute’set of attributes that identi Example: Rollnumber in the table STUDENT oR “AccessionNumber in the table LIBRARY OR EmpNumber in the table EMPLOYEE OR PanNumber in the table INCOMETAX OR ‘MemberNumber in the table MEMBER OR ‘AccNumber in the table BANK Mr Sharma was trying to enter the name of CITY in Table2 which is not present in Table1. Referentil Integr that value must exist in referred table. “y ensres 30, The term ‘e-waste’ means the discarded consumer electronies produits which are unwanted orn non-working, condi and this includes Computers, Laptop, Mobiles, Electronic Home Appliances, etc. ions, CPCB- Central Pollution Control Board is government body who take care of e-Waste in India, 31. By “group by” we are referring to a process involving one or more of the following steps: Splitting the data into groups based on some criteria Applying a function to each group independently. Combining the results into a data structure. 32, Developers that use the GNU GPL protect rights with two steps: (0 assert copyright on the software, (i) It offers this license giving legal permission to copy, distribute and modify it. 33. Cyber Fraud: A fraudulent scheme performed by a dishonest individual, group, or company in an attempt to obtain money or something else of value on the internet. Examples of eyber fraud lottery scams, scam baiting, email spoofing, phishing, or request for bits of help. 34. Privacy Law: It refers to the laws which deal with the regulation for storing and using personal data of individuals, ‘which can be collected by various organisations or individuals 35. The above statement will delete the columns total and order. 36.) 12 (ii) Output: .125 (ii) SE (i) RACHNA SAGAR 37. Cyber law emcompasses a wide variety of political and legal issues related to the internet and other communication termnologies, including intellectual property, privacy, freedom of expression and jurisdiction. OR Social issues (Deficits in social skills (ii) Sense of isolation (iii) Technology and depression 38. batsman=[ ‘Tendulkar’, ‘Sehwag’, ‘Virat' ‘Dhoni, ‘Kapil Dev’ century=[50,28, 38, 23, 26,35] plt. plot (batsman, century, marker='o') Gavaskar’] pit. shox) 39. (i) dfGane=pd. DataFrane({"Appnane”:App_Nane, “Price”: App Price_in Rs, Download": print (d£Gane) (i) étGane{{Pxice’]].nax() — i - fotal_Dounloads, "Year": Pet be eee Practice Papers 355 print(dfGane) Puzzle’, ’Sinpie (fare, s02%_valU5 (by="Appmane*) (0) o£Gone[{‘Dovntoad (p, TablesStudent Primary Key:Admno Foreign Key:Hostel_id Table:Hostel + 'Retion* . + Action’, ‘Simple’, ‘Action’, ‘Puzzle’ ] “er ear'}]groupby( Year ).a99( (sun, 1en) Len] Primary Key:Hostel_id (i Cardinality: 8X4 Sarr Degree: 7 +3 = 10 Columns (ii) (A) Select admno,name,class from student whe (B) Select lower(name) from student where Sane Ng iS oan * a student where fee is NULL; a ect name from st i (E) Alter table student ae ae a ‘Sh; ‘year(adm_date) and year(adm_date); (F) Sele, g ) ‘ ee admno,name,block_name from student,hostel where studenthostelid -hostelid = (G) Select student.* from student,hostel where student hostel pce (H) select admno, name, fee*12”Annual Fee” from student; A hostel.hostel_id; |i and incharge = ‘Chetna Gupta’; M4 (2) Min(Deptid) —_ Max(Deptid) 2017-02-01 2019-01-01 (K) hostelid Count(Admno) 1 3 2 2 B 2 4 1 (L) AVG(FEE) 10000 OR : (8) Select trim(upper(name)),loc ,salesamount from Store order by salesamount dese; (ii) Select length(name),salesamount from store where name like “%6Fashion?¢ (iii) Select name,location,dateOpened from store where dateOpened<"2015-03-01"; (iv) Select * from store where year(dateopened)=2015 () Dese store;

You might also like