You are on page 1of 12
Section A Ls Intentionally kept traces of activities done over the web (a) passive digital footprints (b) data prints (c) digital traceback (d) active digital footprints Ans. (d) active digital footprints are called [1] 2. Snigdha found her image attached to an unknown person and published in a social networking site. What should she do? [1] (a) Complain the cyber crime cell (b) Ignore it (c) Upload more pictures of herself (d) Try to contact the source Ans. a) Complain the cyber crime cell 3. While creating a Series, the number of values a (a) should be same as number of indexes (b) can be more than the number of indexes {c) can be less than the number of indexes (q) Both (b) and (c) ‘ns. (@) Should be same as number of indexes 4, Selling of a software illegally for temporary use as on rent basis is called a (a) renting (b) softlitting (c) downloading — (d) counterfeiting ns, (a) Renting 5. Which of the following function returns only date part from the given date/time argument? ra (a) DATE() () CURDATE() (9 DATECUR() (@) None of these Ans. (a) DATE() 6. Which of the following cannot be used to access data from a DataFrame? a) (@) toc) (6) foc) (c) head) (@) getdatac) Ans. (d) getdata() 7, Sunaina’s computer system was not working due to a problem in the CPU, what should she do with it? al (a) Dispose the entire set and buy a new one (0) Keeping the usable components dispose the unused parts to an e-Waste recycler (c) Dispose the system casually anywhere (a) Give it to her sister for play ‘Ans, (b) Keeping the usable components dispose the unused parts to an e-Waste recycler 8. The “T" property can be used on a (a) Series (0) DataFrame (c) Both (a) and (b) (q) invalid parameter Ans. (b) DataFrame 9. Use of electronic means to perform business transactions are related to a (b) e-Business (@) Allof these (a) e-Commerce (©) e-Shopping 41S. (6) of hese 10. what will be returned by the given query ? SELECT INSTR( ‘INDIA’. "DI*); (a) 2 (o)3 (-2 (d)-3 Ans. (oy 3 2 ing is a text based web browser 11. Which of the following is a (b) Lynx (asa (a) Allo these Ans. (b) Lynx 12. Which of the following function converts the characters of an argument string to 4 uppercase characters? t (a) UCASE() 0) vereR( (c) Both (a) ana (b) (@) None of these Ans. (c) Both (a) and (b) 13. Firewalls are Q (a) softwares that destroy viruses (b) commercial softwares (c) utilities that filter the entry of malwares (d) cleaner softwares ANS. (c) Utilities that filter the entry of malwares 14. Choose the correct Customers table. (2) mysq1>SELECT LENGTH(CNAME) FROM Custoners; (b) mysq1>SELECT LEN(CHAME) FROM Customers; (6) mysqi>SELECT COUNT(CHAME) FROM Custoners; (@) mysq) >SELECT COUNT(CHAHE) FROM Custoners:; ‘Ans. (a) ysq}>SELECT LENGTH(CHAME) FROM Customers: ery fo display the length of customer's name(CNAME) from a) 15. Which clause is used with aggregate functions? (@) GRoup By (©) WHERE Ans. (a) GROUP BY a (b) SELECT (4) Both (a) ana (b) 16. Which function only removes the trailing space from the cha argument? acters of a string passed as an (a) TRING) (o) RTAING) Ans. (c) RTRIM() (b) LrRIMC) a (@) Both (a) and fe) Directions (Q.Nos. 17-18) Assertion and Reason based Questions 17. Assertion (A) The Internet is a world wide coll able to exchange information with each other ts dissimilar networks, a (¢) Ais true but Ris false, (4) Ais false but R is true. (p) Internets a world wide system of computer networks able to exchange information. A gateway is a device that connects dissimilar networks. A backbone is central interconnecting structure that connects one or more networks. 7 Ans. 18, Assertion (A) Data visualization refers to the graphical representation of information and data using visual elements like charts, graphs and maps etc. Reason (R) To install matplotlib library, we can use the command pip install matplotlib. (a) Both A and R are true and R is the correct explanation of A. () Both A and R are true but R is not the correct explanation of A. (0) Ais true but R is false, (@) A is false but R is true. Ans, (b) Data visualization is a graphical representation of quantitative information and data by using visual elements. Matplotib library's Pypiot is used for data visualization. pip install matplotib command is used to install matplati library Section B 19, Define Voice over Internet Protocol (VoIP). Also, explain its one advantage. el ‘Ans. VoIP (Voice over Internet Protocol) is an IP telephony term for a set of facilities used to manage the delivery of voice information over Internet. It enables a user to make cheap telephone calls over a broadband Internet ‘connection, instead of using a regular telephone service, A major advantage of VoIP is that avoids the tolls, charged by ordinary telephone service. Or Explain any two uses of the Internet. Ans, Two uses of Internet are as follows: (i) Electronic Mail (E-mail) The first major use of the Internet is E-mail. People used E-mail for sharing information, data files, photos, videos, business communications and any other files instantaneously with ‘others. This had enabled faster communication between people and improve business efficiency. (i) E-commerce The Internet enables the selling of goods and services in online mode. There are many E-commerce platform vendors like Amazon, Ola who aggregate several products/services available in the market and sell them through their portal to customers. 20. Rashmi is a travel agent, she has stored the data of all passengers in a table Travel(PNo, PName,TDate,Km, Coach). She has given the following command to display the name of the traveller whose travel date is in year 2016. She is encountering an error while executing the following query: 1 SELECT Plame, TDate WHERE TOate= °2016" FROM Travel: Help her in identifying the reason of the error and write the correct query by suggesting the possible correction (s) ‘Ans, SELECT piiame.TDate FROM Travel WHERE YEAR(TDate)=2016; 21, Samadrita wants to find the outputs of the following queries using SUBSTR() and MOD() functions, Help her to find the outputs. 2) (i) sevect suastR(“testcases”.-5.3)+ (i) sevect mop(17.7.3): ‘Ans. (0 euacr Su@sTaCtestases" cas " in ‘The SUBSTR() function extracts certain number of characters fom Z a characters starting from position ~ 5 and then 3 characters from ; Oe 1g . Here the function extract ‘The MOD() function returns the remainder of division 22. Write a program to create a Series object using a dictionary that stores the name and | admission no. of students of your school. a Ans, St-('Ram’ :2001, ‘Reena’ :2030 , * Ravi" :2020, * Sameer’ :2018] Si-pd.Series(St) 23. Write any two tips to avoid spams. (2) Ans. You can use the following guidelines to avoid ‘spam, they are as follows: (i) Keep your E-mail address private. (ii) Using appropriate filters to find and alter you about spam, Or Intellectural property right means that the one who can use that information. Now, right. Ans. The intellectual property rights must be protected because of Protecting them, (0 encourages indviduals and business to create new software and new software appli re application: improving existing applications. eee ee wel a0 (ii) ensures new ideas and technologies are widely distributed. (il) promotes investment in the national economy, etson who produces the information is the only explain the need of protecting intellectual property 24, Answer the following questions based on the Series given below import pandas as pd fal Vistl(1,2,3,4,5,6,7,8] list2=[‘swimming’, ‘tt’, ‘skating’, *kho kho’, ‘bb’ school=pd.Series(1istl, index=1ist2) What will be the output of the following statements? (a) print (school*2) (b) print (school (“tt"7) + ‘chess", “Footbarl cricket) ANS. (A) swimming 2 t 4 stating 6 no kno 8 bo 10 chess 2 footbait 4 cricket 16 (ott 2 25, HR department of ABCTech ha is and bonus paid to their caine created following DataFrame to store data about a import pandas as pd import numpy as np di={*EName’:[ “Kavita’, ‘Sudha’, ‘Garima’], ‘Sal’ :[50000,60000,55000]. “Bonus* :[3000,4000,5000]1 Oflepd.DataFrame(d1) Write Python statement using suitable functions for the following tasks: (a) Display the details of employee Kavita. (b) Add a new column named ‘Email’ with the value “abc@gmail.com”. Ans, (a) Df1. locLOF1. EName=*Kavita’] (b) DFIE* Email "}= *abo@gmait com’ Section C 26. Consider the following table BOOK. (31 Table: 800K a boot Dove _ D004 0008 Give the output of the following SQL commands on the basis of the above table BOOK. (i) SELECT LEFT(Publication,1) FROM BOOK WHERE Price>260: (i) SELECT LCASE(Author ) FROM BOOK : (ii) SELECT SUBSTR (Title, 2, 3) FRO BOOK WHERE Code = “0002"; Ans. ( di) ¢ ‘swatirana 27, Write a Python code to create a DataFrame with appropriate column headings from the list given below: fa [[P01,'Sachin Tendulkar’ 'India’],(P02,'Brian Lara’,West Indies'],[P03,"Wasim Akram! " Pakistan’) [P04,Adam Gilchrist, ‘Australia'] >| Ans, import pandas as pd data = I"P1D":["PO1", “PO2", “PO: “Pname": (“Sachin Tendulkar”, fountry”: [“India”, “West Indie GF = pd.DataFrame(data) print(df) “pod"], ‘ rian Lara”, “Wasim Akram”, “Adam Gilchri “Pakistan”, “Australia"]I 28. Pushp, a student of Class XII, has been assigned a code to create a pandas Series ‘S1’,,, shown below. a a 100 b 200 @ 300 : d 400 e 500 dtype: inté4 Help him to write the Python statements for the following. () To extract the value with the index 'c’, (ii) Display the series by adding 10 in each value. (ii) Delete the value against index ‘a’. Ans, (i) print(S1 ['c}) (i) priny’st+10) (ii) $1=81.dropt'd)] 29. Sumit has to prepare a Project on “Swachh Bharat Shreshth Bharat", He decides to get information from the Internet. He downloads three web pages (webpaget, webpage2, ‘webpage3) containing information on the given topic. 1. He reads a paragraph from webpage! and rephrased it in his own words.He finally pasted the rephrased paragraph in his project, 2. He downloaded three ima these images. 3. He also downloaded an icon from webp. project report. Now, answer the following questions based on above reading, i (@ Step 1 an example of... Gi) Step 3 an act of cones (iii) The process of getting web pages, images and files froma we is called Ans. (i) Paraphrasing (ii) Copyright infringement (ii) Downloading es from webpage2. He made a collage for his project using ages and pasted it on the front page of his ‘eb server to local computer Or What is cyber stalking? Is cyber stalking a crime? How cyber stalking messages are different from ordinary spam? Ans. Yes, Cyber stalking is a crime in which the attacker harasses a victim Using electronic communi E-mail or Instant Messaging (IM), or messages posted toa website ora discussion group massages difer rom ordinary spam in that a eyber stalker targets a specific victim with often threatening messages. 30. Consider the given table Order. a Table: Order 15/10/2008 49/01/2008 5 17/07/2008 6 16/06/2008 Write the SQL statements for the following based on above table Order. (i Display the maximum and minimum orders placed for each city. (i) Find the average of Payments received by Cloc Jaipur. (iii) List all orders given between 01/01/2008 to 12/10/2008. ‘Ans. (i) SELECT Cloc, MAX(Orders), MINCOrders) FROM Order GROUP BY Cloc: (i) SELECT AVG(Payments) FROM Order WHERE Cloc="Jai pur’: (ii) SELECT * FROM Order WHERE -Orderdate>’01/01/2008" and Orderdate<* 12/10/2008"; Or Which type of MySQL function accepts only numeric values? What is the use of such functions? Give the name of some functions of that type. ‘Ans, Mathematical functions accept only numeric values and return the value of same type. These functions are Used to perform mathematical operations on the database data, Some mathematical functions are : POWER(), ROUND(), TRUNCATED). Section D 31. Carefully, observe the following table named ‘Stock’. Table: Stock (5) 4 ‘Switch Monitor Printer Write SQL queries for the following () To display the records in decreasing order of Price. (ii) To display Category and category wise total Quantities of products. (iii) To display the Category and its average Price. (iv) To display Category and category wise highest Price of the products. (v) To display product names of the items with price below 200 and quantity less than 5. Ans. (i) SELECT * FROM Stock ORDER BY Price DESC; . (ii) SELECT Category, SUM(Qty) FROM Stock GROUP BY Category: (ii) SELECT Category, AVG(Price) FROM Stock GROUP BY Category; (iv) SELECT Category, MAX(Price) FROM Stock GROUP BY Category: (v) SELECT Plame FROM Stock WHERE Price<2000 and Oty<5; Or Briefly explain the purpose of the following SQL functions. () POWERO (i) MOD) (ii) Now() (iv) MONTH) (v) LENGTH(), ‘Ans. ()) POWER() function returns the value ofa number raised tothe power of another number. (i) MOD() funetion returns the remainder of a number dividing by another number. NOW() function returns the system date and time. (v) MONTH() function extracts the month part of a date. (¥) LENGTH) function returns the length of a string valve. 32. ‘Anutulya Creations"-A start-up fashion house has set up its main centre at Kanpur, Uttar Pradesh for its dress designing, production and dress supplying activities. It has 4 blocks of buildings: (61 eS own) BLOCK, - (Design) BLOCK Distance between the various blocks: AD AtoP 50m Number of computers in each block: “Bock A Boek Ss Based on the above specifications, answer the following questions. {) Out of LAN, WAN and MAN, what type of network will be formed, , if we interconnect different computers of the campus? Justify. A (ii) Suggest the topology, which should be used to efficiently connect various blocks of buildings within Kanpur centre for fast communication. Also, draw the cable layout for the same. (ii) Suggest the placement of the following device with justification. (a) Repeater (b) Switch/Hub (iv) Now-a-days, video-conferencing software is being used frequently by the company to discuss the product details with the clients. Name any one video conferencing software. Also, mention the protocol which is used internally in video conferencing software. {v) Suggest the suitable place (BLOCK) to house the server, with a suitable reason. ‘Ans, (i) ALAN network is formed. LAN or Local Area Network is a network of systems spread in a small area that spans for 500 m to tkm approx. Here, the distance between the offices are maximum 150 m. (ii) Star topology should be used. Cable layout ‘eon ‘LOCK, (ii) (@) Repeater A to S and P to D. Since, the distances between the blocks are 110 m and 150m respectively, a repeater wil be required to amplify the signals. 5 (b) Switeh/Hub It will be required in al the buildings to connect multiple computers present in them. (iv) Video conferencing softwares Zoom, Google Meet, MS Teams. Protocol VoIP (Voice over Internet Protoco)) (v) The most suitable place (i.e. BLOCK) to house the server is BLOCK D, because it has maximum number of computers, 33. Write a Pandas program to sort the DataFrame first by Name in descending order, then by ‘Score’ in ascending order. (5) Sample DataFrame : exam_data=(‘Name’:[ ‘Abhi, ‘Chirag’, ‘Tarun’ Anjali*,‘Mahi". ‘Tushar’. “Shubham’, ‘Harsh’. ‘Vanshika’ Kartik’ J, “Score’:(12.5,9.16.8.np.NaN,9.20,14.5,np.Nali,8,191, ‘attempts’ :[1,3.2.3.2.3.1.1,2.1], “qual ify’ :[*Yes", "No", “Yes”, ‘No’, ‘No’, *Yes", “Yes", No”, “No”. "Yes’]} Vabelsef'a’.*b’, tc" cd" te F769 WA ST Ans. import pandas as pd yf import numpy as np examdata = |‘Name’: (*ADMI", “Chirag’, ‘Tay Anjali", ‘Mani*, ‘Tushar’, fubhan’, ‘Harsh’, *Score’: (12.5, 9. 16.5. mp.NaN, 9.20) 94.5, np.Naw, 8, 197, ‘attenpts’: (1. 3. 2.3. 2, 3, Liam, ‘qualify’: [*Yes’» ‘No’, “Yes’, “NO"G'No*,*Yes", ‘Yes’, ‘No’, ‘No’, ‘Yes’]! anshika’, ‘Kartik’ ]. Ans, Jabels = C722, tbe teh aiid! a. Oh, Bin! a df = pd.DataFrame(exam_data , index=labels) print(*Orginal rows:") print(dt) result=df.sort_values(by=(‘Name’, *Score'], ascending=[False, True]) Print(“Sort the DataFrame first by ‘Name’ in descending order, then by ‘Score’ in ascending order. print(resuit) Or Python provides the facility to draw multiple bar charts in same plot. Shrey used this feature and made multiple bar charts in same plot but by mistake the code of graph has deleted. Now help him to write the code of given graph. Multiple Bar Chart import numpy as np import matplotlib.pyplot as pit groups = § boys = (45,23,62,16,33) girls = (55,18,31,46,29) Fig, ax = plt.subplots() index = np.arange(groups) bar_width = 0.35 opacity = 0.8 rectsl = plt.bar(index, boys, bar_width, alpha-opacity, color="Red", Vabel=“Boys*) rects2 = plt.bar(index + bar_width, girls, bar_wtdth, alpha-opacity, color=*Blue* Tabel='Giris") pIt.xlabel ("Person") PIt.ylabel( Scores") plt.title("Multiple Bar chart’) pre Aelcks (ind eaeesbtmew itt, (cr Meat 63:, gas,

You might also like