Class XII Informatics Practices (065): Practice Sample Paper 2025-26
General instructions
- This question paper contains 37 questions in five sections, A to E. All questions are compulsory.
- Section A has 21 questions of 1 mark each (multiple choice, including 2 Assertion-Reason questions).
- Section B has 7 very short answer questions of 2 marks each.
- Section C has 4 short answer questions of 3 marks each.
- Section D has 2 case-based questions of 4 marks each.
- Section E has 3 long answer questions of 5 marks each.
- There is no overall choice. Internal choices are given in some questions; attempt only one of the alternatives in such questions.
- All programming questions are to be answered in Python (pandas and Matplotlib) only. All SQL queries are to be written for MySQL.
Blueprint (unit-wise marks)
| Unit | Marks |
|---|---|
| Unit 1: Data Handling using Pandas and Data Visualization | 25 |
| Unit 2: Database Query using SQL | 25 |
| Unit 3: Introduction to Computer Networks | 10 |
| Unit 4: Societal Impacts | 10 |
| Total | 70 |
Section A
Questions 1 to 21 carry 1 mark each. Questions 20 and 21 are Assertion-Reason questions.
- 1 markPandas & Visualization
Which statement creates a Series with the index ['a', 'b', 'c'] in which every value is 7? (Assume
import pandas as pd.)- pd.Series(7, index=['a', 'b', 'c'])
- pd.Series([7], ['a', 'b', 'c'], 3)
- pd.Series(index=7, data=['a', 'b', 'c'])
- pd.Series('a', 'b', 'c', 7)
Marking scheme(a) pd.Series(7, index=['a', 'b', 'c'])
- 1 markPandas & Visualization
What will be the output of the following code?
Python import pandas as pd s = pd.Series([10, 20, 30, 40]) print(s[s > 15].size)- 2
- 4
- 1
- 3
Marking scheme(d) 3
s > 15 is True for 20, 30 and 40, so the filtered Series has 3 elements.
- 1 markPandas & Visualization
Which attribute of a DataFrame df gives the number of rows and the number of columns?
- df.size
- df.ndim
- df.shape
- df.count
Marking scheme(c) df.shape
- 1 markPandas & Visualization
Which statement deletes the column Fine from the DataFrame df and returns the result?
- df.drop('Fine', axis=0)
- df.remove('Fine')
- df.delete(columns='Fine')
- df.drop(columns='Fine')
Marking scheme(d) df.drop(columns='Fine')
- 1 markPandas & Visualization
Which Matplotlib function draws a histogram?
- plt.bar()
- plt.hist()
- plt.plot()
- plt.histogram()
Marking scheme(b) plt.hist()
- 1 markSQL
What is the output of
SELECT ROUND(476.582, -1);?- 476.6
- 470
- 480
- 476.58
Marking scheme(c) 480
A negative position rounds to the left of the decimal point: to the nearest ten.
- 1 markSQL
What is the output of
SELECT INSTR('INFORMATICS', 'MAT');?- 5
- 6
- 7
- 0
Marking scheme(b) 6
- 1 markSQL
Which function returns the name of the weekday, such as 'Monday', for a given date?
- DAY()
- MONTHNAME()
- DAYNAME()
- DATE()
Marking scheme(c) DAYNAME()
- 1 markSQL
The table EMP has 12 rows. The column Commission is NULL in 5 of them. What will
SELECT COUNT(Commission) FROM EMP;return?- 12
- 5
- 7
- 17
Marking scheme(c) 7
- 1 markSQL
Which clause is used to apply a condition on groups formed by GROUP BY?
- WHERE
- HAVING
- ORDER BY
- DISTINCT
Marking scheme(b) HAVING
- 1 markSQL
If neither ASC nor DESC is written, ORDER BY sorts the rows in:
- ascending order
- descending order
- the order of insertion
- random order
Marking scheme(a) ascending order
- 1 markSQL
What is the output of
SELECT UPPER(LEFT('kolkata', 3));?- kol
- KOL
- ATA
- KOLKATA
Marking scheme(b) KOL
- 1 markSQL
In an equi-join of two tables, rows are matched using which operator on the common column?
- >
- LIKE
- BETWEEN
- =
Marking scheme(d) =
- 1 markNetworks
Which device connects two networks that use different protocols?
- Hub
- Repeater
- Gateway
- Switch
Marking scheme(c) Gateway
- 1 markNetworks
A cable TV network spread across a city is an example of a:
- PAN
- LAN
- MAN
- WAN
Marking scheme(c) MAN
- 1 markNetworks
A small text file that a website stores on the user's computer to remember the user's preferences is called a:
- plug-in
- cookie
- add-on
- web page
Marking scheme(b) cookie
- 1 markSocietal Impacts
The posts, comments and photos that a person knowingly shares online form their:
- passive digital footprint
- active digital footprint
- copyright
- digital licence
Marking scheme(b) active digital footprint
- 1 markSocietal Impacts
Which of the following is an example of Free and Open Source Software (FOSS)?
- Microsoft Windows
- Adobe Photoshop
- LibreOffice
Marking scheme(c) LibreOffice
- 1 markSocietal Impacts
Sending fake emails that look as if they come from a bank, to trick people into revealing their passwords, is called:
- phishing
- plagiarism
- cyber bullying
- e-waste
Marking scheme(a) phishing
- 1 markPandas & Visualization
Assertion (A): For a DataFrame df with row labels R1 to R5,
df.loc['R1':'R3']includes the row R3.Reason (R): In label-based slicing with loc, the end label is included in the result.
- Both A and R are true, and R is the correct explanation of A.
- Both A and R are true, but R is not the correct explanation of A.
- A is true, but R is false.
- A is false, but R is true.
Marking scheme(a) Both A and R are true, and R is the correct explanation of A.
With iloc (positions), the end would be excluded.
- 1 markSQL
Assertion (A):
SELECT AVG(Marks) FROM STUDENT;ignores the rows in which Marks is NULL.Reason (R): COUNT(*) also ignores the rows that contain NULL values.
- Both A and R are true, and R is the correct explanation of A.
- Both A and R are true, but R is not the correct explanation of A.
- A is true, but R is false.
- A is false, but R is true.
Marking scheme(c) A is true, but R is false.
Aggregate functions on a column skip NULLs, but COUNT(*) counts every row.
Section B
Questions 22 to 28 are very short answer questions carrying 2 marks each. Questions 22 and 24 have an internal choice.
- 2 marksPandas & Visualization
Write two differences between a Series and a DataFrame.
Marking schemeAny two (1 mark each):
- A Series is one-dimensional; a DataFrame is two-dimensional (rows and columns).
- A Series holds data of a single type; different columns of a DataFrame can have different types.
- A Series is value-mutable but size-immutable; a DataFrame is both value-mutable and size-mutable (columns and rows can be added or deleted).
- A Series has only a row index; a DataFrame has a row index and column labels.
ORWhat is the use of the head() and tail() functions? Write a statement to display the last 3 rows of a DataFrame df.
Marking schemehead(n)returns the first n rows andtail(n)returns the last n rows; n is 5 by default. (1 mark)print(df.tail(3))(1 mark)
- 2 marksPandas & Visualization
Write the output of the following code:
Python import pandas as pd s1 = pd.Series([5, 10, 15], index=['x', 'y', 'z']) s2 = pd.Series([1, 2, 3], index=['y', 'z', 'w']) print(s1 + s2)Marking schemeLabels are matched; labels present in only one Series give NaN, and the result is sorted by label. ½ mark for each correct line (4 lines); deduct ½ if the dtype line is missing.
Python import pandas as pd s1 = pd.Series([5, 10, 15], index=['x', 'y', 'z']) s2 = pd.Series([1, 2, 3], index=['y', 'z', 'w']) print(s1 + s2)Outputw NaN x NaN y 11.0 z 17.0 dtype: float64
- 2 marksSQL
Differentiate between the WHERE and HAVING clauses with an example of each.
Marking scheme- WHERE applies a condition to individual rows before grouping, e.g.
SELECT * FROM EMPLOYEE WHERE Salary > 600000; - HAVING applies a condition to groups after GROUP BY and can use aggregate functions, e.g.
SELECT Dept, AVG(Salary) FROM EMPLOYEE GROUP BY Dept HAVING COUNT(*) > 1;
1 mark for the difference, ½ mark for each example.
ORDifferentiate between COUNT(*) and COUNT(column_name) with an example.
Marking schemeCOUNT(*)counts all the rows, including those with NULL values.COUNT(column)counts only the rows in which that column is not NULL.- Example: if 3 of 10 students have no Marks,
COUNT(*)gives 10 andCOUNT(Marks)gives 7.
1 mark for the difference, 1 mark for the example.
- WHERE applies a condition to individual rows before grouping, e.g.
- 2 marksSQL
Write the output of the following SQL statements:
SELECT MID('INFORMATICS PRACTICES', 3, 4);SELECT POWER(3, 3) - MOD(17, 5);SELECT MONTHNAME('2025-03-21');SELECT DAY('2025-03-21');
Marking scheme- FORM 2. 25 (27 - 2) 3. March 4. 21
½ mark for each correct output. Verified run:
MySQL SELECT MID('INFORMATICS PRACTICES', 3, 4); SELECT POWER(3, 3) - MOD(17, 5); SELECT MONTHNAME('2025-03-21'); SELECT DAY('2025-03-21');Output+------------------------------------+ | MID('INFORMATICS PRACTICES', 3, 4) | +------------------------------------+ | FORM | +------------------------------------+ 1 row in set +--------------------------+ | POWER(3, 3) - MOD(17, 5) | +--------------------------+ | 25 | +--------------------------+ 1 row in set +-------------------------+ | MONTHNAME('2025-03-21') | +-------------------------+ | March | +-------------------------+ 1 row in set +-------------------+ | DAY('2025-03-21') | +-------------------+ | 21 | +-------------------+ 1 row in set - 2 marksNetworks
Write two differences between a hub and a switch.
Marking schemeAny two (1 mark each):
- A hub sends incoming data to all the devices connected to it; a switch sends data only to the device it is meant for, using MAC addresses.
- A hub creates more unnecessary traffic and collisions; a switch reduces traffic, so the network is faster.
- A hub is a simple (passive/less intelligent) device; a switch is an intelligent device that learns the addresses of connected devices.
- 2 marksSocietal Impacts
What is e-waste? Write two ways in which e-waste can be managed properly.
Marking scheme- E-waste is discarded electronic and electrical equipment, such as old mobile phones, computers, batteries and chargers. (1 mark)
- Any two ways (½ mark each): give it to authorised e-waste collection or recycling centres; return old devices through the manufacturer's take-back scheme; repair, reuse or donate working devices; reduce purchases by upgrading instead of replacing.
- 2 marksSocietal Impacts
What is plagiarism? Write two ways in which students can avoid plagiarism while preparing their IP project.
Marking scheme- Plagiarism is presenting someone else's work, words, ideas or code as one's own without giving them credit. (1 mark)
- Any two ways (½ mark each): cite every source of data, images and code used; write explanations in your own words; use quotation marks for copied text; use only material whose licence allows reuse and acknowledge it.
Section C
Questions 29 to 32 are short answer questions carrying 3 marks each. Question 30 has an internal choice.
- 3 marksPandas & Visualization
A city corporation has the following data about its four zones:
- North: population 245000, area 18.5 sq km
- South: population 310000, area 22.0 sq km
- East: population 128000, area 15.2 sq km
- West: population 196000, area 9.8 sq km
Write a Python program to:
- create a DataFrame from a list of dictionaries holding this data,
- add a column Density (population divided by area, rounded to 1 decimal place), and
- display the zones whose density is more than 14000 persons per sq km.
Marking scheme1 mark for each part.
Python import pandas as pd data = [{"Zone": "North", "Population": 245000, "Area": 18.5}, {"Zone": "South", "Population": 310000, "Area": 22.0}, {"Zone": "East", "Population": 128000, "Area": 15.2}, {"Zone": "West", "Population": 196000, "Area": 9.8}] df = pd.DataFrame(data) df["Density"] = (df["Population"] / df["Area"]).round(1) print(df) print(df[df["Density"] > 14000])OutputZone Population Area Density 0 North 245000 18.5 13243.2 1 South 310000 22.0 14090.9 2 East 128000 15.2 8421.1 3 West 196000 9.8 20000.0 Zone Population Area Density 1 South 310000 22.0 14090.9 3 West 196000 9.8 20000.0 - 3 marksPandas & Visualization
The number of Class XII students who chose each elective is: IP 48, Economics 36, Psychology 22, Fine Arts 15, PE 30. Write Python code to draw a bar chart of this data with the title "Students in Each Elective" and suitable axis labels, and save the chart as electives.png.
Marking scheme½ mark for importing pyplot, ½ mark for the lists, 1 mark for plt.bar(), ½ mark for title and labels, ½ mark for savefig(). The chart shows five teal bars, the tallest for IP (48) and the shortest for Fine Arts (15).
Python import matplotlib.pyplot as plt electives = ["IP", "Economics", "Psychology", "Fine Arts", "PE"] students = [48, 36, 22, 15, 30] plt.bar(electives, students, color="teal") plt.title("Students in Each Elective") plt.xlabel("Elective") plt.ylabel("Number of students") plt.savefig("electives.png") plt.show()ORA canteen sold the following cups of tea and coffee in five weeks: Tea 320, 410, 380, 450, 500 and Coffee 210, 260, 300, 280, 350 (weeks W1 to W5). Write Python code to plot both on one line chart with markers, a title, axis labels and a legend.
Marking scheme½ mark for the import, ½ mark for the data, 1 mark for two plot() calls with labels, ½ mark for title and axis labels, ½ mark for legend(). Two rising lines are drawn; Tea stays above Coffee in every week.
Python import matplotlib.pyplot as plt weeks = ["W1", "W2", "W3", "W4", "W5"] tea = [320, 410, 380, 450, 500] coffee = [210, 260, 300, 280, 350] plt.plot(weeks, tea, marker="o", label="Tea") plt.plot(weeks, coffee, marker="s", label="Coffee") plt.title("Weekly Sales of a Canteen") plt.xlabel("Week") plt.ylabel("Cups sold") plt.legend() plt.show() - 3 marksSQL
Consider the table PRODUCT given below and write the output of the following queries:
SELECT Category, COUNT(*), SUM(Qty) FROM PRODUCT GROUP BY Category;SELECT UPPER(PName), ROUND(Price / 3, 1) FROM PRODUCT WHERE Price > 1000;SELECT PName, MONTHNAME(MfgDate) FROM PRODUCT WHERE YEAR(MfgDate) = 2024;
PCode PName Category Price Qty MfgDate P01 Steel Bottle Kitchen 450 40 2024-11-05 P02 Desk Lamp Electrical 1299 15 2025-01-18 P03 Lunch Box Kitchen 380 55 2024-08-22 P04 Extension Cord Electrical 649 30 2025-03-02 P05 Room Heater Electrical 2450 8 2024-10-14 P06 Pressure Cooker Kitchen 1875 12 2025-02-27 Marking scheme1 mark for each correct output (column headings need not be exact; ½ mark if one row is wrong).
MySQL SELECT Category, COUNT(*), SUM(Qty) FROM PRODUCT GROUP BY Category; SELECT UPPER(PName), ROUND(Price / 3, 1) FROM PRODUCT WHERE Price > 1000; SELECT PName, MONTHNAME(MfgDate) FROM PRODUCT WHERE YEAR(MfgDate) = 2024;Output+------------+----------+----------+ | Category | COUNT(*) | SUM(Qty) | +------------+----------+----------+ | Electrical | 3 | 53 | | Kitchen | 3 | 107 | +------------+----------+----------+ 2 rows in set +-----------------+---------------------+ | UPPER(PName) | ROUND(Price / 3, 1) | +-----------------+---------------------+ | DESK LAMP | 433.0 | | ROOM HEATER | 816.7 | | PRESSURE COOKER | 625.0 | +-----------------+---------------------+ 3 rows in set +--------------+--------------------+ | PName | MONTHNAME(MfgDate) | +--------------+--------------------+ | Steel Bottle | November | | Lunch Box | August | | Room Heater | October | +--------------+--------------------+ 3 rows in set
- 3 marksSocietal Impacts
Tanvi, a Class XI student, keeps receiving insulting messages about her appearance on a social media group, and an embarrassing edited photo of her has been shared there.
- Name the cybercrime she is facing.
- Name the Indian law that deals with cybercrime.
- Write two steps Tanvi should take.
Marking scheme- Cyber bullying (harassing, insulting or humiliating someone using digital platforms). (1 mark)
- The Information Technology Act, 2000 (IT Act). (1 mark)
- Any two (½ mark each): do not reply to the bullies; take screenshots and keep the evidence; report and block the accounts on the platform; tell her parents or teachers; report the matter at the national cybercrime portal (cybercrime.gov.in) or the cyber police.
Section D
Questions 33 and 34 are case-based questions carrying 4 marks each.
- 4 marksPandas & Visualization
The DataFrame lib stores the issue record of a school library (row labels L1 to L5):
Answer the following:
- Write a statement to display the rows of the books issued more than 50 times.
- Write a statement to add a column PerCopy that gives the number of issues per copy (Issued divided by Copies).
- After part 2, what will
print(lib.shape)andprint(lib.iloc[1:3, 2:4])display? - Write a statement to save lib to the file library.csv without the row labels.
Title Genre Issued Copies L1 Ruskin Bond Stories Fiction 64 10 L2 Wings of Fire Biography 48 6 L3 Panchatantra Fiction 72 12 L4 Physics Made Easy Academic 35 8 L5 Gitanjali Poetry 21 4 Marking scheme1 mark for each part (in part 3, ½ mark for each output). The statements run in order give:
Python import pandas as pd lib = pd.DataFrame({"Title": ["Ruskin Bond Stories", "Wings of Fire", "Panchatantra", "Physics Made Easy", "Gitanjali"], "Genre": ["Fiction", "Biography", "Fiction", "Academic", "Poetry"], "Issued": [64, 48, 72, 35, 21], "Copies": [10, 6, 12, 8, 4]}, index=["L1", "L2", "L3", "L4", "L5"]) print(lib[lib["Issued"] > 50]) # (i) lib["PerCopy"] = lib["Issued"] / lib["Copies"] # (ii) print(lib.shape) # (iii) print(lib.iloc[1:3, 2:4]) lib.to_csv("library.csv", index=False) # (iv)OutputTitle Genre Issued Copies L1 Ruskin Bond Stories Fiction 64 10 L3 Panchatantra Fiction 72 12 (5, 5) Issued Copies L2 48 6 L3 72 12 - 4 marksSQL
A hospital stores data in two tables, DOCTOR(DocID, DName, Dept) and APPOINTMENT(AppID, DocID, Patient, Fee, ADate), shown below. Write SQL queries for the following:
- Display the name of each patient with the name of the doctor they consulted.
- Display each department with the total fee collected in it.
- Display the DocID and number of appointments of the doctors who have more than one appointment.
- Display the patient name and date of the appointments in March, in order of date.
Table DOCTOR: 1 Dr. Neha Arora (ENT); 2 Dr. Sameer Khan (Cardiology); 3 Dr. Priya Menon (ENT); 4 Dr. Rakesh Bhalla (Orthopaedics).
AppID DocID Patient Fee ADate 901 2 Kiran Joshi 800 2025-03-04 902 1 Asif Ali 500 2025-02-26 903 2 Meera Pillai 800 2025-03-11 904 4 Tenzin Norbu 650 2025-03-15 905 3 Rupa Sen 500 2025-04-02 906 2 Gopal Rao 800 2025-04-09 907 1 Harsh Vardhan 500 2025-03-21 Marking scheme1 mark for each correct query. Outputs are shown for checking. (Dr. Rakesh Bhalla's department appears in part 2 because he has an appointment; a doctor with none would not appear in an equi-join.)
MySQL SELECT A.Patient, D.DName FROM APPOINTMENT A, DOCTOR D WHERE A.DocID = D.DocID; SELECT D.Dept, SUM(A.Fee) AS TotalFee FROM APPOINTMENT A, DOCTOR D WHERE A.DocID = D.DocID GROUP BY D.Dept; SELECT DocID, COUNT(*) AS Visits FROM APPOINTMENT GROUP BY DocID HAVING COUNT(*) > 1; SELECT Patient, ADate FROM APPOINTMENT WHERE MONTH(ADate) = 3 ORDER BY ADate;Output+---------------+-------------------+ | Patient | DName | +---------------+-------------------+ | Kiran Joshi | Dr. Sameer Khan | | Asif Ali | Dr. Neha Arora | | Meera Pillai | Dr. Sameer Khan | | Tenzin Norbu | Dr. Rakesh Bhalla | | Rupa Sen | Dr. Priya Menon | | Gopal Rao | Dr. Sameer Khan | | Harsh Vardhan | Dr. Neha Arora | +---------------+-------------------+ 7 rows in set +--------------+----------+ | Dept | TotalFee | +--------------+----------+ | Cardiology | 2400 | | ENT | 1500 | | Orthopaedics | 650 | +--------------+----------+ 3 rows in set +-------+--------+ | DocID | Visits | +-------+--------+ | 1 | 2 | | 2 | 3 | +-------+--------+ 2 rows in set +---------------+------------+ | Patient | ADate | +---------------+------------+ | Kiran Joshi | 2025-03-04 | | Meera Pillai | 2025-03-11 | | Tenzin Norbu | 2025-03-15 | | Harsh Vardhan | 2025-03-21 | +---------------+------------+ 4 rows in set
Section E
Questions 35 to 37 are long answer questions carrying 5 marks each. Question 35 has an internal choice.
- 5 marksPandas & Visualization
The sales (in lakh rupees) of six sales representatives in two quarters are:
- S1: Aman, North, Q1 52, Q2 49
- S2: Bela, South, Q1 61, Q2 70
- S3: Chirag, North, Q1 47, Q2 55
- S4: Disha, East, Q1 58, Q2 62
- S5: Eshwar, South, Q1 44, Q2 51
- S6: Farida, East, Q1 66, Q2 59
Write Python statements to:
- create a DataFrame sales with columns Rep, Region, Q1 and Q2 and row labels S1 to S6;
- add a column Total (Q1 + Q2);
- display the Rep and Total of the representatives whose total is more than 115;
- display the region-wise sum of Q1 and Q2;
- display the Rep and Region of rows S2 to S4 using loc.
Marking scheme1 mark for each part. Output of the statements run in order:
Python import pandas as pd sales = pd.DataFrame({"Rep": ["Aman", "Bela", "Chirag", "Disha", "Eshwar", "Farida"], "Region": ["North", "South", "North", "East", "South", "East"], "Q1": [52, 61, 47, 58, 44, 66], "Q2": [49, 70, 55, 62, 51, 59]}, index=["S1", "S2", "S3", "S4", "S5", "S6"]) # (i) sales["Total"] = sales["Q1"] + sales["Q2"] # (ii) print(sales.loc[sales["Total"] > 115, ["Rep", "Total"]]) # (iii) print(sales.groupby("Region")[["Q1", "Q2"]].sum()) # (iv) print(sales.loc["S2":"S4", ["Rep", "Region"]]) # (v)OutputRep Total S2 Bela 131 S4 Disha 120 S6 Farida 125 Q1 Q2 Region East 124 121 North 99 104 South 105 121 Rep Region S2 Bela South S3 Chirag North S4 Disha EastORThe maximum temperatures (in degrees Celsius) of a city for a week are Mon 39.5, Tue 41.2, Wed 42.8, Thu 40.1, Fri 38.7, Sat 43.0 and Sun 41.6. Write Python statements to:
- create a Series temp with the days as the index;
- display the days with temperature above 41;
- display the temperatures of the last three days;
- display all the temperatures in Fahrenheit (F = C x 9 / 5 + 32);
- display the average temperature rounded to one decimal place.
Marking scheme1 mark for each part. Output of the statements run in order:
Python import pandas as pd temp = pd.Series([39.5, 41.2, 42.8, 40.1, 38.7, 43.0, 41.6], index=["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]) # (i) print(temp[temp > 41]) # (ii) print(temp.tail(3)) # (iii) print(temp * 9 / 5 + 32) # (iv) print(round(temp.mean(), 1)) # (v)OutputTue 41.2 Wed 42.8 Sat 43.0 Sun 41.6 dtype: float64 Fri 38.7 Sat 43.0 Sun 41.6 dtype: float64 Mon 103.10 Tue 106.16 Wed 109.04 Thu 104.18 Fri 101.66 Sat 109.40 Sun 106.88 dtype: float64 41.0
- 5 marksSQL
Consider the table EMPLOYEE given below (Salary is the yearly salary in rupees). Write SQL queries for the following:
- Display, in capital letters, the names of the employees who joined in 2023.
- Display each department and its average salary, only for departments having more than one employee.
- Display the name of each employee and the first three letters of their city.
- Display the name and monthly salary (Salary / 12) of each employee, rounded to 2 decimal places.
- Display the name and the weekday of joining of the IT employees, in order of date of joining.
EmpID Name Dept Salary DOJ City 1 Ankit Saxena IT 720000 2022-07-11 Noida 2 Bina Thapa HR 540000 2023-02-01 Dehradun 3 Cyril D'Souza IT 860000 2021-09-15 Mangaluru 4 Divya Kulkarni Finance 610000 2023-08-21 Nashik 5 Ejaz Ahmed IT 655000 2023-11-06 Srinagar 6 Fiona Lobo HR 498000 2024-01-15 Panaji Marking scheme1 mark for each correct query. Outputs are shown for checking.
MySQL SELECT UPPER(Name) FROM EMPLOYEE WHERE YEAR(DOJ) = 2023; SELECT Dept, AVG(Salary) FROM EMPLOYEE GROUP BY Dept HAVING COUNT(*) > 1; SELECT Name, LEFT(City, 3) FROM EMPLOYEE; SELECT Name, ROUND(Salary / 12, 2) AS Monthly FROM EMPLOYEE; SELECT Name, DAYNAME(DOJ) FROM EMPLOYEE WHERE Dept = 'IT' ORDER BY DOJ;Output+----------------+ | UPPER(Name) | +----------------+ | BINA THAPA | | DIVYA KULKARNI | | EJAZ AHMED | +----------------+ 3 rows in set +------+-------------+ | Dept | AVG(Salary) | +------+-------------+ | HR | 519000.0000 | | IT | 745000.0000 | +------+-------------+ 2 rows in set +----------------+---------------+ | Name | LEFT(City, 3) | +----------------+---------------+ | Ankit Saxena | Noi | | Bina Thapa | Deh | | Cyril D'Souza | Man | | Divya Kulkarni | Nas | | Ejaz Ahmed | Sri | | Fiona Lobo | Pan | +----------------+---------------+ 6 rows in set +----------------+----------+ | Name | Monthly | +----------------+----------+ | Ankit Saxena | 60000.00 | | Bina Thapa | 45000.00 | | Cyril D'Souza | 71666.67 | | Divya Kulkarni | 50833.33 | | Ejaz Ahmed | 54583.33 | | Fiona Lobo | 41500.00 | +----------------+----------+ 6 rows in set +---------------+--------------+ | Name | DAYNAME(DOJ) | +---------------+--------------+ | Cyril D'Souza | Wednesday | | Ankit Saxena | Monday | | Ejaz Ahmed | Monday | +---------------+--------------+ 3 rows in set
- 5 marksNetworks
Gyan Path Vidyalaya in Dehradun is setting up a computer network in its campus, which has four blocks: Admin, Senior, Junior and Lab. The number of computers in each block is: Admin 25, Senior 60, Junior 40 and Lab 110. The distances between the blocks are given in the table.
- Suggest the most suitable block to place the server, with a reason.
- Suggest the best cable layout (topology) to connect the blocks, and describe it.
- Where should repeaters be placed in your layout? Why?
- Which device should be used to connect all the computers inside each block?
- The school wants to link this campus network with its head office in Mumbai. What type of network will this form?
From To Distance (m) Admin Senior 90 Admin Junior 140 Admin Lab 70 Senior Junior 60 Senior Lab 120 Junior Lab 150 Marking scheme- Lab, because it has the largest number of computers (110), so most traffic stays within the block (80-20 rule). (1 mark)
- A star layout with the Lab block at the centre: separate cables from Lab to Admin (70 m), Lab to Senior (120 m) and Lab to Junior (150 m). (1 mark; ½ mark if a reasonable layout is drawn without the server block at the centre)
- On the Lab-Senior and Lab-Junior links, because these cables are longer than about 100 m and the signal weakens over such distances; a repeater regenerates it. (1 mark)
- A switch (a hub is acceptable for ½ mark). (1 mark)
- A WAN (Wide Area Network), since Dehradun and Mumbai are in different cities. (1 mark)