Www.iswkoman.com



left266700ISWK Series P-II ISWK Series P-II 5362575-371475SET 100SET 1 Code No.: 083 /2/1 358140030480Candidates must write the code on the title page of the answer book00Candidates must write the code on the title page of the answer bookRoll No: General Instructions:1.This question paper contains two parts A and B. Each part is compulsory.2.Both Part A and Part B have choices.3.Part-A has 2 sections: a.Section – I is short answer questions, to be answered in one word or one line. b.Section – II has two case studies questions. Each case study has 4 case-based sub- parts. An examinee is to attempt any 4 out of the 5 subparts.4.Part - B is Descriptive Paper.5.Part- B has three sections a.Section-I is short answer questions of 2 marks each in which two questions have internal options. b.Section-II is long answer questions of 3 marks each in which two questions have internal options. c.Section-III is very long answer questions of 5 marks each in which one question has question has internal PUTER SCIENCEDate: 03/02/2021 Time: 3 hours Max. Marks: 70Qn No.Part AMarksAllocatedSection-ISelect the most appropriate option out of the options given for each question. Attempt any 15 questions from question no 1 to 21. 1Write the importance of passing file mode while declaring a file object in data file handling.12Consider the tuple in python named DAYS = (“SUN”, “MON”, “TUES”). Identify the invalid statement(s) from the given below statements:a) S = DAYS [1] b) print (DAYS [2]) c) DAYS [0] = “WED” d) LIST = list (DAYS)13Expand and Define: IRC14Mrs. SHOBA wants to open a database named TRAVELS and to see the structure of a table named BOOKING to display all the attributes along with size and key specifications. Write MySQL command(s) to perform the above task.15If the following code is executed, what will be the output of the following code?EPL2021 = {“Man United”:40, “Man City”:37, “Leicester”: 36}EPLLatest = {“Liverpool”:34, “Man City”:38, “Tottenham”:33, “Leicester” : 38 }EPL2021.update(EPLLatest)print (EPL2021)16List one common property of a string and a Tuple. Also write one difference between a List and a Dictionary.17Find the operator which cannot be used with a string in python from the following.a) + b) in c) * d) //18Give the full form of the following: (a) WLL (b) CDMA.19Kevin tries to enter a value under a data column DISCOUNT in a SQL table named SUMMERSALE, it prevents any values more than Rs. 10,000. Do you think which of the following constraint is specified for that column?a) DISCOUNT UNIQUE (<= 10000)b) DISCOUNT DEFAULT (<= 10000)c) DISCOUNT CHECK (DISCOUNT <= 10000)d) DISCOUNT PRIMARY KEY (<=10000)110Declare a dictionary in python named NATO having keys (2009, 1949, 1955, 1982) as keys and (“ALBANIA”, “DENMARK”, “GERMANY”, “SPAIN”) as values.111Differentiate between Internet speed units Bps & bps. 112Write the output of the following python statements:Array = [8, 5, 3, 2, 1, 1]print (Array [-1: -6: -2])113Write equivalent SQL statement for the following:SELECT ICODE, ITEMNAME FROM STOCK WHERE ITEMPRICE BETWEEN 1500 AND 3000;114Identify the invalid keyword(s) in Python from the followinga) True b) none c) Import d) return115Identify the output of the following python statements if there is no error. Otherwise, identify the error(s):Str1 = “Exhibition2021”Str2 = tuple (Str1[4 : 7]) + tuple(Str1[10 : ])Str3 = list (Str2)print (Str3, ‘#’, len(Str3))116Identify the error in the following SQL query which is expected to delete all rows of a table LAB without deleting its structure and write the correct one.DELETE TABLE LAB;117Which of the following is/are not a DDL command?a) COMMIT b) DROP c) INSERT d) ROLLBACK118Identify the Guided and un-Guided Transmission Media out of the following:Satellite, Twisted Pair Cable, Optical Fiber, Infra-Red waves119What is the use of DISTINCT clause in SQL?120Write the output of the following Python expression:print (( 4>5) and (2 != 1) or ( 4<9 ))121Website in-charge Mr. RAKESH of a school is handling downloading / uploading various files on school website. Write the name of the protocol which is being used in the above activity.SHEWTA, a student in RANCHI experienced technical difficulties in her system. She communicated about the problem with her uncle Mr. SATYAN, who is a technical expert who is residing in the city MUMBAI. Write the name of the protocol which makes Mr. SATYAN to troubleshoot the problem remotely.1Section-IIBoth the Case study based questions are compulsory. 22Attempt any 8 sub parts. Each question carries 1/2 mark A CD / DVD Shop named “NEW DIGITAL SHOP” stores various CDs & DVDs of songs / albums / movies and use SQL to maintain its records. As a Database Administrator, you have decided the following:? Name of the database - CDSHOP? Name of the table - LIBRARY? The attributes of LIBRARY are as follows:CDNO – Numeric valuesNAME – character values of size 25QTY – Numeric valuesPRICE – Decimal valuesTableCDNONAMEQTYPRICE10001Indian Patriotic2015010004Hanuman Chalisa158010005Instrumental of Kishore259510003Songs of Diwali1812510006Devotional Krishna Songs147510002Best Birthday Songs17NULL4(a) Write the Degree & Cardinality of the relation LIBRARY, if we add 4 rows and add 2 more columns.(b) Identify the best attribute which may be declared as Primary Key.(c) Insert the following record in the above relation:CDNO = 10009 NAME = “Motivational Songs” Price=70(d) Which of the following command is used to Increase the Price of “Songs of Diwali” by 5%i) UPDATE LIBRARY SET PRICE = PRICE + PRICE + PRICE * 5 / 100 HAVING NAME = “SONGS OF DIWALI”;ii) UPDATE TABLE LIBRARY SET PRICE = PRICE + PRICE + PRICE * 5 / 100 WHERE NAME = “SONGS OF DIWALI”;iii) UPDATE LIBRARY SET PRICE = PRICE + PRICE * 5 / 100 WHERE NAME = “SONGS OF DIWALI”;iv) UPDATE TABLE LIBRARY SET PRICE = PRICE + PRICE + PRICE * 5 / 100 WHOSE NAME = “SONGS OF DIWALI”;(e) Now Database administrator wants to create a view BPRICEABOVE100, which holds the details of all the items with price more than Rs. 100. Which of the following command helps to do the above task:i) CREATE VIEW BPRICEABOVE100 AS (SELECT * FROM LIBRARY WHERE PRICE < 100);ii) CREATE BPRICEABOVE100 AS (SELECT * FROM LIBRARY WHERE PRICE > 100);iii) CREATE VIEW BPRICEABOVE100 WHERE (SELECT * FROM LIBRARY WHERE PRICE < 100);iv) CREATE VIEW BPRICEABOVE100 AS (SELECT * FROM LIBRARY WHERE PRICE > 100);(f) Write an SQL Query to display the difference between maximum quantity and minimum quantity as “Quantity Difference”:(g) Database administrator wants to count the no. of CDs which does not have any price value. Write the query for the same.(h) Write SQL command to display the album details which consists of SONGS anywhere in its name?(i) Write SQL command to remove the column QTY from LIBRARY table.(j) Write SQL command to list the Album Name in the descending order of Price.23Attempt any 4 sub parts. Each question carries 1 markMr. Abhisar is making a software on “Countries & their Capitals” in which various records are to be stored / retrieved in CAPITAL.csv data file. It consists some records (Country & Capital). He has written the following code in python. As a programmer, you have to help him to successfully execute the program.import _____________ # Statement 1def AddNewRec(Country, Capital): # Fn. to add a new record in CSV file F = open ('CAPITAL.csv', _________) # Statement 2 FWriter = csv.writer(F) FWriter.writerow([Country, Capital]) F. ________ #Statement 3 def ShowRec(): # Fn. To display all records from CSV file with open(“CAPITAL.csv”, “r”) as NF: NewReader = csv.________(NF) # Statement 4 for rec in NewReader: print (rec[1], “is the capital of ”, rec[0]) NF.close()AddNewRec(“INDIA”, “NEW DELHI”)AddNewRec(“CHINA”, “BEIJING”)ShowRec() # Statement 54Name the module to import in Statement 1.Write the file mode to be passed to add new record in Statement - 2.Fill in the blank in Statement-3 to close the file.Fill in the blank in Statement - 4 to read the data from a csv file.Write the output which will obtain after executing Statement-5.Part – BSection – I24What possible output(s) are expected to be displayed on screen at the time of execution of the program from the following code? Also specify the maximum values that can be assigned to each of the variables BEG and END. import randomHEIGHTS = [10,20,30,40,50]BEG = random.randint(0,2)END =random.randint(2, 4)for X in range (BEG, END): print(HEIGHTS[X],"$") 30$ (ii) 10$20$30$40$50$(iii) 20$ (iv)10$225What do you mean by domain of an attribute in DBMS? Explain with an example.226Mr. Gokul has purchased a new smart TV and wants to cast a video from his mobile to his new smart TV. Identify the type of network he is using and explain it.Write expansion of the following: i) GPRS ii) VoIP227Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code. Y = integer(input(“Enter 51 to 100: ”))if Y == 100for Y IN range(51, 101): print(Y)Else: for K in range (3, 0, -1): print(Thank You)228Differentiate between SMTP & POP3.ORList any two security measures to ensure network security.229Differentiate between fetchone() and fetchmany() methods with suitable examples.230Find and write the output of the following Python code:def Convert(OldMsg): L = len(OldMsg) NewMsg = “” for J in range(0, L): if OldMsg[J].isupper(): NewMsg = NewMsg + OldMsg[J].lower() elif OldMsg[J].islower(): NewMsg = NewMsg + OldMsg[J].upper() elif OldMsg[J].isdigit(): NewMsg = NewMsg + “%” else: NewMsg = NewMsg + "*" return NewMsgStr1 = “wOrLdcUp2021@InDia”StrRes = Convert(Str1)print(“Result String = ”, StrRes)231What is the meaning of return value of a function? Give an example to illustrate its meaning.ORDifferentiate between positional and default arguments with the help of an example.232Write the output of the following python statements:a) print( 2 + 3 * 4 // 2 – 4)b) print( 10 % 3 – 10 // 3)233What is the difference between CHAR & VARCHAR data types in SQL? Give an example for each.2Section – II34Write the outputs of the SQL queries (i) to (vi) based on the given below tables: TRAINER and COURSETable : TRAINERTIDTNAMECITYHIREDATESALARY101SUNAINAMUMBAI2000-10-1590000102ANAMIKADELHI1996-12-2480000103DEEPTICHANDIGARG2003-12-2182000104MEENAKSHIDELHI2004-12-2578000105RICHAMUMBAI1998-01-1295000106MANIPRABHACHENNAI2003-12-1268000Table : COURSECIDCNAMEFEESSTARTDATETIDC201AGDCA120002020-07-12101C202ADCA150002020-07-15103C203DCA100002020-10-01102C204DDTP90002020-09-15104C205DHN200002020-08-01101C206O LEVEL180002020-07-25105SELECT DISTINCT(CITY) FROM TRAINER WHERE SALARY > 80000;SELECT TID, MAX(FEES) FROM COURSE GROUP BY TID HAVING COUNT(*) > 1;SELECT COUNT(TNAME) FROM TRAINER WHERE TNAME LIKE “%H_”;SELECT MAX(HIREDATE), MIN(HIREDATE) FROM TRAINER;SELECT T.TNAME, AME FROM TRAINER T, COURSE C WHERE T.TID = C.TID AND T.FEES < 10000;SELECT T.TNAME, T.TCITY, AME, C.FEES FROM TRAINER T, COURSE C WHERE T.TID = C.TID AND T.SALARY > 80000 AND AME LIKE “%DCA%”;335Write a function in Python PUSH(STACK, SET), where STACK is a list of some numbers forming a stack and SET is a list of some numbers. The function will push all the EVEN elements from the SET into STACK implemented by using a list. Display the stack after push operation.ORWrite a function in Python named POP(STACK) where STACK is a stack implemented by a list of numbers. The function will display the popped element.336Write a function in python named SwapHalfList(Array), which accepts a list array of numbers and swaps the elements of 1st Half of the list with the 2nd Half of the elements of list ONLY if the sum of 1st Half is greater than 2nd Half of the list.Sample Input Data of the listArray = [100, 200, 300, 40, 50, 60]Output Array = [40, 50, 60, 100, 200, 300]If Array = [20,30,50,60,40,50]Output Array = [20,30,50,60,40,50]337Write a method/function COUNTLINES_ET () in python to read lines from a text file REPORT.TXT, and count those lines which are starting either with ‘E’ or starting with ‘T’ respectively. And display the Total count separately. For example, If REPORT.TXT consists of “ENTRY LEVEL OF PROGAMMING CAN BE LEARNED FROM PYTHON. ALSO, IT IS VERY FLEXIBLE LANGUAGE. THIS WILL BE USEFUL FOR VARIETY OF USERS.”Then, output will be:No. of Lines with E: 1No. of Lines with T: 1ORWrite a method / function SHOW_TODO () in python to read contents from a text file ABC.TXT and display those lines which have occurrence of the word “TO” or “DO”.For Example: If the content of the file is:“THIS IS IMPORTANT TO NOTE THAT SUUCESS IS THE RESULT OF HARD WORK. WE ALL ARE EXPECTED TO DO HARD WORK. AFTER ALL EXPERIENCE COMES FROM HARDWORK.”The method / function should display:THIS IS IMPORTANT TO NOTE THAT SUUCESS IS THE RESULT OF HARD WORK. WE ALL ARE EXPECTED TO DO HARD WORK. 3Section – III38Write the My SQL queries for (i) to (x) based on the given below tables: TRAINER and COURSETable : TRAINERTIDTNAMECITYHIREDATESALARY101SUNAINAMUMBAI2000-10-1590000102ANAMIKADELHI1996-12-2480000103DEEPTICHANDIGARGNULL82000104MEENAKSHIDELHI2004-12-2578000105RICHAMUMBAI1998-01-1295000106MANIPRABHACHENNAI2003-12-1268000Table : COURSECIDCNAMEFEESSTARTDATETIDC201AGDCA120002020-07-12101C202ADCA150002020-07-15103C203DCA100002020-10-01102C204DDTP90002020-09-15104C205DHN200002020-08-01101C206O LEVEL180002020-07-25105Display all details of Trainers who are living in city CHENNAI.Display the Trainer Name and Salary in descending order of their Hiredate.Display the number of Trainers in each city.Display the course details which have Fees more than Rs. 12,000 and course name ends with ‘A’.Display Name and City of the trainer whose Hire Date is not available.Display the details of the courses with course id C202, C204, C205.Display the City Name and Average salary of each city in which Average salary is more than Rs. 80,000Display the details of courses other than “DCA” in its course name.Display the Trainer Name & Course Name from both the tables where Course Fees is less than Rs. 10,000.Display the Trainer Name, City, Start Date and Fees from both the tables for those trainers with salary is less than Rs. 75,000.539A binary file named “EMP.dat” has some records of the structure [EmpNo, EmpName, Post, Salary].i. Write a user defined function NewEmp() to input the details of a new employee from the user and store it in EMP.dat .ii. Write a user-defined function named SumSalary(Post) that will accept an argument, the post of employee & read the contents of EMP.dat and calculate the SUM of salary of all employees of that Post.ORA binary file “TEST.DAT” has some records of the [TestId, Subject, MaxMarks, ScoredMarks]. Write a function in python named DisplayAvgMarks(Sub) that will accept a subject as an argument and read the contents of TEST.DAT. The function will calculate & display the Average of the ScoredMarks of the passed subject on screen.540“Vidya Daan” an NGO is planning to setup its new campus at Nagpur for its web-based activities. The campus has four (04) UNITS as shown below:229870127000353695144145ADMIN UNIT00ADMIN UNIT24301456985TRAINING UNIT00TRAINING UNIT1058545176530FINANCE UNIT00FINANCE UNIT291592064135RESOURCE UNIT00RESOURCE UNITDistance between above UNITs are given here as under:UNIT - 1UNIT – 2DISTANCE (In meters)ADMINTRAINING65ADMINRESOURCE120ADMINFINANCE100FINANCETRAINING60FINANCERESOURCE40TRAININGRESOURCE50Number of Computers in various units are:UNITNO. OF COMPUTERSADMIN150FINANCE25TRAINING90RESOURCE50Suggest an ideal cable layout for connecting the above UNITs.Suggest the most suitable place (i.e., UNIT) to install the server for the above NGO. Also, provide a suitable reason.Suggest the placement of the Repeater in the UNITs of above network.NGO is planning to connect its Regional Office at Kota, Rajasthan. Which out of the following wired communication, will you suggest for a very high-speed connectivity? (a) Twisted Pair Cable (b) Ethernet Cable (c) Fiber optic cable.Which network device is used to connect the computers in all UNITs?5All the Best ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download