0% found this document useful (0 votes)
106 views12 pages

Xii Ip Jpr-Ms-Pb-1-Set-2

Uploaded by

Surjith S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views12 pages

Xii Ip Jpr-Ms-Pb-1-Set-2

Uploaded by

Surjith S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION

FIRST PRE-BOARD EXAMINATION (Session 2023-24)


CLASS XII
INFORMATICS PRACTICES (065)
MARKING SCHEME
TIME: 03 HOURS M.M.: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only

SECTION A
Q M
1 Which device connects an organization's network with the outside world of the 1
Internet?
a) Hub
b) Modem
c) Gateway
d) Repeater
2 E-waste contains Heavy metals such as ________ and _____which are highly toxic 1
when ingested.
a) Hydrogen and Mercury
b) Lead and Argon
c) Lead and Mercury
d) Hydrogen and Argon
3 It is an act of copying another person’s data idea, words or work and pretended that 1
they are our own.
a) Copyright
b) Virus
c) Plagiarism
d) IPR
4 Imagine you work as a data analyst for a retail company. The company provides you 1
with a large dataset of sales transactions in a CSV file. Your task is to import this data
and perform various data manipulation and analysis operations. Which Pandas
method should you use to read this CSV file and load it into a DataFrame for your
analysis?
a) Read_CSV()
b) import_data()
c) load_csv()
d) read_csv()
5 Predict the output of following query: 1
Select mod(12,3);
a) 2 b) 4
c) 0 d) The query will produce error
6 ‘P’ in IPR stands for 1
a) Proprietary b) Platform
c) Patent d) Property
7 What does CSV stand for in the context of data storage? 1
a) Column Separated Value
b) Class Separated Value
c) Comma Separated Value
d) Comma Segregated Value
8 A Database Administrator needs to display the average pay of workers from each 1
departments with more than five employees. Which SQL query is correct for this task?
a) SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5 GROUP BY
DEPT;
b) SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) > 5 GROUP BY
DEPT;
c) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT WHERE COUNT(*) >
5;
d) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING COUNT(*)
> 5;
9 The mid( ) function in MySQL is an example of _______________. 1
a) Math function b) Text function
c) Date Function d) Aggregate Function
10 Which command is used to display the last 3 rows from a Pandas Series named NP? 1
a) NP.Tail()
b) NP.tail(3)
c) NP.TAIL(3)
d) All of the above
11 In SQL, which of the following is an invalid data type? 1
a) Date
b) Integer
c) Varchar
d) Month
12 Which attribute is not used with the Dataframe? 1
a) Size b) column
c) Empty d) type
13 When a software company's server is unethically accessed to obtain sensitive info 1
and it is unreadable at companies end, the attacker demands payment to prevent the
release of that information, it's known as:
a) Phishing
b) Identity Theft
c) Plagiarism
d) Ransomware
14 Which of the following function is the correct syntax of LCASE() function? 1
a) LCASE(row_name) b) LCE(column_name)
c) LCASE(str/column_name) d) None of the above
15 Incognito mode of browser is used for: 1
a) public browsing b) Hides contents from web server
c) private browsing d) save cookies
16 While surfing on Internet if your geo location is turned on, than it makes 1
a) Active digital footprint b) Passive digital footprint
c) Active e footprint d) Passive e footprint
Q17 and 18 are ASSERTION AND REASONING based questions. Mark
the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17 Assertion (A): A firewall is a device that allows unrestricted data flow in a network. 1
Reasoning(R): It serves as a barrier between a private internal network and external
networks, controlling and monitoring incoming and outgoing network traffic.

Ans. iv
18 Assertion (A):- df.loc(False) function can be used to find the values where index value 1
is False. Reason (R):- Boolean indexing is a type of indexing and can be used to
retrieve the data
Ans. i

SECTION B
QUES MARK
S
19 You are tasked with creating a website for a small business. Outline the steps 2
you would take to launch the website. Provide at least two necessary steps.
Ans.
● Define the Purpose
● Choose a Domain Name
● Select a Hosting Provider
● Design and Develop the Website
OR
You are evaluating the performance of different web browsers for a company's
internal web-based application. Provide any two criteria you would use to
assess the browsers' performance.
Ans.
● Page Load Speed
● Compatibility with Web Standards
● Security Features
● Memory Usage
● Ease of Customization like availability of add-ons and extensions.
20 The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
import pandas as pt
data = {'Name': ['Ramesh Pillai', 'Priya Nair', 'Suresh Menon'],
'Age': [28, 32, 26],
'City': ['Mcleodganj', 'Jalandhar', 'Sanchor']}
df = pd.DataFrame(data)
print(df.head)

Ans.
Correct Code:
import pandas as pd
data = {'Name': ['Ramesh Pillai', 'Priya Nair', 'Suresh Menon'],
'Age': [28, 32, 26],
'City': ['Mcleodganj', 'Jalandhar', 'Sanchor']}
df = pd.DataFrame(data) # use pd instead of pt
print(df.head()) #head() instead of head
21 Consider the given MySQL query: SELECT NOW(); 2
It returns the current Date and Time. Modify this query with help of suitable date
functions to :
A. Return the month from the current date and time.
B. Retrieve the day of the week for the current date and time.

Ans.
A. SELECT MONTH(NOW()) AS current_month;
B. SELECT DAYNAME(NOW()) AS current_day_of_week;
22 Predict the output of python code based on series 2
import pandas as pd
temp = pd.Series([28, 32, 29, 35, 30, 31, 33])
ft = temp[temp > 30]
print(ft)
Ans.
1 32
3 35
5 31
6 33
dtype: int64
23 As a YouTube content creator, can you use background music for free without 2
worrying about copyright strike? If so, what type of licence is needed for that
piece of media?
Ans.
Yes. CC or Creative Commons License.
24 Complete the given Python code to create a Pandas Series named "cu" with the 2
top five central universities in India and their respective states as data. Then,
display only those universities which are from the state of "Delhi."

import pandas as pd
cu_names = ['DU', 'JNU', 'BHU', 'AMU', 'JMI']
cu_states = ['Delhi', 'Delhi', UP', 'UP', 'Delhi']
cu = pd.Series(__________)
print(___________)

Ans.
import pandas as pd
cu_names = ['DU', 'JNU', 'BHU', 'AMU', 'JMI']
cu_states = ['Delhi', 'Delhi', UP', 'UP', 'Delhi']
cu = pd.Series(cu_names,index=cu_states)
print(cu['Delhi'])
25 What is the difference between Aggregate Function and Scaler Function in 2
MySQL? Provide the name of one function from each.
Ans.
- Aggregate functions operate on a group of values and return a single result
(e.g., SUM, AVG, COUNT etc).
- Scalar functions work on individual values and return a modified individual
value (e.g., UPPER, LENGTH, NOW,MOD,POW etc).

SECTION C
QUES MARK
S
26 Consider the SQL table "PRODUCT_SALES" with the following data: 3

| Product | Segment | Region | SalesQ1 | SalesQ2 |


| P1 | High | A | 25000 | 32000 |
| P2 | Medium | B | 18000 | 20000 |
| P3 | Low | A | 8000 | 9000 |
| P4 | High | C | 35000 | 38000 |
| P5 | Medium | B | 22000 | 25000 |
| P6 | Low | C | 5000 | 5500 |

Write suitable SQL queries for the following:


1. Display the region-wise average sales in the first quarter.
2. Display the segment-wise highest sales in the second quarter.
3. Display the records in descending order of sales in the second quarter.

Ans.
1.
SELECT Region, AVG(SalesQ1) AS AvgSalesQ1
FROM PRODUCT_SALES
GROUP BY Region;

2.
SELECT Segment, MAX(SalesQ2) AS HighestSalesQ2
FROM PRODUCT_SALES
GROUP BY Segment;

3.
SELECT *
FROM PRODUCT_SALES
ORDER BY SalesQ2 DESC;

OR
Predict the output of the following queries based on the table
"PRODUCT_SALES" given above:
1. SELECT LEFT(Segment, 2) FROM PRODUCT_SALES WHERE Region =
'A';
2. SELECT (SalesQ2 - SalesQ1) / 2 AS Sale2 FROM PRODUCT_SALES
WHERE Segment = 'High';
3. SELECT SUM(SalesQ1) AS "TOTAL” FROM PRODUCT_SALES WHERE
Region = 'B';

Ans.
1. | LEFT(Segment, 2) |
| Hi |
| Lo |

2.
| Sale2 |
| 3500 |
| 1500 |

3.
| TOTAL |
| 40000 |
27 You are tasked with creating a DataFrame to store information about gaming 3
apps available on various digital platforms. The DataFrame should have three
columns: Name, Genre, Type (Free or Paid), and Downloads.

To achieve this, you have the following data:


Name Genre Type Downloads(mil)
1 Call of Duty: Warzone FPS Free 20
2 The Witcher 3: Wild Hunt RPG Paid 5
3 Candy Crush Saga Puzzle Free 65
4 Among Us Arcade Free 50
5 Minecraft Sandbox Paid 10

Now create a dataframe with a dictionary of Series and index should be from 1
to 5.

Ans.
import pandas as pd
data =
{
'Name': pd.Series(['Call of Duty: Warzone', 'The Witcher 3: Wild Hunt',
'Candy Crush Saga', 'Among Us', 'Minecraft']),
'Genre': pd.Series(['FPS', 'RPG', 'Puzzle', 'Arcade', 'Sandbox']),
'Type': pd.Series(['Free', 'Paid', 'Free', 'Free', 'Paid']),
'Downloads(mil)': pd.Series([2000000, 500000, 10000000, 500000000,
10000000])
}
df_game = pd.DataFrame(data, index=range(1, 6))
print(df_game)
28 Write MySQL statements for the following: 3
A. To use a database named Pets.
B. To see all the tables inside the database.
C. To see the structure of the table named horse.
Ans.
A. USE Pets;
B. SHOW TABLES;
C. DESCRIBE horse;
29 Nisha loves online shopping and frequently makes purchases on various e- 3
commerce websites. One day, she received an email with an incredible
discount offer on a popular shopping platform. Excited about the deal, she
clicked on the provided link and made a payment. However, after the
transaction, she received neither a confirmation nor the product she ordered.

A few days later, she realized that the website was fake, and her money was
gone. She also found unauthorized transactions on her credit card. Distressed
and frustrated, Nisha decided to seek legal action.

Questions:
1. Identify the type of cybercrime Nisha is a victim of.
2. Is there a specific branch/division of police in which she can report the crime?
3. Suggest Nisha two precautionary measures she should take in the future
while shopping online to avoid falling victim to such situations.

Ans.
1. Nisha is a victim of Online Shopping Fraud and Phishing.
2. She can report the crime to the Cyber Crime Division of the local police.
3. Nisha should verify the authenticity of discount offers in emails and
only make purchases on trusted and verified e-commerce websites.
Additionally, she should enable two-factor authentication for her online
payment methods to enhance security.
OR
What are the positive impacts of ICT on physical and mental health? Describe
any two of such impacts.

Ans.
1. Improved Access to Medical Information: ICT provides easy access to
health-related information, empowering individuals to make informed decisions
about their well-being.
2. Telehealth Services: ICT enables remote consultations with healthcare
professionals, increasing healthcare accessibility, especially in remote areas.
3. Mental Health Apps: ICT supports mental health with apps and platforms
offering therapy and coping tools for managing stress and anxiety.
4. Health Tracking Devices: Wearable devices and apps help monitor physical
activity and vital signs, promoting overall wellness.
5. Health Education: ICT aids in health education and awareness campaigns,
promoting healthier lifestyle choices and preventive care.
30 Consider the given DataFrame ‘Anime’: 3
Name Genre Eps Year of Creation
1 Naruto Shounen 220 2002
2 One Piece Shounen 1300 1999
3 Attack on Titan Action 75 2013
4 Dragon Ball Z Shounen 291 1989

Write suitable Python statements for the following:


1. Add a row with the following data: [“Death Note“,“Mystery“,37,2006].
2. Rename the column ‘Eps’ to ‘Episodes’ and ‘Year of Creation‘ to ‘Year‘.
3. Drop the column ‘Genre‘.

Ans.
# 1. Add a row using loc
anime_df.loc[4] = ['Death Note', 'Mystery', 37, 2006]

# 2. Rename columns
anime_df.rename(columns={'Episodes': 'Eps', 'Year of Creation': 'Year'},
inplace=True)

# 3. Drop the 'Genre' column


anime_df.drop(columns=['Genre'], inplace=True)

SECTION D
QUES MARK
S
31 Alakh Niranjan is responsible for managing a database in a financial company. 4
The company stores financial transaction data in a table named FINE_TRNC.
Alakh needs your assistance in writing SQL queries to retrieve specific
information from the table. The attributes of the table are:
TransactionDate,TransactionAmount.

1. Write a query to display the date of the most recent transaction.


2. Write a query to retrieve the average transaction amount for the month of
June.
3. Write a query to list the maximum amount for the transaction that occurred in
the month of December.
4. Write a query to count the total number of transactions that took place in the
year 2023.

Ans.
1. SELECT MAX(TransactionDate) FROM FINE_TRNC;
2. SELECT AVG(TransactionAmount) FROM FINE_TRNC
WHERE MONTH(TransactionDate) = 6;
3. SELECT MAX(TransactionAmount) FROM FINE_TRNC
WHERE MONTH(TransactionDate) = 12;
4. SELECT COUNT(*) FROM FINE_TRNC
WHERE YEAR(TransactionDate) = 2023;
32 Riya, a Data Analyst working for a film studio, has created a DataFrame named 4
'movie_revenue_df' to store the revenue data of movies released by Viacom 18
in the year 2022. The DataFrame looks like this:
Movie Revenue (in crores)
A. Gangubai Kathiawadi 125
B. The Kashmir Files 340
C. Bhediya 75
D. JugJugg Jiyo 250
E. Bachchhan Pandey 120
An intern is working with her and has a few doubts. As Riya is busy with
analysis work. You answer on her behalf.
(i) Predict the output of the following python statement:
a. print(movie_revenue_df[‘Revenue (in crores)’].dtypes)
b. print(movie_revenue_df.iloc[2,0])
(ii) Delete the Second last row from the DataFrame.
(iii) Find out the total revenue.
OR (Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named
“hit_movies_2022.csv” in the directory named ‘PMDB’ which is inside the
present working directory(PWD) of the project.

Ans.
(i)
a. int64
b. Bhediya
(ii) movie_revenue_df = movie_revenue_df.drop(movie_revenue_df.index[-3])

(iii)
total_revenue = 0
for label, value in movie_revenue_df['Revenue (in crores)'].iteritems():
total_revenue += value
OR
(iii) movie_revenue_df.to_csv('PMDB/hit_movies_2022.csv', index=False)

SECTION E
QUES MARK
S
33 Write suitable SQL queries for the following: 5
1. Write an SQL query to calculate 3 raised to the power of 4.
2. To round off the value 1969.5538 without any decimal part
3. Display the current date.
4. Convert the string 'After the test,take some rest’ to uppercase:
5. Return the length of the string 'To chalo shuru karte hain'.

Ans.
1. SELECT POW(3, 4);
2. SELECT ROUND(1969.5538, 0);
3. SELECT CURDATE();
4. SELECT UPPER('After test,take rest');
5. SELECT LENGTH('To chalo shuru karte hain');
OR
Take a look at the table structure of the table ‘IndianAlbums’ and `Artist_Info`

IndianAlbums Artist_Info
Attribute Data Type Attribute Data Type

AlbumID INT ArtistID INT


AlbumName VARCHAR(100) ArtistNam VARCHAR(100)
e

ArtistID INT
Nationalit VARCHAR(50)
y
ReleaseYear INT

Genre VARCHAR(50)

Sales DECIMAL(10,
2)

Language VARCHAR(50)

Write SQL queries to perform the following tasks:

1. Insert a new record into the `IndianAlbums` table with the following details:
- AlbumName: "Lagaan"
- ReleaseYear: 2001
- Genre: "Soundtrack"
- Sales: 5000000
- Language: "Hindi"

2. Update the `IndianAlbums` table to modify the sales of the album with
`AlbumID` 3 to 1000000.

3. Delete the record of the album named "Dil Se" from the `IndianAlbums` table.

4. Alter the table structure of `IndianAlbums` to add a new column named


"Language" of data type VARCHAR(50).

5. Select all albums released in the year 1990 or later, and for each album,
retrieve the album name, release year, genre, and the name of the artist.

Ans.

1. Insert a new record into the `IndianAlbums` table:


INSERT INTO IndianAlbums (AlbumName, ReleaseYear, Genre, Sales,
Language)
VALUES ('Lagaan', 2001, 'Soundtrack', 5000000, 'Hindi');

2. Update the sales of the album with `AlbumID` 3:


UPDATE IndianAlbums
SET Sales = 1000000
WHERE AlbumID = 3;

3. Delete the record of the album named "Dil Se":


DELETE FROM IndianAlbums
WHERE AlbumName = 'Dil Se';
4. Alter the table structure to add a new column "Language":
ALTER TABLE IndianAlbums
ADD Language VARCHAR(50);

5. Select all albums released in the year 1990 or later:


SELECT I.AlbumName, I.ReleaseYear, I.Genre, A.ArtistName
FROM IndianAlbums I,Artist_Info A
WHERE I.ReleaseYear >= 1990 and I.ArtistID = A.ArtistID;
34 Rajat Parivahan Upkaram Pvt. Ltd. has established its presence in two cities: 5
Kaithal and Sirsa. The Kaithal city office has 4 blocks named K1, K2, K3 and
K4 and Sirsa is a franchise 400 kms away. The tables given below show the
distance between different blocks and the number of computers in each block.

Distance
(in m) K1 K2 K3 K4

K1 0 70 150 60

K2 70 0 130 50

K3 150 130 0 100

K4 60 50 100 0

Block No. of Workstations (Computers)

K1 50

K2 150

K3 30

K4 70

The company is planning to form a network by joining these blocks and two
offices. Answer the following questions to help them out:
1. Suggest the most appropriate block for placing the network server out of four
blocks.
2. To ensure efficient communication among the three cities, propose a
suitable network topology and provide a network diagram illustrating the
structure.
3. Please specify which city branch you choose as the LAN and why?.
4. Suggest the optimal placement of the following devices:
- Repeater
- Firewall
5. Company is planning to use VPN. Expand the term VPN and clarify its
significance within this network setup.

Ans.
1. K2 (Most no. of Workstations)
2. Star Topology (Draw the layout with K2 in the centre)

Kaithal Office

400 Kms

R epeater

Sirsa Branch

3. Kaithal, as all 4 blocks are in the same city and within few meters.
4.
- Repeater between K2 and K3 as the distance is >100 m to amplify the
signal
- Firewall should be placed at K2 as it forms the network perimeter
5. Virtual Private Network. It encrypts the communication thus making it
secure.
35 Month Wise sale of iphone 14 is given below: 5
data = { "Month": ["Sep22", "Oct22", "Nov22", "Dec22", "Jan23", "Feb23",
"Mar23", "Apr23"],
"Sales": [1000000, 1200000, 1500000, 2000000, 1800000, 1700000, 1600000,
1500000] }
Draw a line plot based on this data to know the trend of sales in two quarters (8
months). Use appropriate customisations.

Ans.
import pandas as pd
import matplotlib.pyplot as plt
data = {
"Month": ["Sep22", "Oct22", "Nov22", "Dec22", "Jan23", "Feb23", "Mar23",
"Apr23"],
"Sales": [1000000, 1200000, 1500000, 2000000, 1800000, 1700000,
1600000, 1500000]
}
df = pd.DataFrame(data)

# Create the line plot


plt.plot(df['Month'], df['Sales'], marker='o', linestyle='-')

# Customize the plot


plt.title('Monthwise Sales of iPhone 14 (Sep22 - Apr23)')
plt.xlabel('Month')
plt.ylabel('Sales')
plt.grid(True, linestyle='--', linewidth=0.5) #Optional
# Rotate the x-axis
axis labels for better readability
plt.xticks(rotation=45, ha="right") #Optional
#

plt.show()

OR
Write suitable Python code to create aBar Chart showcasing the medal
talley of top of countries in the asia cup 2023.

# medal count
medals = [88, 60, 58, 43, 35]

Ans.

import matplotlib.pyplot as plt


countries = ["China", "India", "Japan", "South Korea", "Iran"]
medals = [88, 60, 58, 43, 35]
plt.bar(countries, medals, color=['blue', 'green', 'red', 'purple', 'orange'])
plt.title("Top 5 Medal Winner Countries in Asia Cup Tournament 2023")
plt.xlabel("Countries")
plt.ylabel("Number of Medals")
plt.xticks(rotation=45, ha="right")
ha="rig #Optional
plt.grid(True, linestyle='--',', linewidth=0.5) #Optional
plt.show()

You might also like