(a) Always remember that the individual perusing your mail or posting is, for sure, an individual, with emotions that can be harmed.
(b) Adhere to the same requirements of behaviour online which we follow in actual lifestyles.
(c) Know where you are in cyberspace.
(d) Respect’s other people s’ time and bandwidth.
(e) Always careful while posting something online i.e. spellings and grammar.
(f) Share expert knowledge.
(g) Respect other people’s privacy.
Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.
Table: DEPT
| DCODE | DEPARTMENT | CITY |
| D01 | MEDIA | DELHI |
| D02 | MARKETING | DELHI |
| D03 | INFRASTRUCTURE | MUMBAI |
| D05 | FINANCE | KOLKATA |
| D04 | HUMAN RESOURCE | MUMBAI |
Table: WORKER
| WNO | NAME | DOJ | DOB | GENDER | DCODE |
| 1001 | George K | 2013-09-02 | 1991-09-01 | MALE | D01 |
| 1002 | Ryma Sen | 2012-12-11 | 1990-12-15 | FEMALE | D03 |
| 1003 | Mohitesh | 2013-02-03 | 1987-09-04 | MALE | D05 |
| 1007 | Anil Jha | 2014-01-17 | 1984-10-19 | MALE | D04 |
| 1004 | Manila Sahai | 2012-12-09 | 1986-11-14 | FEMALE | D01 |
| 1005 | R SAHAY | 2013-11-18 | 1987-03-31 | MALE | D02 |
| 1006 | Jaya Priya | 2014-06-09 | 1985-06-23 | FEMALE | D05 |
Note: DOJ refers to date of joining and DOB refers to date of Birth of workers.
(i) To display Wno, Name, Gender from the table WORKER in descending order of Wno.
(ii) To display the Name of all the FEMALE workers from the table WORKER.
(iii) To display the Wno and Name of those workers from the table WORKER who are born between ‘1987-01-01’ and ‘1991-12-01’.
(iv) To count and display MALE workers who have joined after ‘1986-01-01’.
(v) SELECT COUNT(*), DCODE FROM WORKER GROUP BY DCODE HAVING COUNT(*)>1;
(vi) SELECT DISTINCT DEPARTMENT FROM DEPT;
(vii) SELECT NAME, DEPARTMENT, CITY FROM WORKER W,DEPT D WHERE W.DCODE=D.DCODE AND WNO<1003;
(viii) SELECT MAX(DOJ), MIN(DOB) FROM WORKER;
| Country | Expenditure | GrowthRate | UpdataDate | GDP_Growth_rate | |
| 0 | Australia | 1287600000 | 25.00 | 2016-07 | 21.0 |
| 1 | United States | 989300000 | 24.56 | 2016-09 | 19.6 |
(i) Create the above file in Excel and write the command to create the data frame.
(ii) To print the dataframe.
(iii) To set the index to the column country in the above data frame.
(iv) To add the new data frame in previous question data frame also sort the result.
(v) To change the first row date to 2016-01 for UpdateDate column.
Pawan is confused in understanding Dictionary concept. Help him to understand the concept by choosing the appropriate answer.
(a) Which statement will display Not Available?
(i) Statement 9 (ii) Statement 10
(iii) Statement 11 (iv) Statement 13
(b) Choose the key from Dictionary.
(i) ADMNO (ii) ‘admno ’
(iii) 101 (iv) “Not Available ”
(c) Which statement will display None?
(i) Statement 9 (ii) Statement 10
(iii) Statement 11 (iv) Statement 13
(d) Which Statement will display Tejas?
(i) Statement 8 (ii) Statement 9
(iii) Statement 10 (iv) Statement 11
(e) Choose the identifier.
(i) ADMNO (ii) ‘admno ’
(iii) setdefault (iv) Not Available
| Ecode | Name | Age | Fav_Color | Salary |
| 101 | Rohit | 20 | Blue | 45000 |
| 102 | Mohanti | 24 | Red | 36000 |
| 103 | Tushar Koul | 23 | Green | 42000 |
| 104 | Rupali | 22 | Yellow | 38000 |
| 105 | Gurpreet | 21 | Pink | 40000 |
(a) Select the command from the given options that will give the following output:-
(i) print(emp.max)
(ii) print(emp.max(axis=1))
(iii) print(emp.max,axis=1)
(iv) print(emp.max())
(b) A manager wants to know the Favourite colour of the employee with the employee code 103. Help him to identify the correct set of statements from the given options:
(i) df1=emp[emp[‘Ecode’]==103]
print(df1)
(ii) df1=emp['Ecode'==103]
print(df1)
(iii) df1=emp[emp.Ecode=103]
print(df1)
(iv) df1=emp[emp.Ecode==103]
print(df1)
(c) Which of the following statement will give the names of the employees whose salary is more than 40000.
(i) print(emp.max())
(ii) print(emp[emp["Salary"]>40000])
(iii) print(emp["Salary"]>40000)
(iv) print(emp.max()>40000)
(d) Which of the following command will list only the columns Ename and Salary using loc:
(i) print(emp.loc[:,[0,2]]
(ii) print(emp.loc[:,["Ename","Salary"]])
(iii) print(emp.loc(:["Ename","Salary"]))
(iv) print(emp.loc[["Ename","Salary"]])
(e) Mr. Singh, the manager wants to add a new column, the Rank with the values ‘IV’, ‘II’, ‘III’, ‘IV’, ‘I’, to the data frame Help him to identify the right command from the followings to do so :
(i) emp.column=[‘IV’, ‘II’, ‘III’, ‘IV’, ‘I’ ]
(ii) emp.iloc["Rank"] =[‘IV’, ‘II’, ‘III’, ‘IV’, ‘I’]
(iii) emp["Rank"] =[‘IV’, ‘II’, ‘III’, ‘IV’, ‘I’ ]
(iv) None of the above
Consider the table "Grocer "and write SQL queries for the tasks that follow:
Table: Charity
| Item_Id | ItemName | UnitPrice | Quantity (kg) | Date_Purchase |
| 1 | Rice | 52.50 | 80 | 2010-02-01 |
| 2 | Wheat | 25.40 | 50 | 2010-03-09 |
| 3 | Corn | 50.80 | 100 | 2010-03-11 |
| 4 | Semolina | 28.90 | 50 | 2010-01-15 |
(Unit Price is per kg. price)
(i) Display Item name, unit price along with Date of purchase for all the Items.
(ii) Display Item name along with Month (in number) when it was purchased for all the items.
(iii) Display Item name along with year in which it was purchased for all the items.
(iv) Display Item Id, Date of Purchase and day name of week (e.g. Monday) on which it was purchased for all the items.
(v) Display names of all the items that were purchased on Mondays or Tuesdays.
(vi) Display the day name of the week on which Rice was purchased.
(vii) Display the Item name and unit price truncated to integer value (no decimal digits) of all the items.
(viii) Display current date.
(a) Search engines are:
(i)Software systems that are designed to search for information on the world wide web
(ii)Used to search documents.
(iii)Used to search videos.
(iv)All of the above
(b) We get a list of sites after typing a word in search bar called:
(i)Single word(ii)Key phrase
(iii)Site(iv)All of the above
(c) The search results are shown in a line of results. This is called:
(i)Search engine pages
(ii)Categories
(iii)Search engine result pages
(iv)Tag list
(d) Search engines are able to search _____ type of information.
(i)Videos(ii)Images
(iii)Documents(iv)All of the above
(e) Web search engines store information about web pages with the help of:
(i)Web router(ii)Web crawler
(iii)Web indexer(iv)Web organizer
(i) To print the maximum salary of the Total Salary column.
(ii) To print the data in ascending order of Total Salary.
(iii) To print the data in descending order of Total Salary.
(iv) To print 'sum','mean','max','min','count','median','var'fro the columns 'SALARY','tax','Total Salary'.
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;