Answer
(b) stud.dat
(d) file.seek(pos)
(e) pickle.dump(st,file)
(f) (iii) pickle.dump(LST,FILE)
Need a full question paper?
Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.
Explore more
Similar questions
Table: FURNITURE
| NO | ITEMNAME | TYPE | DATEOFSTOCK | PRICE | DISCOUNT |
| 1 | White lotus | Double Bed | 23/02/2002 | 30000 | 25 |
| 2 | Pink feather | Baby cot | 20/01/2002 | 7000 | 20 |
| 3 | Dolphin | Baby cot | 19/02/2002 | 9500 | 20 |
| 4 | Decent | Office Table | 01/01/2002 | 25000 | 30 |
| 5 | Comfort zone | Double Bed | 12/01/2002 | 25000 | 25 |
| 6 | Donald | Baby cot | 24/02/2002 | 6500 | 15 |
| 7 | Royal Finish | Office Table | 20/02/2002 | 18000 | 30 |
| 8 | Royal tiger | Sofa | 22/02/2002 | 31000 | 30 |
| 9 | Econo sitting | Sofa | 13/12/2001 | 9500 | 25 |
| 10 | Eating Paradise | Dining Table | 19/02/2002 | 11500 | 25 |
Table: ARRIVALS
| NO | ITEMNAME | TYPE | DATEOFSTOCK | PRICE | DISCOUNT |
| 1 | Wood Comfort | Double Bed | 23/03/2003 | 25000 | 25 |
| 2 | Old Fox | Sofa | 20/02/2003 | 17000 | 20 |
| 3 | Micky | Baby cot | 21/02/2003 | 7500 | 15 |
(a) To show all information about the Baby cots from the FURNITURE table.
(b) To list the ITEMNAME which are priced at more than 15000 from the FURNITURE table.
(c) To list ITEMNAME and TYPE of those items, in which date of stock is before 22/01/2002 from the FURNITURE table in descending order of ITEMNAME.
(d) To display ITEMNAME and DATEOFSTOCK of those items, in which the discount t percentage is more than 25 from FURNITURE table.
(e) To count the number of items, whose TYPE is “Sofa” from FURNITURE table.
(f) To insert a new row in the ARRIVALS table with the following data:
14,“Valvet touch”, “Double bed”, {25/03/03}, 25000,30
(g) Give the output of following SQL statement
Note: Outputs of the above mentioned queries should be based on original data given in both the tables i.e., without considering the insertion done in
(f) part of this question.
(i) Select COUNT(distinct TYPE) from FURNITURE;
(ii) Select MAX(DISCOUNT) from FURNITURE, ARRIVALS;
(iii) Select AVG(DISCOUNT) from FURNITURE where TYPE=”Baby cot”;
(iv) Select SUM(Price) from FURNITURE where DATEOFSTOCK<12/02/02;
The Teacher wrote the following code. Sanya was absent on the day when the topic was taught. Help her to complete the assignment.
Choose the output on the basis of the above code.
(a) Which statement is used to display “HeLLo PyThon ”?
(i) Statement 1 (ii) Statement 12
(iii) Statement 13 (iv) No Statement will display.
(b) Which statement will check for capital letters?
(i) Statement 6 (ii) Statement 7
(iii) Statement 8 (iv) Statement 9
(c) Which statement will convert it into capital letters?
(i) Statement 6 (ii) Statement 7
(iii) Statement 8 (iv) Statement 9
(d) Which is iterative Statement?
(i) Statement 5 (ii) Statement 6
(iii) Statement 8 (iv) There is No iterative Statement.
(e) What will be the output of Python code (Statement 1 to Statement 13)
(i) HeLLo PyThon (ii) No Output
(iii) hEllO pYtHON (iv) Hello Python
(a) He wants to display only 2 columns i.e. PNAME and Company, choose the right comman(d)

(b) He wants the given output, choose the right command:
(c) What will be the output of the given command? print(df.size)
(i) 20 (ii) 4
(iii) 24 (iv) 16
(d) Choose the command which will display the number of rows and columns of the above Dataframe
(i) print(dfshape)
(ii) print(dfshape()
(iii) print(dfrows,dfcolumns)
(iv) print(dfloc[],dfiloc[])
(e) What will be the output of the following command?
print(dfloc[2:4,’PNAME’])
(i)Programming language
(ii)Web server
(iii)Web page
(iv)Browser
(b) What is a web browser?
(i)A program that can display a webpage
(ii)A program used to view HTML documents.
(iii)It enables a user to access the resources of internet.
(iv)All of the above
(c) Dynamic web page _____
(i)is same every time whenever it displays.
(ii)generates on demand by a program or a request from browser.
(iii)both is same every time whenever it displays and generates on demand by a program or a request from browser.
(iv)is different always in a predefined order.
(d) URL stands for _______
(i)unique reference label
(ii)uniform reference label
(iii)uniform resource locator
(iv)unique resource locator
(e) A web cookie is a small piece of data that is _____
(i)sent from a website and stored in user’s web browser while a user is browsing a website
(ii)sent from user and stored in the server while a user is browsing a website
(iii)sent from root server to all servers.
(iv)sent from the root server to another root servers.
“IT Tech ”Company conducts workshops for employees of organizations. The company requires data of workshops that are organize(d) As a database administrator you have decided that:
Name of the Table: WORKSHOP
Attributes of Table ‘Workshop ’are as follows.
| Field | Type | Constraint |
| Workshopld | integer | Primary Key |
| Title | Varchar(50) | |
| DateWorkshop | Date | |
| NumSpeakers | Integer |
Table : WORKSHOP
| WorkshopId | Title | Date Workshop | NumSpeakers |
| 1001 | Robotics | 2020-02-21 | 3 |
| 1002 | AI | 2020-05-24 | 4 |
| 1003 | Humanoids | 2020-07-15 | 3 |
| 1004 | Block Chain | 2020-04-25 | 5 |
| 1005 | Cloud | 2020-03-03 | 4 |
(a) Which attribute can be the primary key.
(i) Title (ii) WorkshopID
(iii) NumSpeaker (iv) DateWorkshop
(b) Which command will display the structure of the table:
(i) Use workshop (ii) Desc
(iii) Desc workshop (iv) Show tables
(c) Command to display all the record in descending order of number of speakers.
(i) Select * from Workshop reverse by NumSpeakers;
(ii) Select * from workshop order by descNumSpeakers;
(iii) Select * from workshop order by NumSpeakersdesc;
(iv) Select * from workshop group by NumSpeakersdesc;
(d) What will be the cardinality and degree of the table: WORKSHOP
(i) Cardinality = 5, Degree =4
(ii) Cardinality = 4, Degree =5
(iii) Cardinality = 6, Degree =4
(iv) Cardinality = 5, Degree =5
(e) Choose the right command which will delete the record of 1004 WorkshopId
(i) Delete * from workshop where workshopid==1004;
(ii) Delete from workshop where workshopid=1004;
(iii) Drop from workshop where workshopid=1004;
(iv) Delete table from workshop where workshopid=1004;
As a network consultant, you have to suggest the best network related solutions for their issues/problems raised in (a) to (d), keeping in mind the distances between various locations and other given parameters.
Shortest distance between various locations:
| VILLAGE 1 to YTOWN | 2 KM |
| VILLAGE 2 to YTOWN | 1.5 KM |
| VILLAGE 3 to YTOWN | 3 KM |
| VILLAGE 1 to VILLAGE 2 | 3.5 KM |
| VILLAGE 1 to VILLAGE 3 | 4.5 KM |
| VILLAGE 2 to VILLAGE 3 | 3.5 KM |
| CITY Head Office to YHUB | 30 KM |
Number of computers installed at various locations are as follows:
| YTOWN | 100 |
| VILLAGE 1 | 10 |
| VILLAGE 2 | 15 |
| VILLAGE 3 | 15 |
| CITY OFFICE | 5 |
Note:
• In Villages, there are community centers, in which one room has been given as training center to this organization to install computers.
• The organization has got financial support from the government and top IT companies.
(a) Suggest the most appropriate location of the SERVER in the YHUB (out of the 4 locations), to get the best and effective connectivity. Justify your answer.
(b) Suggest the best wired medium and draw the cable layout (location to location) to efficiently connect various locations within the YHUB.
(c) Which hardware device will you suggest to connect all the computers within each location of YHUB?
(d) Which service/protocol will be most helpful to conduct live interactions of Experts from Head Office and people at YHUB locations?
| Block | Number of Computers |
| A | 25 |
| B | 50 |
| C | 125 |
| D | 10 |
Shortest distances between various Blocks in meters:
| Block A to Block B | 60m |
| Block B to Block C | 40m |
| Block C to Block A | 30m |
| Block D to Block C | 50m |
(a) Suggest most suitable place to store server of this company.
(i) Block A (ii) Block B
(iii) Block C (iv) Block D
(b) Suggest the topology within the blocks.
(i) Bus (ii) Ring
(iii) Tree (iv) Star
(c) Suggest the placement of the Router in the network.
(i) Block A (ii) Block B
(iii) Block C (iv) Block D
(d) The company wants to design a website for its customers that can be changing the contents as per the responses of customers. What type of website can they design for this purpose?
(i) Static Website (ii) HTML website
(iii) Dynamic Website (iv) Blog
(e) What type of network would be formed if the Raipur office is connected to their New Delhi office?
(i) LAN (ii) PAN
(iii) MAN (iv) WAN
TABLE : CUSTOMERS
| NO | CNAME | ADDRESS |
| 101 | Richa jain | Delhi |
| 101 | Surbhi Sinha | Chennai |
| 103 | Lisa Thomas | Bangalore |
| 104 | Imran Ali | Delhi |
| 105 | Roshan Singh | Chennai |
TABLE : TRANSACTION
| TRNO | CNO | AMOUNT | TYPE | DOT |
| T001 | 101 | 1500 | Credit | 2017-11-23 |
| T002 | 103 | 2000 | Debit | 2017-05-12 |
| T003 | 102 | 3000 | Credit | 2017-06-10 |
| T004 | 103 | 12000 | Credit | 2017-09-12 |
| T004 | 101 | 1000 | Debit | 2017-09-05 |
(a) To display details of all transactions of TYPE Credit from Table TRANSACTION.
(b) To display the CNO and AMOUNT of all transactions done in the month September 2017 from the table TRANSACTION.
(c) To display the last date of transaction (DOT) from the table TRANSACTION for the customer having CNO as 103.
(d) To display all CNO,CNAME and DOT (date of transaction) of those CUSTOMERS from tables CUSTOMERS and TRANSACTION who have done transactions more than or equal to 2000.
(e) Select count(*), avg(amount) from transaction where dot>= ‘2017-06-01’;
(f) Select cno, count(*), max (amount) from transaction group by cno having count(*)> 1;
(g) Select cno, cname from customer where address not in (‘Delhi, ‘Bangalore’);
(h) Select distinct cno from transaction;