35. Tech-Innovate Pvt Ltd is a leading technology solutions provider renowned for delivering innovative digital services to clients worldwide. The company operates from a spacious campus comprising four blocks: Block A, Block B, Block C, and Block D.
|
Tech-Innovate Pvt Ltd
|
|
Block A
|
Block B
|
|
Block C
|
Block D
|
To ensure smooth communication, centralized data storage, and high-speed connectivity across the campus, the organization plans to set up a structured network connecting all blocks.
The following tables provide the distances between the blocks and the number of computers in each block.
| From To | Distance (meters) |
| Block A to Block B | 40 meters |
| Block A to Block C | 50 meters |
| Block A to Block D | 160 meters |
| Block B to Block C | 70 meters |
| Block B to Block D | 60 meters |
| Block C to Block D | 120 kilometers |
The number of computers in each department/office is as follows:
| Block | Number of Computers |
| Block A | 25 |
| Block B | 60 |
| Block C | 15 |
| Block D | 150 |
As a network engineer, answer the following questions based on the details given above:
I. Suggest the most suitable block to install the server. Justify your answer.
Ans: Block D. It is the most suitable because it has the maximum number of computers (150).
II. What type of network (PAN, LAN, MAN, or WAN) will be formed within the campus?
Ans: LAN (Local Area Network). The distance is within a single campus/limited area.
III. Suggest the placement of a Switch with suitable justification.
Ans: Switch: Every block (A, B, C, D) should have a switch to connect multiple computers within that block.
IV. The company wants to host a website where clients can log in and see real-time project updates. Should they develop a Static or a Dynamic website? Why?
Ans: Dynamic Website. Since it involves user logins and real-time data updates from a database, a dynamic site is required.
V. Identify between which blocks a repeater is needed and justify your answer.
Ans: Between Block A and Block D, & Block C and Block D, because Repeaters are needed as distance exceeds ~100m for Ethernet.
36. I. Create a DataFrame named StoreDF as shown below using dictionary of series:
| | Items | Qualtity | Unit_Price |
|---|
| 0 | Bread | 50 | 30 |
| 1 | Milk | 100 | 25 |
| 2 | Eggs | 120 | 6 |
Write suitable Pandas statements to Perform the following operations:
Ans:
import pandas as pd
Items = pd.Series(['Bread', 'Milk', 'Eggs'])
Quality = pd.Series([50, 100, 120])
Unit_Price = pd.Series([30, 25, 6])
StoreDF = pd.DataFrame({
'Items': Items,
'Qualtity': Quality,
'Unit_Price': Unit_Price
})
print(StoreDF)
II. Add a new row containing data [Butter, 40, 55]
Ans: StoreDF.loc[3] = ['Butter', 40, 55]
III. Display values of Items column only,
Ans: print(StoreDF['Items'])
37. (A) Refer to the table given below:
Table: BOOK
| BookID | Title | Author | Price |
|---|
| 201 | Wings of Fire | A P J Abdul Kalam | 350 |
| 202 | The Guide | R. K. Narayan | 299 |
| 203 | The God of Small Things | Arundhati Roy | 399 |
| 204 | Malgudi Days | R. K. Narayan | 280 |
Write SQL commands for the following tasks:
I. Insert a new record into the table with the values: 205, The White Tiger, Aravind Adiga, 350.
Ans: INSERT INTO BOOK VALUES (205, 'The White Tiger', 'Aravind Adiga', 350);
II. Update the Price of the book with BookID 202 to 325.
Ans: UPDATE BOOK SET Price = 325 WHERE BookID = 202;
III. Delete the records of all books written by 'R. K. Narayan'.
Ans: DELETE FROM BOOK WHERE Author = 'R. K. Narayan';
IV. Add a new column Publisher of type VARCHAR(30) to the table.
Ans: ALTER TABLE BOOK ADD Publisher VARCHAR(30);
V. Drop the table BOOK from the database.
Ans: DROP TABLE BOOK;
OR
(B) Consider a table named PRODUCT, which contains the following columns: PCode, PName, Category, Qty, Price, ExpiryDate.
The columns are described as follows:
PCode – A unique code assigned to each product.
PName – The name of the product.
Category – The category or type of the product.
Qty – The available quantity of the product.
Price – The unit price of the product.
ExpiryDate – The expiration date of the product.
Write SQL queries for:
I. Display PName and its Price rounded to one decimal place.
Ans: SELECT PName, ROUND(Price, 1) FROM PRODUCT;
II. Display the names of products that end with the letter 's'.
Ans: SELECT PName FROM PRODUCT WHERE RIGHT(PName,1) = 's';
III. Display the PName and Category of those products whose Price is less than or equal to 500.
Ans: SELECT PName, Category FROM PRODUCT WHERE Price <= 500;
IV. Display the total quantity of all products.
Ans: SELECT SUM(Qty) FROM PRODUCT;
V. Display PName after removing leading spaces only.