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 program which accepts a sequence of commaseparated numbers from console and generate a list and a tuple which contains every number.
Suppose the following input is supplied to the program:
23,45,67,78,89
Then, the output should be:
['23', '45', '67', '78', '89']
('23', '45', '67', '78', '89')
The program is to be implemented to sub plot
Distances between various buildings:
| Building “RAVI” to Building “JAMUNA” | 120m |
| Building “RAVI” to Building “GANGA” | 50m |
| Building “GANGA” to Building “JAMUNA” | 65m |
| Faridabad Campus to Head Office | 1460km |
Number of computers:
| Building “RAVI” | 25 |
| Building “JAMUNA” | 150 |
| Building “GANGA” | 51 |
| Head Office | 10 |
(a) Suggest the most suitable place (i.e. block) to house the server of this organization. Also give a reason to justify your suggested location.
(b) Suggest a cable layout of connections between the buildings inside the campus.
(c) Suggest the placement of the following devices with justification:
(i) Switch
(ii) Repeater
(d) The organization is planning to provide a high speed link with its head office situated in KOLKATA using a wired connection. Which of the following cable will be most suitable for this job?
(i) Optical Fiber
(ii) Co-axial cable
(iii) Ethernet cable
Table: HOSPITAL
| PNo | Name | Age | Department | DateofAdm | Charges | Sex |
| 1 | Mayank | 65 | Surgery | 23/02/2018 | 600 | M |
| 2 | Babita | 24 | ENT | 01/01/2019 | 400 | F |
| 3 | Kashish | 45 | Orthopaedic | 19/12/2018 | 400 | M |
| 4 | Tarun | 12 | Surgery | 01/10/2018 | 600 | M |
| 5 | Manisha | 36 | ENT | 12/01/2018 | 400 | F |
| 6 | Imran | 16 | ENT | 24/02/2018 | 400 | M |
| 7 | Ankita | NULL | Cardiology | 20/08/2018 | 800 | F |
| 8 | Zoya | 45 | Gynecology | 22/02/2018 | 500 | F |
| 9 | Kush | 19 | Cardiology | 13/01/2019 | 800 | M |
| 10 | Shalini | 31 | Medicine | 19/02/2018 | 300 | F |
Note: PNo is the primary key in the above table.
Write SQL commands for the statements (a) to (g) on the table HOSPITAL.
(a) To display the details of all the patients whose name starts with the alphabet ‘Z’.
(b) To change the age of the patient Kush to 20.
(c) To increase the charges of all the patients by 5%.
(d) To remove the record of the patient whose Name is Tarun.
(e) To add another column DocName(Doctor Name) of the type varchar in the above table.
(f) To display patient detail whose age is missing(null).
(g) To decrease the charges by 5% of all the patients admitted to the ENT department.
Consider the following tables CARHUB and CUSTOMER and answer (a) and (b) parts of this question:
Table: CARHUB
| Vcode | VehicleName | Make | Color | Capacity | Charges |
| 100 | Innova | Toyota | WHITE | 7 | 15 |
| 102 | SX4 | Suzuki | BLUE | 4 | 14 |
| 104 | C Class | Mercedes | RED | 4 | 35 |
| 105 | A-Star | Suzuki | WHITE | 3 | 14 |
| 108 | Indigo | Tata | SILVER | 3 | 12 |
Table: CUSTOMER
| CCode | CName | VCode |
| 1 | Hemant Sahu | 101 |
| 2 | Raj Lal | 108 |
| 3 | Feroza Shah | 105 |
| 4 | Ketan Dhal | 104 |
(a) Write SQL commands for the following statements:
(i) To display the names of all white colored vehicles
(ii) To display name of vehicle, make and capacity of vehicles in ascending order of their sitting capacity
(iii) To display the highest charges at which a vehicle can be hired from CARHUB.
(iv) To display the customer name and the corresponding name of the vehicle hired by them.
(b) Give the output of the following SQL queries:
(i) Select count(distinct make) from cabhub;
(ii) Select max(charges), min(charges) from carhub;
(iii) Select count(*), make from carhub;
(Iv) Select vehiclename from carhub where capacity = 4;