• NCERT Solutions
    • NCERT Library
  • RD Sharma
    • RD Sharma Class 12 Solutions
    • RD Sharma Class 11 Solutions Free PDF Download
    • RD Sharma Class 10 Solutions
    • RD Sharma Class 9 Solutions
    • RD Sharma Class 8 Solutions
    • RD Sharma Class 7 Solutions
    • RD Sharma Class 6 Solutions
  • Class 12
    • Class 12 Science
      • NCERT Solutions for Class 12 Maths
      • NCERT Solutions for Class 12 Physics
      • NCERT Solutions for Class 12 Chemistry
      • NCERT Solutions for Class 12 Biology
      • NCERT Solutions for Class 12 Economics
      • NCERT Solutions for Class 12 Computer Science (Python)
      • NCERT Solutions for Class 12 Computer Science (C++)
      • NCERT Solutions for Class 12 English
      • NCERT Solutions for Class 12 Hindi
    • Class 12 Commerce
      • NCERT Solutions for Class 12 Maths
      • NCERT Solutions for Class 12 Business Studies
      • NCERT Solutions for Class 12 Accountancy
      • NCERT Solutions for Class 12 Micro Economics
      • NCERT Solutions for Class 12 Macro Economics
      • NCERT Solutions for Class 12 Entrepreneurship
    • Class 12 Humanities
      • NCERT Solutions for Class 12 History
      • NCERT Solutions for Class 12 Political Science
      • NCERT Solutions for Class 12 Economics
      • NCERT Solutions for Class 12 Sociology
      • NCERT Solutions for Class 12 Psychology
  • Class 11
    • Class 11 Science
      • NCERT Solutions for Class 11 Maths
      • NCERT Solutions for Class 11 Physics
      • NCERT Solutions for Class 11 Chemistry
      • NCERT Solutions for Class 11 Biology
      • NCERT Solutions for Class 11 Economics
      • NCERT Solutions for Class 11 Computer Science (Python)
      • NCERT Solutions for Class 11 English
      • NCERT Solutions for Class 11 Hindi
    • Class 11 Commerce
      • NCERT Solutions for Class 11 Maths
      • NCERT Solutions for Class 11 Business Studies
      • NCERT Solutions for Class 11 Accountancy
      • NCERT Solutions for Class 11 Economics
      • NCERT Solutions for Class 11 Entrepreneurship
    • Class 11 Humanities
      • NCERT Solutions for Class 11 Psychology
      • NCERT Solutions for Class 11 Political Science
      • NCERT Solutions for Class 11 Economics
      • NCERT Solutions for Class 11 Indian Economic Development
  • Class 10
    • NCERT Solutions for Class 10 Maths
    • NCERT Solutions for Class 10 Science
    • NCERT Solutions for Class 10 Social Science
    • NCERT Solutions for Class 10 English
    • NCERT Solutions For Class 10 Hindi Sanchayan
    • NCERT Solutions For Class 10 Hindi Sparsh
    • NCERT Solutions For Class 10 Hindi Kshitiz
    • NCERT Solutions For Class 10 Hindi Kritika
    • NCERT Solutions for Class 10 Sanskrit
    • NCERT Solutions for Class 10 Foundation of Information Technology
  • Class 9
    • NCERT Solutions for Class 9 Maths
    • NCERT Solutions for Class 9 Science
    • NCERT Solutions for Class 9 Social Science
    • NCERT Solutions for Class 9 English
    • NCERT Solutions for Class 9 Hindi
    • NCERT Solutions for Class 9 Sanskrit
    • NCERT Solutions for Class 9 Foundation of IT
  • CBSE Sample Papers
    • Previous Year Question Papers
    • CBSE Topper Answer Sheet
    • CBSE Sample Papers for Class 12
    • CBSE Sample Papers for Class 11
    • CBSE Sample Papers for Class 10
    • CBSE Sample Papers for Class 9
    • CBSE Sample Papers Class 8
    • CBSE Sample Papers Class 7
    • CBSE Sample Papers Class 6
  • Textbook Solutions
    • Lakhmir Singh
    • Lakhmir Singh Class 10 Physics
    • Lakhmir Singh Class 10 Chemistry
    • Lakhmir Singh Class 10 Biology
    • Lakhmir Singh Class 9 Physics
    • Lakhmir Singh Class 9 Chemistry
    • PS Verma and VK Agarwal Biology Class 9 Solutions
    • Lakhmir Singh Science Class 8 Solutions

Learn CBSE

NCERT Solutions for Class 6, 7, 8, 9, 10, 11 and 12

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

January 23, 2025 by Sastry CBSE

Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 3 are designed as per the revised syllabus.

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

Time: 3 Hours
Maximum Marks: 70

General Instructions

  1. Please check this question paper, which contains 37 questions.
  2. All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions.
  3. The paper is divided into 5 Sections – A, B, C, D and E.
  4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
  5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
  6. Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
  7. Section D consists of 2 case study-type questions (33 to 34). Each question carries 4 Marks.
  8. Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
  9. All programming questions are to be answered using Python Language only.
  10. In the case of MCQ, the text of the correct answer should also be written.

Section A
(21 × 1 = 21)

Question 1.
State whether the following statement is True or False:
By default, Pandas’Series creates an integer index starting from zero if no index is provided.
Answer:
True

Question 2.
Which SQL statement is used to insert new data into a table?
(a) UPDATE
(b) INSERT INTO
(c) ALTER TABLE
(d) SELECT
Answer:
(b) INSERT INTO

Question 3.
Which protocol is used to assign IP addresses dynamically in a network?
(a) DHCP
(b) FTP
(c) TCP
(d) HTTP
Answer:
(a) DHCP

Question 4.
Which of the following commands is not a data manipulation command?
(a) SELECT
(b) INSERT
(c) UPDATE
(d) ALTER
Answer:
(d) ALTER

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

Question 5.
The electronic discovery technique used to determine and reveal technical criminal evidence is called ___________
(a) cyber investigation
(b) cyber evidence
(c) cyber forensics
(d) cyber intrude
Answer:
(c) cyber forensics

Question 6.
Which of the following method is used to remove missing values (NaN) from a DataFrame df?
(a) df.fillna()
(b) df.dropna()
(c) df.clean()
(d) df.replace_na()
Answer:
(b) df.dropna()

Question 7.
Which parameter is used to define the position/alignment of the plot title in the title() function?
(a) pos
(b) align
(c) loc
(d) All of these
Answer:
(c) loc

Question 8.
State whether the following statement is True or False:
SQL’s WHERE clause can be used to filter rows before the GROUP BY clause is applied.
Answer:
True

Question 9.
Which function is used to save a DataFrame to a CSV file in pandas (Note: df is a DataFrame object)?
(a) df.to_save(‘filename.csv’)
(b) df.write_csv(‘filename.csv’)
(c) df.save_csv(‘filename.csv’)
(d) df.to_csv(‘filename.csv’)
Answer:
(d) df.to_csv(‘filename.csv’)

Question 10.
The term phishing is synonymous to the term
(a) spoofing
(b) spooling
(c) stalking
(d) None of these
Answer:
(a) spoofing

Question 11.
Fill in the Blank.
In SQL, the ___________ operator is used to combine the result sets of two SELECT queries.
(a) UNION
(b) JOIN
(c) INTERSECT
(d) SELECT
Answer:
(a) UNION

Question 12.
In which topology is each device connected to a central hub or switch?
(a) Ring
(b) Bus
(c) Star
(d) Mesh
Answer:
(c) Star

Question 13.
Which of the following can be used to specify the data while creating a DataFrame?
(a) Series
(b) List of Dictionaries
(c) Structured ndarray
(d) All of these
Answer:
(d) All of these

Question 14.
Rohit forgot his laptop in his car and when he came back, he found his laptop was missing. This act is ___________
(a) cybercrime
(b) phishing
(c) theft
(d) plagiarism
Answer:
(c) theft

Question 15.
To display last five rows of a series object “M”, you may write
(a) M.Head()
(b) M.Tail(5)
(c) M.Head(5)
(d) M.tail()
Answer:
(d) M.tail()

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

Question 16.
Match the following SQL functions/clauses with their descriptions:

SQL Function Description
P. NOW() 1. Returns the system date and time.
Q. GETDATE() 2. Returns the current date.
R. DATE() 3. Extracts the date part from a datetime.
S. CURDATE() 4. Returns the current date and time.

(a) P – 4, Q – 1, R – 3, S – 2
(b) P – 2, Q – 3, R – 1, S – 4
(c) P – 1, Q – 4, R – 3, S – 2
(d) P – 4, Q – 3, R – 2, S – 1
Answer:
(b) P – 2, Q – 3, R – 1, S – 4

Question 17.
Fill in the Blank.
While creating a DataFrame Sunil wanted to specify the datatype, _________ property will help him to do so.
(a) datatype
(b) type
(c) dtype
(d) dt
Answer:
(c) dtype

Question 18.
Which is/are the parameter(s) that can be used in grid() function to specify the line properties?
(a) color
(b) linestyle
(c) linewidth
(d) All of these
Answer:
(d) All of these

Question 19.
Which protocol is used to securely access a remote computer over the internet?
(a) FTP
(b) Telnet
(c) SSH
(d) SMTP
Answer:
(c) SSH

Directions (Q. Nos. 20 and 21) are Assertion (A) and Reason (R) Type questions. Choose the correct option as:
(a) Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of Assertion (A)
(b) Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct explanation of Assertion (A)
(c) Assertion (A) is True, but Reason (R) is False
(d) Assertion (A) is False, but Reason (R) is True

Question 20.
Assertion (A): Some time we want to combine the two DataFrame using the merge() function.
Reason (R): Merging operation can be performed only with common values of column not with specific column.
Answer:
(c) The joining is performed on columns or indexes.
If the joining is done on columns, indexes are ignored.
We can specify the column names to use for merging using “on” parameter.
Hence A is true and R is false.

Question 21.
Assertion (A): The SQL command ‘ALTER TABLE’ is used to modify the structure of an existing table.
Reason (R): ‘ALTER TABLE’ can be used to add or delete columns from an existing table.
Answer:
(a) ‘ALTER TABLE’ allows modification of table structures, such as adding or deleting columns.
Hence, Both A and R are true, and R is the correct explanation of A.

Section B
(7 × 2 = 14)

Question 22.
(A) What are the differences between a Series and a DataFrame?
Or
(B) What is the use of matplotlib and pyplot?
Answer:
(A) 1. Series: 1D array-like structure with labeled indices.
2. DataFrame: 2D table-like structure with labeled axes (rows and columns).
Or
(B) 1. matplotlib: A library for creating static, animated, and interactive visualizations in Python.
2. pyplot: A module within matplotlib that provides a MATLAB-like interface for making plots and graphs.

Question 23.
Mention any four networking etiquettes.
Answer:
Four networking etiquettes:

  1. Be respectful and polite in all communications.
  2. Use clear and professional language.
  3. Avoid spamming or sending irrelevant messages.
  4. Respect others’ privacy and confidentiality.

Question 24.
Sangeetha is a database administrator who needs to display Block the total number of records of 2 and 3 Block Apartments. She is encountering an error while executing the following query:

SELECT BLOCK, COUNT (*) FROM APARTMENTS GROUP BY BLOCK WHERE BLOCK=2 OR 3;

Help her identify the reason for the error and write the correct query by suggesting the possible correction (s).
Answer:
The error in the query is due to the incorrect placement of the WHERE clause. It should come before the GROUP BY. The correct query is:

SELECT BLOCK, COUNT(*) FROM APARTMENTS WHERE BLOCK = 2 OR BLOCK = 3 GROUP BY BLOCK;

Question 25.
(A) Identify the following devices:
(i) An intelligent device that connects several nodes to form a network and redirects the received information only to the intended node(s).
(ii) A device that regenerates (amplifies) the received signal and re-transmits it to its destinations.
Or
(B) What is a modem?
Answer:
(A) (i) Switch
(ii) Repeater
Or
(B) Modem stands for Modulator/Demodulator, which converts the analog signal into a digital signal and again digital signal into an analog signal. It is used to connect the computers and transmit data using telephone lines.

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

Question 26.
Differentiate Unique and NOT NULL constraints.
Answer:

Unique NOT NULL
Ensures distinct values in a field. Ensures non-blank values in a field.
Allows NULL values in the column. Does not allow NULL values.
Does not allow duplicate values in the column. Allows duplicate values in the column.

Question 27.
According to a survey, one of the major Asian countries generates approximately about 2 million tonnes of electronic waste per year. Only 1.5 % of the total e-waste gets recycled. Suggest a method to manage e-waste.
Answer:
To manage e-waste, promote e-waste recycling programs, enforce proper disposal regulations, encourage manufacturer take-back schemes, and spread awareness about the environmental impact of e-waste.

Question 28.
(A) The Python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.

import pandas as Pd
data = {Name ['Alice'. 'Bob', 'Charlie'], Age [25, 30, 22]}
df = pd.DataFrame(Data)
df['Country'] = ['USA', 'Canada', 'UK']
print(df)

Or
(B) Complete the given Python code: to rename the column Age to Years in the DataFrame df and display the updated DataFrame.

import __________ as pd
df = pd.DataFrame({'Name': ['John', 'Alice', 'Bob'], 'Age': [25, 30, 22]})
df = df._________(columns={'Age':_________})
print(df)

Answer:

(A) import pandas as pd
data ={'Name': ['Alice'. 'Bob'. 'Charlie'], 'Age': [25. 30, 22]}
df = pd.DataFrame(data)
df['Country'] = ['USA', 'Canada', 'UK']
print(df)
Or
(B) import pandas as pd
df = pd.DataFrame({'Name': ['John', 'Alice', 'Bob'], 'Age': [25, 30, 22]})
df = df.rename(columns={'Age': 'Years'})
print(df)

Section C
(4 × 3 = 12)

Question 29.
Rohan is a student working with electronic materials and computers. Recently he found some of his hardware parts were not working. He wanted to throw them anywhere outside. His friend suggested he not to do so and treat the e-wastes properly. Answer the following questions in this scenario:
(i) What are eWastes?
(ii) What are the advantages of proper treatment of e-Wastes?
(iii) Which of the following are not eWastes?
Books, defective mouse, defective motherboard, plastic toys, defective keyboard.
Answer:
(i) Electronic waste (e-waste), is a generic term used to describe all types of old, end-of-life or discarded electrical and electronic equipment, such as household appliances; office information and communications equipment; entertainment and consumer electronic equipment; lighting equipment; electric and electronic tools, etc.
(ii) Advantages

  • It Prioritizes Environmental Protection.
  • E-waste Recycling Helps to Conserve Available Natural Resources.
  • Creates Jobs.
  • Saves Landfill and Reduces GHG emissions.
  • Prevent Water Bodies from Toxic Waste Poisoning.

(iii) Books, Plastic toys.

Question 30.
(A) Consider the DataFrame MyDF given below and create a DataFrame using a list of dictionaries:
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q30
Or
(B) Write a program to create a series object using a dictionary that stores the number of students in each house of class 12B of your school.
Note: Assume four house names are Beas, Chenab, Ravi and Satluj having 18, 2, 20, 18 students respectively and pandas library has been imported as pd.
Answer:

(A) import pandas as pd
data = [{'Emp_id': 'E001'. 'Name': 'Ritvi'. 'Designation': 'Clerk', 'City': 'Gurugram', 'Salary': 32000},
{'Emp_id': 'E025', 'Name': 'Riya'. 'Designation': 'Programmer', 'City': 'Delhi', 'Salary': 65000},
{'Emp_id': 'E034', 'Name': 'Gaurav', ’Designation’: 'Data Analyst', 'City': 'Bangalore', 'Salary': 95000},
{'Emp_id': 'EQ16', 'Name': 'Kanishka', 'Designation': 'Manager', 'City': 'Mumbai', 'Salary': 87000}
]
MyDF = pd.DataFrame(data)
print(MyDF)
Or
(B) import pandas as pd
house_data = {‘Beas’: 18, 'Chenab': 2, 'Ravi': 20. 'Satluj': 18}
# Creating Series object
house_series = pd.Series(house_data)
print(house_series)

Question 31.
I. Write an SQL statement to create a table named DOCTORS, with the following specifications:
DoctorID: INTEGER, Primary Key, Auto Increment
FirstName: VARCHAR(50), cannot be NULL
LastName: VARCHAR(50), cannot be NULL
Specialization: VARCHAR(100), cannot be NULL
DateOfJoining: DATE, cannot be NULL
Salary: DECIMAL(10, 2)
II. Write SQL Query to insert the following data in the DOCTORS Table:
1, Anil, Sharma, Cardiologist, 2015-05-20, 120000.50
Answer:

I. CREATE TABLE DOCTORS (
DoctorID INTEGER PRIMARY KEY AUT0_INCREMENT,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
Specialization VARCHAR(100) NOT NULL,
DateOfJoining DATE NOT NULL,
Salary DECIMAL(10, 2));
II. INSERT INTO DOCTORS (DoctorID, FirstName, LastName, Specialization, DateOfJoining, Salary)
VALUES (1, 'Anil', 'Sharma', 'Cardiologist', '2015-05-20', 120000.50);

Question 32.
(A) Consider the following tables CABHUB and CUSTOMER.
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q32
Write SQL commands for the following statements:
(i) To display the names of all the white-coloured vehicles.
(ii) To display the name of vehicle name and the capacity of vehicles in ascending order of their sitting capacity.
(iii) To display the customer name and the corresponding name of the vehicle hired by them.
Or
(B) Consider the following tables EMPLOYEE and DEPARTMENT.
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q32.1
Write SQL commands for the following statements:
(i) To display all DepName along with the DepCde in descending order of DepCde.
(ii) To display the average age of Employees in DepCde as 103.
(iii) To display the name of DepHead of the Employee named “Sanjeev P”
Answer:

(A) (i) SELECT VehicleName FROM CABHUB WHERE Colour = “WHITE”;
(ii) SELECT VehicleName, Capacity From CABHUB ORDER BY Capacity ASC;
(iii) SELECT Cname,VehicleName FROM CABHUB, CUSTOMER WHERE CUSTOMER. Vcode=CABHUB, Vcode;
Or
(B)
(i) SELECT DEPNAME, DEPARTMENT. DepCde
FROM EMPLOYEE, DEPARTMENT WHERE
EMPLOYEE. DepCDE= DEPARTMENT. DepCde Order by DepCde DESC;
(ii) Select AVG (Age) from EMPLOYEE WHERE DepCde=“103’’;
(iii) SELECT DeptHead FROM DEPARTMENT WHERE
Employee, TName= “Sanjeev P” AND EMPLOYEE, DepCde = 'DEPARTMENT.
DepCde;

Section D
(2 × 4 = 8)

Question 33.
Consider the following data of COVID-19-affected patients in various countries. This data is represented by a bar chart and students have to fill in the blanks of the Python program in their practical exam.
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q33

import matplotlib.pyplot as plt
countries = ['India', 'America', 'Brazil', 'Russia', 'South Africa', 'Peru', 'Chili', 'Spain']
patients = [20, 50, 30, 10, 6, 5, 4, 4]
plt.bar(_________,_________) # Statements 1, 2
plt.xlabel('_________') # Statement 3
plt.ylabel('COVID-19 affected patients (in Lakh)')
plt.title('C0VID19 Affected Patients in Various Countries')
plt.__________() # Statement 4

I. Write the suitable code in the blank space in the line marked as Statement 1.
II. Refer to the graph shown above and fill in the blank in Statement 2 with suitable Python code.
III. Statement 3 with the name of the x-axis.
IV. Refer to the graph shown above and fill in the blank in Statement 4 with a suitable function.
Answer:
I. countries
II. patients
III. Countries
IV. show()

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

Question 34.
(A) New Youngs club is maintaining the following table “Football” for keeping records of players. Write SQL queries for them for the table as instructed:
PID Shows the unique code for each book.
PlayerName Specifies the player name.
Matches Specifies the number of matches
Goals Show the Goals of each player.
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q34
(a) Display the names and matches of all players.
(b) Display the last 3 characters of all players and the matches played by them.
(c) Increase the Goals of all players by 2.
(d) Change the width of the Playername column to varchar(40).
Or
(B) Consider the table PERSONS given below. Write the output for (i) to (iv).
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q34.1
(i) SELECT SurName FROM PERSONS WHERE BasicSalary>= 50000;
(ii) SELECT SUM (BasicSalary) FROM PERSONS WHERE Gender = ‘F’;
(iii) SELECT Gender. MIN (BasicSalary) FROM PERSONS GROUP BY Gender;
(iv) SELECT Gender, COUNT (*) FROM PERSONS GROUP BY Gender;
Answer:

(A) (a) Select PlayerName, Matches from Football;
(b) Select right(PIayerName, 3), Matches from Football;
(c) Update Football set Goals =Goals+2 ;
(d) Alter table Football Modify Playername varchar(40);

Or
(B)
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q34.2

Section E
(3 × 5 = 15)

Question 35.
China Middleton Fashion is planning to expand its network in India, starting with two cities to provide infrastructure for the distribution of its products.
The company has planned to set up its main office in Chennai at three different locations and has named their offices as Production Unit, Finance Unit, and Media Unit. The company has its Corporate Unit in Delhi.
A rough layout of the same is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q35
Approximate distance between these units is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q35.1
In continuation of the above, the company experts have planned to install the following number of computers in each of these units.
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q35.2
(i) Suggest the kind of network required (out of LAN, MAN, WAN) for each of the following units.
(a) Production Unit and Media Unit
(b) Production Unit and Finance Unit
(ii) Which of the following devices will you suggest for connecting all computers with each of their office units?
(a) Switch/Hub
(b) Modem
(c) Telephone
(iii) Suggest a cable/wiring layout for connecting the company’s local office units located in Chennai.
(iv) After setting up the lab and the Internet in the lab, the company is now required to enable videos and animations to be played on the web browser for its employees. Which browser tool/service can be used for the same?
(v) Give an example of an Open Source web browser.
Answer:
(i) (a) The type of network between the Production Unit and Media Unit is LAN (Local Area Network).
(b) The type of network between the Production Unit and the Finance Unit is MAN (Metropolitan Area Network).
(ii) (a) The suitable device for connecting all the computers within each of their office units is a switch/hub.
(iii) The cable/wiring layout for connection is as follows:

CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q35.3

(iv) Add-ons browser tools/services can be used to enable videos and animations to be played on the web browser for students of multimedia class.
(v) Google Chrome, Firefox.

Question 36.
A DataFrame df stores data about passengers, Flights and Years. First few of the DataFrame are shown below:
CBSE Sample Papers for Class 12 Informatics Practices Set 2 with Solutions Q36
1. Add both the male and female passengers and assign to the column “Total_passengers”.
2. Display the maximum passengers of male passengers and maximum passengers in female passengers of the DataFrame.
3. Display the DataFrame.
4. Display the average number of total passengers in the DataFrame.
5. Display the data for the month with the highest total passengers.
Answer:

1. df['Total_passengers'] = df['MalePassengers'] + df['FemalePassengers']
2. max_male = df[’Mai ePassengers'], max()
max_female = df['FemalePassengers'], max()
print(f''Maximum Male Passengers: (max_male)")
print(f"Maximum Female Passengers: (max_femalel"))
3. print(df)
4. average_total = df['Total _passengers'].mean()
print(f"Average Total Passengers: {average_total}")
5. max_total = df[df['Total_passengers'] == df['Total_passengers'].max()]
print(max_total)

CBSE Sample Papers for Class 12 Informatics Practices Set 3 with Solutions

Question 37.
(A) Write the names of SQL functions which will perform the following operations:
(i) To display the current date.
(ii) To convert the string in capital letters Thiruvananthapuram.
(iii) To remove spaces from the end of the string “Delhi Public School, Meerut”.
(iv) To display the month from the current date.
(v) To compute the power of a number nl raised to the power n2.
Or
(B) Explain the following SQL functions using suitable examples.
(i) LCASE()
(ii) RTRIM()
(iii) MID()
(iv) YEAR()
(v) POWER()
Answer:

(A) (i) CURRENT_DATE()
(ii) UPPER('Thiruvananthapuram)
(iii) RTRIM('Delhi Public School, Meerut')
(iv) MONTH (CURRENT_DATE())
(v) P0WER(n1, n2)

Or
(B) (i) LCASE(): Converts a string to lowercase.
Example: SELECT LCASE(‘HELLO’);
Output: ‘hello’
(ii) RTRIM(): Removes trailing spaces from a string.
Example: SELECT RTRIM(‘HELLO’);
Output: ‘HELLO’
(iii) MID(): Extracts a substring from a string starting from a specified position.
Example: SELECT MI0(‘HELLO’, 2, 3);
Output: ‘ELL’
(iv) YEAR(): Extracts the year from a date.
Example: SELECT YEAR(‘2024-09-06’);
Output: 2024
(v) POWER(): Raises a number to a specified power.
Example: SELECT POWER(2, 3);
Output: 8

Filed Under: CBSE Sample Papers

LearnCBSE.in Student Education Loan
  • Student Nutrition - How Does This Effect Studies
  • Words by Length
  • NEET MCQ
  • Factoring Calculator
  • Rational Numbers
  • CGPA Calculator
  • TOP Universities in India
  • TOP Engineering Colleges in India
  • TOP Pharmacy Colleges in India
  • Coding for Kids
  • Math Riddles for Kids with Answers
  • General Knowledge for Kids
  • General Knowledge
  • Scholarships for Students
  • NSP - National Scholarip Portal
  • Class 12 Maths NCERT Solutions
  • Class 11 Maths NCERT Solutions
  • NCERT Solutions for Class 10 Maths
  • NCERT Solutions for Class 9 Maths
  • NCERT Solutions for Class 8 Maths
  • NCERT Solutions for Class 7 Maths
  • NCERT Solutions for Class 6 Maths
  • NCERT Solutions for Class 6 Science
  • NCERT Solutions for Class 7 Science
  • NCERT Solutions for Class 8 Science
  • NCERT Solutions for Class 9 Science
  • NCERT Solutions for Class 10 Science
  • NCERT Solutions for Class 11 Physics
  • NCERT Solutions for Class 11 Chemistry
  • NCERT Solutions for Class 12 Physics
  • NCERT Solutions for Class 12 Chemistry
  • NCERT Solutions for Class 10 Science Chapter 1
  • NCERT Solutions for Class 10 Science Chapter 2
  • Metals and Nonmetals Class 10
  • carbon and its compounds class 10
  • Periodic Classification of Elements Class 10
  • Life Process Class 10
  • NCERT Solutions for Class 10 Science Chapter 7
  • NCERT Solutions for Class 10 Science Chapter 8
  • NCERT Solutions for Class 10 Science Chapter 9
  • NCERT Solutions for Class 10 Science Chapter 10
  • NCERT Solutions for Class 10 Science Chapter 11
  • NCERT Solutions for Class 10 Science Chapter 12
  • NCERT Solutions for Class 10 Science Chapter 13
  • NCERT Solutions for Class 10 Science Chapter 14
  • NCERT Solutions for Class 10 Science Chapter 15
  • NCERT Solutions for Class 10 Science Chapter 16

Free Resources

RD Sharma Class 12 Solutions RD Sharma Class 11
RD Sharma Class 10 RD Sharma Class 9
RD Sharma Class 8 RD Sharma Class 7
CBSE Previous Year Question Papers Class 12 CBSE Previous Year Question Papers Class 10
NCERT Books Maths Formulas
CBSE Sample Papers Vedic Maths
NCERT Library

NCERT Solutions

NCERT Solutions for Class 10
NCERT Solutions for Class 9
NCERT Solutions for Class 8
NCERT Solutions for Class 7
NCERT Solutions for Class 6
NCERT Solutions for Class 5
NCERT Solutions for Class 4
NCERT Solutions for Class 3
NCERT Solutions for Class 2
NCERT Solutions for Class 1

Quick Resources

English Grammar Hindi Grammar
Textbook Solutions Maths NCERT Solutions
Science NCERT Solutions Social Science NCERT Solutions
English Solutions Hindi NCERT Solutions
NCERT Exemplar Problems Engineering Entrance Exams
Like us on Facebook Follow us on Twitter
Watch Youtube Videos NCERT Solutions App