Get the step-by-step solution for this question inside the Vidyadip app.
Get the answer in the appGenerate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.
Write a script to create a list of 10 random integers. Create two more lists –one containing even elements from the original list, and the other containing odd elements from the original list. Use append() method to create first list and concatenation operator to create the second. Then display all the three lists.
Write a program that reads a line and a substring. It should then display the number of the occurrence of the given substring in the line.
Table: DEPT
| DCODE | DEPARTMENT | LOCATION |
| D01 | INFRASTRUCTURE | DELHI |
| D02 | MARKETING | DELHI |
| D03 | MEDIA | MUMBAI |
| D05 | FINANCE | KOLKATA |
| D04 | HUMAN RESOURCE | MUMBAI |
Table: EMPLOYEE
| ENO | 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 employees.
(i) To display Eno, Name, Gender from the table EMPLOYEE in ascending order of Eno.
(ii) To display the Name of all the MALE employees from the table EMPLOYEE.
(iii) To display the Eno and Name of those employees from the table EMPLOYEE who a born between ‘1987‐01‐01 ’and ‘1991‐12‐01 ’.
(iv) To count and display FEMALE employees who have joined after ‘1986‐01‐01 ’.
(v) Select count(*),dcode from employee group by dcode having count(*)>1;
(vi) Select distinct department from dept;
(vii) Select name, department from employee e, dept d where e.dcode=d.dcode and en0 <1003;
(viii) select max(doj), min(dob) from employee;
Shortest distances between various buildings:
| ADMIN to ENGINEERING | 55 m |
| ADMIN to BUSINESS | 90 m |
| ADMIN to MEDIA | 50 m |
| ENGINEERING to BUSINESS | 55 m |
| ENGINEERING to MEDIA | 50 m |
| BUSINESS to MEDIA | 45 m |
| DELHI Head Office to CHENNAICampus | 2175 km |
Number of Computers installed at various buildings are as follows:
| ADMIN | 110 |
| ENGINEERING | 75 |
| BUSINESS | 40 |
| MEDIA | 12 |
| DELHI Head Office | 20 |
(a) Suggest the most appropriate location of the server inside the CHENNAI campus (out of the 4 buildings), to get the best connectivity for maximum no. of computers. Justify your answer.
Which hardware device will you suggest to be procured by the company to be installed to protect and control the internet uses within the campus?
(d) Which of the following will you suggest to establish the online face-to-face communication between the people in the Admin Office of CHENNAI campus and DELHI Head Office?
(a) Cable TV
(b) Email
(c) Video Conferencing
(d) Text Chat
Table: Bank
| AccNo | Cust_name | FD_Amount | Months | Int_Rate | FD_Date |
| 1001 | Arti Gupta | 30000 | 36 | 6.00 | 2018-07-01 |
| 1002 | Dilip Lal | 50000 | 48 | 6.75 | 2018-03-22 |
| 1003 | Navin Gupta | 30000 | 36 | NULL | 2018-03-01 |
| 1004 | D.P. Yadav | 80000 | 60 | 8.25 | 2017-06-12 |
| 1005 | Jyoti Sharma | 20000 | 36 | 6.50 | 2017-01-31 |
| 1006 | Rakesh Kumar | 70000 | 60 | 8.25 | 2018-06-15 |
| 1007 | K.D. Singh | 50000 | 48 | NULL | 2018-07-05 |
| 1008 | Anjali Sharma | 60000 | 48 | 6.75 | 2017-04-02 |
| 1009 | Swati Garg | 40000 | 42 | 6.50 | 2018-06-15 |
| 1010 | Rupinder Kaur | 25000 | 36 | 6.50 | 2018-09-27 |
Write SQL commands for the statements (a) to (g) on the table BANK
(a) To create the table Bank (Primary Key: AccNo)
(b) Display the structure of the table Bank.
(c) Display the details of all the bank.
(d) Display the AccNo, Cust_Name, and FD_Amount.
(e) Display the details of all the FD’s having maturity time is less than 40 months.
(f) Display the AccNo and FD amount which started before 01-04-2018.
(g) Display details of all FD whose rate of interest are NULL.