Let’s discuss the Last 3 years of Important PYQs Informatics Practices Class 12. Here we go.

Last 3 years Important PYQs Informatics Practices Class 12

Here we begin with the Last 3 years Important PYQs Informatics Practices Class 12! In this article we will discuss 1 mark, 2 marks, 3 marks and 4 marks questions! Here we starts with 1 mark questions

Here they are!

1 Mark Questions – Important PYQs Informatics Practices Class 12

[1] What does a modem do at the sender’s end ?
(A) It converts analog signals into digital data.
(B) It converts digital data into analog signals.
(C) It converts digital data into optical signals.
(D) It converts optical signals into digital data.

[2] Which out of the following cannot be included in digital footprint ?
(A) Submitting the form online
(B) Searching for your friend’s address online
(C) Walking on the beach
(D) Online shopping

[3] Emma is a student working on her research project. She finds a well-written paragraph on the Internet that perfectly explains the concept that she wants to include in her project. She copies and pastes the paragraph as it is into her research paper. Her research paper did not get selected due to plagiarism. What is the one way out of the following that Emma could have followed to avoid plagiarism in this case ?
(A) Copying the content from a book in her college library.
(B) Rewriting the paragraph in her own words and citing the original source.
(C) Asking her friends for information and using it in her research paper, without mentioning her friend’s input.
(D) Posting the paper on her college website.

[4] What will be the output of the following query?
SELECT MOD (5, 15);
(A) 10

(B) 3

(C) 0

(D) 5

[5] Which of the following aggregate functions returns the average of values in a specified column of a MySQL table?
(A) AVG(Column)

(B) AVERAGE(Column)

(C) MEAN(Column)

(D) TOTAL(Column)

[6] For how long does a patent typically protect an invention?
(A) 5 years

(B) 10 years

(C) 20 years

(D) 50 years

[7] In Pandas library of Python, a one-dimensional array containing a sequence of values of any datatype is known as :
(A) DataFrame

(B) Histogram

(C) Series

(D) Panel

[8] Now() in MySQL returns ___.
(A) Today’s date

(B) Today’s date and current time

(C) System’s date and time

(D) Name of active database

[9] What will be the output of the following query ?
SELECT SUBSTR(“Swachh Survekshan”,2,4)
(A) wac

(B) wach

(C) shan

(D) achh

[10] What will be the output of the following Pythan code ?

import pandas as pd
dd={'Jan':31,'Feb':28,'Mar':31,'Apr':30}
rr=pd.Series(dd)
print(rr)

(A)

Jan 31
Feb 28
Mar 31
Apr 30
dtype: int64
(B)

Jan Feb Mar Apr
31 28 31 30
dtype: int64
(C)

Jan – 31
Feb – 28
Mar – 31
Apr – 30
dtype: int64
(D)

Jan Feb Mar Apr
31 28 31 30
dtype: int64

[11] With respect to databases, a row in a relation is also known as a/an ________________
(A) Attribute

(B) Tuple

(C) Field

(D) Domain

[12] Which of the following commands is used to display the first three rows of a DataFrame ‘DF’?
(A) DF.head()
(B) DF.header()
(C) DF.head(3)
(D) DF.Head(3)

[13] Which of the following Internet services is used for instant messaging?
(A) Chat

(B) Email

(C) WWW

(D) Python

[14] What is the output of the following SQL Query ?
SELECT INSTR(“KNOWLEDGE”,”E”);
(A) 7

(B) 5

(C) 6

(D) – 6

[15] Which of the following is not a feature of Open Source Software?
(A) It can be shared with others without any licensing burden.
(B) It is same as free software.
(C) It can be downloaded on multiple devices.
(D) Its source code is available for free distribution.

[16] What is a common symptom of extended use of digital devices these days?
(A) Improved eyesight
(B) Enhanced physical fitness
(C) Eye strain
(D) Increased muscle strength

[17] Assertion (A) : Hacking is a cyber crime.
Reason (R) : To avoid hacking, one should not share the password with anyone.

(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.

[18] Assertion (A) : The Pandas library in Python is primarily used for creating static, animated and onteractive 2D plots or figures.
Reason (R) : Data visualization can be achieved with the help of a variety of charts and plots, including static plots, animations, and interactive visualizations.

(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.

[19] A _______________ is a network device that can receive the data, analyse it and transmit it to other networks.
(a) Modem

(b) Switch

(c) Repeater

(d) Router

[20] We need to exhibit proper manners and etiquette while being online. Pick up one such net etiquette from the following :
(a) Do not share the expertise
(b) Respect privacy and diversity
(c) Feed the troll
(d) Copyright violation

[21] A patent protects an invention for ________ years, after which it can be freely used.
(a) 40

(b) 30

(c) 20

(d) 10

[22] Write the output of the following SQL query :
SELECT LCASE(SUBSTR(“Project Management”,9,6));
(a) Manag

(b) Manage

(c) MANAGE

(d) manage

[23] Write the output of the following SQL command :
select pow(2,2*2);
(a) 16

(b) 2

(c) 4

(d) 8

[24] E-waste contains ___________ that causes respiratory disorders and brain damage.
(a) Cadmium

(b) Beryllium

(c) Lead

(d) Mercury

[25] In SQL, _____________ returns the month name from the specified date.
(a) MONTH( )
(b) DATE( )
(c) MONTHNAME( )
(d) NOW( )

[26] What will be the output of the Python program mentioned below?

import pandas as pd
df=pd.DataFrame(['Apple','Banana','Orange','Grapes','Guava'])
print(df[2:4:2])

(a) 0
2 Banana
(b) 0
2 Orange
(c) 0
2 Banana
4 Grapes
(d) Empty DataFrame
Columns:[0]
Index:[ ]

[27] Which of the following SQL function returns the number of values in the specified column ignoring the NULL values?
(a) COUNT(*)

(b) COUNT(columnname)

(c) LENGTH(*)

(d) LENGTH(columnname)

[28] _____________ helps to fetch a group of rows based on common values in a column.
(a) ORDER BY

(b) FILTER

(c) GROUP BY

(d) SELECT BY

[29] Which of the following is a one-dimensional array containing a sequence of values in Python?
(a) Relation

(b) DataFrame

(c) Series

(d) Square

[30] In Python Pandas, head(n) method returns the first n members of the series. What is the default value of n ?
(a) 2

(b) 3

(c) 4

(d) 5

[31] ______________ is a service that allows to put a website or a web page on the Internet.
(a) Web Server
(b) Web Browser
(c) Web Hosting
(d) Domain Name System

[32] Find the output of the following SQL queries :
Select INSTR(“Data Science”,”ie”);
(a) 8

(b) 5

(c) True

(d) False

[33] Rupam created an assistive device for the blind. This device is very helpful for the blind and people with low vision. Now, she wants that no one should copy her innovation. What should she do?
(a) Get the trademark for her invention
(b) Get the license for her invention
(c) Get the patent for her invention
(d) Get the copyright for her invention

[34] Presenting someone else’s idea as one’s own idea or work is called:
(a) Phishing

(b) Stacking

(c) Plagiarism

(d) Bullying

[35] Assertion (A) : Modem stands for ‘Modulator Demodulator’.
Reason (R) : The modem at the sender’s end act as a demodulator that converts the digital data into analog signals and at the receiver end acts as a modulator that converts analogue signals into digital data.

(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.

[36] Assertion (A) : In order to be able to use Python’s Data Visualization library, we need to import the pyplot module from matplot library.
Reason (R) : The pyplot module houses a variety of functions required to create and customize charts or graphs.

(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.

[37] Which of the following topologies is very efficient and all nodes are connected to a central hub?  

(i) Star     

(ii) Tree

(iii) Bus                                                              

(iv) Ring

[38] Ramandeep is a young woman with great aspirations and has a good team of like-minded people. She along with her team members started a company to sell handicrafts online and also designed a logo for their company. What type of intellectual property does this logo represent?

(i) Patents

(ii) Copyright

(iii) Design                                                         

(iv) Trademark

39. Which of the following is a type of cybercrime where objectionable and demeaning comments are posted on social media platform about a person, such that he/she is mentally harassed?

(i) Phishing

(ii) Hacking

(iii) Cyberbullying                                

(iv) Identity Theft

[40] Which of the following is the correct output of the following SQL command ?

SELECT ROUND (7876.4568, 2)Last 3 years Important PYQs Informatics Practices Class 12;

(i) 7876.46                                                               

(ii) 7876.45

(iii) 7900  

(iv) 7900.4568

[41] Aggregate functions are also known as :   

(i) Scalar Functions    

(ii) Single Row Functions

(iii) Multiple Row Functions                

(iv) Hybrid Functions

[42] Primary law in India for matters related to e-commerce and cyber crime is :

(i) IT Act 1995                                     

(ii) IT Act 2000

(iii) IT Act 1998                                   

(iv) IT Act 2010

[43] Ravisha has stored the records of all students of her class in a MYSQL table. Suggest a suitable SQL clause that she should use to display the names of students in alphabetical order.

(i) SORT BY                  

(ii) ALIGN BY

(iii) GROUP BY                

(iv) ORDER BY

[44] To remove the leading and trailing space from data values in a column of MySql Table, we use

 (i) Left ()              

(ii) Right ()

(iii) Trim()      

(iv) Ltrim()        

 [45] If the substring is not present in a string, the INSTR( ) returns :

 (i) – 1                                                 

(ii) 1

(iii) NULL   

(iv) 0

[46] What will be the output of the following code?

import pandas as pd 
myser = pd. Series ( [O, O, O]) 
print (myser)

(i)

0 0

0 0

0 0

(ii)

0 1

0 1

0 2

(iii)

0 0

1 0

2 0

(iv)

0 0

1 1

2 2

[47] Which of the following  a two-dimensional labelled data structure of Python?

(i) Relation

(ii) Dataframe

(iii) Series                                            

(iv) Square

[48] To compare data values of commission earned by salesmen over a year, which of the following type of graph should preferably be used ?

(i) line

(ii) area

(iii) bar                                                 

(iv) scatter

[49] Which of the following is not a web browser?     

(i) Opera  

(ii) Google Chrome

(iii) Linux                                             

(iv) Mozilla Firefox

[50] Which of the following is not a valid aggregate function in MYSQL?

(i) COUNT( )  

(ii) SUM( )    

(iii) MAX( )                  

(iv) LEN( )

Watch this video for more understanding:

[51] The digital footprint that we leave online unintentionally is called ______________.

(i) Active digital footprint   

(ii) Passive digital footprint

(iii) True digital footprint                   

(iv) False digital footprint

[52] E-waste is responsible for the degradation of our environment if not properly treated or disposed of. Some of the feasible methods of e-waste management are reduce, and recycle. 

(i) reuse

(ii) recheck

(iii) resubmit

(iv) regular

[53] Assertion (A) : A static webpage does not change for each person visiting the web page.  

Reason (R) : When a web server receives a request for a dynamic web page, it locates and updates the page and sends it to the browser of the client.

(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 and (R) is false.

(iv) (A) is false but (R) is true.

[54] Assertion (A) : The output of addition of two series will be NaN, if one of the elements or both the elements have no value(s).

Reason (R) : While performing mathematical operations on a series, by default all missing values are filled in with O.

(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 and (R) is false.

(iv) (A) is false but (R) is true.

[55] In topology, the devices are arranged in the form of multiple branches in a hierarchical manner.

(i) Star
(ii) Tree
(iii) Mesh
(iv) Bus

[56] Ridhima purchased a license for a copy of software and made additional copies without the permission of the copyright owner. This act of hers is known as:

(i) Trademark Infringement
(ii) Identity Theft
(iii) Copyright Infringement
(iv) Patent

[57] What can an individual do to enhance the privacy of data stored digitally?

(i) Share sensitive information on social media platforms.
(ii) Use your date of birth as your password.
(iii) Regularly update software installed on your device.
(iv) Download and install software from unknown sources.

[58] What will be the output of the following query?
SELECT POWER(2, MOD(17,3));

(i) 8
(ii) 1
(iii) 0
(iv) 4

[59] Which of the following is not an aggregate function in MySQL?
(i) AVG()
(ii) MAX()
(iii) LCASE()
(iv) MIN()

[60] _______ is the gaining of unauthorized access to data in a computer system.
(i) Phishing
(ii) Plagiarism
(iii) Hacking
(iv) Copyright violation

[61] Which of the following is NOT true with respect to CSV files?
(i) Values are separated by commas.
(ii) to_csv() can be used to save a dataframe to a CSV file.
(iii) CSV file is created using a word processor.
(iv) CSV file is a type of text file.

[62] Which MySQL command helps to add a primary key constraint to any table that has already been created?
(i) UPDATE
(ii) INSERT INTO
(iii) ALTER TABLE
(iv) ORDER BY

[63] What will be the output of the following query?
SELECT SUBSTR("G20 2023 INDIA", 5, 4);
(i) G202
(ii) 2023
(iii) INDI
(iv) 023

[64] What will be the output of the following Python code?

import pandas as pd
dd = {'One': 1, 'Two': 2, 'Three': 3, 'Seven': 7}
rr = pd.Series(dd)
rr['Four'] = 4
print(rr)

(i)

One 1

Two 2

Three 3

Seven 7

dtype: int64

(ii)

One 1

Two 2

Three 3

Four 4

Seven 7

dtype: int64

(iii)

Four 4

One 1

Two 2

Three 3

Seven 7

dtype: int64

(iv)

One 1

Two 2

Three 3

Seven 7

Four 4

dtype: int64

[65] Which of the following clause cannot work with SELECT statement in MySQL?

(i) FROM

(ii) INSRT INTO

(iii) WHERE

(iv) GROUP BY

[66] Which of the following command will not show the first five rows from Pandas series named S1?

(i) S1[0:5]

(ii) S1.head()

(iii) S1.head(5)

(iv) S1.head[0:5]

[67] Rama was unable to understand how the recruiters were able to know about her digital activity when she has not shared anything with them. The recruiters might have checked ________ of Rama.
(i) Carbon Footprint
(ii) Water Footprint
(iii) Online print
(iv) Digital Footprint

[68] Which MySQL string function is used to extract a substring from a given string based on a specified starting position and length?
(i) SUBSTRING_INDEX()
(ii) LENGTH()
(iii) MID()
(iv) TRIM()

[69] The software that is free for anyone, and its source code is available for access, modification, correction, and improvement is called _____________.
(i) Proprietary software
(ii) Commercial software
(iii) Free and Open source software
(iv) Copyrighted software

[70] ____________ help in data protection through copyrights, patents and trademarks.
(i) Data Privacy Right
(ii) Right to Innovation
(iii) Intellectual Property Rights (IPR)
(iv) Right to Data Protection

[71] Assertion (A): CyberBullying can have serious, emotional and psychological effects on victims.
Reason (R): Online Bullying is not a crime while offline bullying is a crime.
(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 and (R) is false.
(iv) (A) is false but (R) is true.

[72] Assertion (A): A Series is a one-dimensional array, and a DataFrame is a two-dimensional array containing a sequence of values of any data type (int, float, list, string, etc.).

Reason (R): Both Series and DataFrames have by default numeric indexes starting from zero.

(i) Both (A) and (R) are true, and (R) is the correct explanation for (A).
(ii) Both (A) and (R) are true, but (R) is not the correct explanation for (A).
(iii) (A) is true, and (R) is false.
(iv) (A) is false, but (R) is true.

Watch this video for more understanding:

2 Marks questions – Important PYQs Informatics Practices Class 12

[1] Write one function each for the following network devices :
(i) MODEM (ii) Router

[2] Write any one advantage and any one disadvantage of BUS topology.

[3] The Python code written below has syntactical errors. Rewrite the correct code and underline the correction(s) made.

import Pandas as pd
countries=[{'country';'INDIA','capital':'New Delhi'},
{'country':'USA','capital':'New York'},
{'country':'JAPAN','capital':'Tokyo'}
df=pd.DataFrame(country)
print(df)

Ans.:

import pandas as pd
countries=[{'country';'INDIA','capital':'New Delhi'},
{'country':'USA','capital':'New York'},
{'country':'JAPAN','capital':'Tokyo'}]
df=pd.DataFrame(countries)
print(df)

[4] Consider the string ‘PAINTING’. Write the SQL commands to display the following output :
(I) ING
(ii) INT

[5] Find the output of the following Python code :

import pandas as pd
vaccine_qty=pd.Series([10,16,1],index=["Typhoid", "Tetanus","Hepatitis"])
cost=pd.Series([200,500,800],index=["Typhoid","Tetanus", "Flu"])
print(vaccine_qty + cost)

Series – vaccine_qty

Typhoid10
Tetanus16
Hepatitis1
dtype: int64

Series – cost

Typhoid200
Tetanus500
Flu800
dtype: int64

Sum

FluNaN
HepatitisNaN
Tetanus516.0
Typhoid210.0
dtype:float64

[6] Define the following terms :

(i) Web Hosting
(ii) WWW

[7] Consider the following Python code :

import pandas as pan
customer=[{'Name':'Alisha','Age':25,'Gender':'Female','Occupation':'Engineer'},
          {'Name':'Rozer','Age':34,'Gender':'Male',: 'Analyst'},  
          {'Name':'Fazal','Age':28,'Gender':'Male', 'Occupation':'Developer'}] 
df= ___.DataFrame(_)
print(_____)

Complete the above given Python code to display the following output :

NameAgeGender Occupation
0Alisha25FemaleOccupation
1Rozer34MaleEngineer
2Fazal28MaleDeveloper

[8] Write any two differences between DELETE and DROP TABLE command of MySQL.

DeleteDrop
It is DML command.It is DDL command.
It removes the all/selected rows from table.It removes the entire table.
It affects the dependent table. It does not affect any other objects.
Example – delete from emp Exam – drop table emp

[9] Write any one main advantage and one main disadvantage of Star Topology.

[10] With reference to browsing the websites, briefly explain the term cookie. Also mention any two points of significance of it.

[11] Arpit wants to find the total commission earned by those departments where the number of employees in the department is more than 2 and writes the following query :

Select department, count(commission) from TECHNO having count(*)>2 group by department;

But he got an error. Identify the error(s) and rewrite the query by underlining the correction(s) done.

Ans.:

SELECT department, count(commission) SUM(commission)  
FROM TECHNO  
having GROUP BY department  
group by HAVING COUNT(*) > 2;  

[12] Ananya, a database executive, needs to display current date and time. Suggest to her a suitable SQL function name. Also write the query for the same.

[13] Shobit needs to create the following two series named Eng and Math. Help him to create a dataframe ‘mydata’ from the given series ‘Eng’ and ‘Math’.

EngMath
Aditi 25
bhavuk 21
chirag 23
deepak 24
Gaurav 27
dtype: int64
Aditi 9
bhavuk 29
chirag 15
deepak 14
Gaurav 20
dtype: int64

Ans.:

import pandas as pd  
Eng = pd.Series({'Aditi': 25, 'bhavuk': 21, 'chirag': 23, 'deepak': 24, 'Gaurav': 27})
Math = pd.Series({'Aditi': 9, 'bhavuk': 29, 'chirag': 15, 'deepak': 14, 'Gaurav': 20})

mydata = pd.DataFrame({'Eng': Eng, 'Math': Math})
print(mydata)

[14] What do you understand by Copyright Infringement? What can be done as a user to avoid Copyright Infringement.

[15] What is meant by Trademark Infringement? What action can the owner take against someone who infringes its registered trademark?

[16] What will be the output of the following code?

import pandas as pd
S1=pd.Series(data=[1,7])
S2=pd.Series(S1+S1)
print(S2)

Ans.:

02
114
dtype:int64

[17] Carefully observe the following code :

import pandas as pd
product={'prodid':pd.Series([1,2,3,4,5]),
'pname':pd.Series(['pen', 'pencil', 'eraser',
'color', 'sharpener']),
'qty':pd.Series([2,10,10,30,10]),
'price':pd.Series([300,20,50,40,15])}
stock=pd.DataFrame(product)
print(stock)

Write Python statements for the following :
(i) Display the names of products.
(ii) rename the column ‘price’ to ‘newprice’ in the DataFrame stock.

Ans.:

(i) print(stock.pname) or print(stock['pname'])
(ii) stock.rename(columns={'price':'newprice'},inplace=True)

[18] Arshiya is a web developer and one of her clients wants her to design a web page to accept donations for an NGO. Which type of web page (static/dynamic) will she create?

[19] Danny has created a website on Python resources on his laptop. Now, he wants that others should be able to access his website and use the resources. What should he do to achieve his objective?

[20] Define a web browser. Give examples of any two network devices.

[21] Find the output of the following SQL queries :
(i) SELECT ROUND(21.341, 2);
(ii) SELECT MOD(10, 3);

Ans.:

(i) ROUND(21.341,2)
    -------------
           21.34
(ii) MOD(10,3)
    -------------
             1000

[22] Give any two differences between MOD() and AVG() functions in SQL.

Ans.:

FeatureMOD()AVG()
PurposeReturns the remainder of a division operation.Returns the average (arithmetic mean) of a set of values.
UsageUsed for mathematical operations, especially in modular arithmetic.Used for statistical calculations on numerical data.
SyntaxMOD(dividend, divisor)AVG(column_name)
ExampleSELECT MOD(10, 3); → Output: 1 (since 10 ÷ 3 leaves a remainder of 1)SELECT AVG(salary) FROM employees; → Output: Average of all salaries

[23] Define the following terms:
(a) Plug-ins
(b) Add-ons

[24] Find the output of the following SQL queries :

(a) SELECT MID(“YOUNG INDIA”,5);
(b) SELECT INSTR(“MACHINE INTELLIGENCE”,”IN”);

Ans.:

(a) MID("YOUNG INDIA",5)
   -----------------------
   G INDIA
(b) INSTR("MACHINE INTELLIGENCE","IN")
   ------------------------------------
                                    5

[25] Harjat has created the table EMP in his database.

Table: EMP

E_IdNameDeptComm
E001DityaAdmin35000
E002UzairProduction42500
E003RajnikantAdmin21000
E004MoushamiSales23575
E005SamanthaSales37000
E006SunderAdmin43000

Now he wants to find the sum of commission earned by each department.
He has executed the following query :
SELECT dept,sum(comm) GROUP BY dept FROM EMP;
But, he got an error. Rewrite the correct query after identifying the error(s).

Ans.:

select dept,sum(comm) from emp group by dept;
Explanation:
The select query starts with select followed by list of columns and aggregate function then from clause with table name followe by group by column name.

[26] Ms. Anubha is working in a school and stores the details of all students in a Table : SCHOOL

AdmidSnameGradeHousePerGenderDob
20150001Aditya Das10Green86Male2006-02-20
20140212Harsh Sharma11Red50Male2004-10-05
20090234Swapnil Pant10Yellow84Female2005-11-21
20130216Soumen Rao9Red90Male2006-04-10
20190227Rahil Arora10Blue70Male2005-05-14
20120200Akasha Singh11Red70Female2004-12-16

Write the SQL statements from the given table to :
(i) Remove TRAILING SPACES from column Sname.
(ii) Display the names of students who were born on Tuesday.

Ans.:

(i) select rtrim(sname) from school;
(ii) select sname from school where dayname(dob)='Tuesday';

[27] Predict the output of the following SQL queries from the above Table : SCHOOL :
(i) SELECT AVG(Per) FROM SCHOOL WHERE House=”Red”;
(ii) SELECT Sname, Per FROM SCHOOL WHERE MONTH(Dob)=11;

Ans.:

(i) AVG(Per)
   -----------------
                 70
(ii) Sname                    Per
    --------------        -------------------
    Swpanil Pant                            84

[28] Rushil thought “WWW” and “Internet” are synonyms i.e., they meant same and can be used interchangeably. But the teacher said that they are not same. Help him to understand the meaning of both the terms with the help of a suitable example of each.

Ans.:

FeatureInternet World Wide Web (WWW)
DefinitionA global network of computers that allows communication and data exchange.A collection of web pages and websites accessible through the Internet.
FunctionProvides infrastructure for communication and services like email, file transfer, and online gaming.A service that enables users to access websites, documents, and multimedia via web browsers.
ComponentsIncludes servers, routers, data centers, and protocols like TCP/IP.Consists of web pages, hyperlinks, web browsers, and HTTP/HTTPS protocols.
UsageUsed for various services such as email, cloud computing, and video calls.Primarily used for browsing information and accessing web-based services.
Access MethodRequires an ISP (Internet Service Provider) to connect to the network.Requires a web browser like Chrome, Firefox, or Edge to access websites.
ExampleSending an email via Gmail, making a Skype call.Visiting www.wikipedia.org or shopping on www.amazon.com.

[29] What are Cookies? How can we disable Cookies?

[30] i) What is the function of a Gateway?  

(ii) Give examples of any two plug-ins.

[31] Find the output of the following SQL Queries :

(i) SELECT ROUND (7658.345,2);

(ii) SELECT MOD(ROUND (13.9,0),3);

Ans.:

(i) ROUND (7658.345,2)
   -----------------------
                    7658.35
(ii) MOD(ROUND(13.9,0),3)
    ------------------------
                          2

[32] Give any two differences between the POWER( ) and SUM( ) SQL functions.

Ans.:

FeaturePOWER() FunctionSQL Functions
DefinitionA mathematical function used to calculate the power of a number.Functions in SQL that perform various operations like mathematical, string, aggregate, and date/time processing.
UsageUsed for exponentiation (raising a number to a power).Can be used for different purposes, such as data manipulation, aggregation, and conversion.
SyntaxPOWER(base, exponent)Varies depending on the type of SQL function (e.g., SUM(), LEN(), NOW()).
ExampleSELECT POWER(2, 3); → Output: 8SELECT UPPER(‘hello’); → Output: HELLO

[33] Give one advantage and disadvantage to each of Bus and Star topology.

Ans.:

TopologyAdvantageDisadvantage
Bus TopologyEasy to install and requires less cable.If the main cable (backbone) fails, the entire network goes down.
Star TopologyIf one device fails, the rest of the network remains unaffected.Requires more cabling and is costlier than Bus topology.

[34] Find the output of the following SQL queries :

  1. SELECT substr(“FIT INDIA MOVEMENT”,5);
  2. SELECT instr(“ARTIFICIAL INTELLIGENCE”,”IA”)

Ans.:

1. substr("FIT INDIA MOVEMENT",5)
  ----------------------------------
  INDIA MOVEMENT
2. instr("ARTIFICIAL INTELLIGENCE","IA")
  ------------------------------------------
                                         8

[35] Srikanth created table STUDENT in his database.

RollNoNameClassMarks
1Ritika1240
2Angad1235
3Kaveri1142
4Lalitha1221
5Daniel1144
6Rabindra1139
7Rabia1128

He now wants to count number of students in each class where the number of students is more than 3. He has executed the following query :

SELECT MAX (Marks) FROM STUDENT WHERE COUNT (*)>3 GROUP BY Class;

But, he got an error. Identify the error(s) and rewrite the query. Also underline the correction(s) done.

Ans.:

select max(marks) from student where group by class having count(*)>3; 

[36] Ms. Mohini is working in a school and stores the details of all students in a table SCHOOLDATA.

AdmnoNameClassHousePercentGenderDob
20150001Aditya Das10Green86Male2006-02-20
20140212Harsh Sharma11Red75Male2004-10-05
20090234Swapnil Pant10Yellow84Female2005-11-21
20130216Soumen Rao9Red91Male2006-04-10
20190227Rahil Arora10Blue70Male2005-05-14
20120200Akasha Singh11Red64Female2004-12-16

Write SQL statements from the above given table to :

  1. To remove leading spaces from the column Name.
  2. Display the names of students who were born on Sunday.

Ans.:

1. select ltrim(name) from schooldata;
2. select name from schooldata where dayname(dob)='Sunday'

[37] Predict the output of SQL queries from the given table .

  1. SELECT MAX(Percent) FROM SCHOOLDATA;
  2. SELECT LEFT(Gender,1), Name FROM SCHOOLDATA WHERE YEAR(Dob)=2005;

Ans.:

1. MAX(Percent)
  ------------------
                  91
2. LEFT(Gender,1)                Name
  -------------------          --------------------
  F                            Swpanil Pant
  M                            Rahil Arora               

[38] What is a web server ? How is it different from web browser?

Ans.:

FeatureWeb ServerWeb Browser
DefinitionA software or hardware that stores, processes, and delivers web pages to users.An application used to access and display web pages from the internet.
FunctionHosts websites, processes HTTP requests, and sends responses to clients.Requests web pages from servers and renders them for users.
ExamplesApache, Nginx, Microsoft IISGoogle Chrome, Mozilla Firefox, Microsoft Edge
Role in Web CommunicationActs as a middleman between the client (browser) and website data.Acts as an interface for users to access web content.

[39] What do you understand by the term cookies ? Give any two benefits of cookies.

[40] Keshav has written the following query to find out the sum of bonus earned by the employees of WEST zone.

SELECT zone, TOTAL (bonus) FROM employee HAVING zone ='WEST';

But he got an error. Identify the errors and rewrite the query by underlining the correction(s) done. 

Ans.:

SELECT zone, TOTAL (bonus) FROM employee group by zone HAVING zone ='WEST';

[41] Differentiate between COUNT( *) and COUNT( ) functions in MYSQL. Give suitable examples to support your answer.

Ans.:

FeatureCOUNT(*)COUNT(column_name)
Counts all rows?YesNo (only non-NULL values)
Includes NULL values?YesNo (ignores NULLs)
Performance ImpactGenerally fasterSlightly slower (due to NULL check)
Usage ScenarioWhen you need the total number of rowsWhen you need the count of non-NULL values in a specific column

[42] Write a Python program to create a series object, country using a list that stores the capital of each country.

Note : Assume four countries to be used as index of the series object are India, UK, Denmark, and Thailand having their capitals as New Delhi, London, Copenhagen, and Bangkok respectively. 

Ans.:

import pandas as pd
capitals = ["New Delhi", "London", "Copenhagen", "Bangkok"]
countries = ["India", "UK", "Denmark", "Thailand"]
country_series = pd.Series(capitals, index=countries)
print(country_series)

[43] Explain plagiarism with an example.

[44] Nowadays all of us frequently use social media to connect with our friends. Give any two netiquettes that we should follow while communicating on social media.

[45] What Will be the output of the following code ?

import pandas as pd 
sl=pd.Series(data=2*(3 , 10)) 
print(sl)

Ans.:

03
110
23
310
dtype:int64

[46] Carefully observe the following code :

import pandas as pd
dic= {'pid' : [101, 102, 103, 104, 105] ,  
      'pname' : 'Shyam' , 'Roushan', 'Archit', 'Medha' ,   
      'sports' : [ Cricket' , 'Tennis' , 'Football' , Cricket' ,  
      'points' : [45000, 20000, 15000 , 53000, 60000] } 
player=pd. DataFrame (dic) 
print (player)

Write Python statements for the following :

  • In the dataframe player created above, set the row labels as ‘Playerl’, ‘Player2’, ‘Player3’, ‘Player4’, ‘Player5’.
  • Rename the column ‘points’ to ‘netpoint’ in the DataFrame player.

Ans.:

1. player.index = ['Player1', 'Player2', 'Player3', 'Player4', 'Player5']
2. player.rename(columns={'points': 'netpoint'}, inplace=True)

Watch this video to learn more:

3 Marks questions – Important PYQs Informatics Practices Class 12

[1] Consider the table BIKES given below :
Table : BIKES

BidBikenameBrandnameBiketypeCost
1001DreamRacerSpeedo Super1980000
1002SplendidIndianaNULL50000
1003SilverWingIndiana Touring2300000
1004ZZZZWMVSports1500000
1005CH2HSpeedoSuper470000
1006AstorVictoryNormal1700000
1007CHANDRAWMVAdventure3000000
1008SWISSWMVTouring4200000
1009SWIFTROADYSuper1900000
1010CLOUD9GEMNormal1700000

(a) Write SQL commands for the following :
(i) Display Bikenames and their corresponding Brandnames in descending order of cost.
(ii) Display Brandnames of bikes whose Biketype is not known.
(iii) Consider the following query :
SELECT*FROM BIKES WHERE Cost BETWEEN 200000 AND 3000000;
Write another query, using relational and logical operators which will produce the same output.

Ans.:

(i) select bikename, brandname from bikes order by cost desc;
(ii) select brnadname from bikes where biketype is null;
(iii) select * from bikes where cost>=200000 and cost<=300000;

[2] Consider BIKES table given in above question and Predict the output of the following queries:
(i) SELECT UCASE(TRIM(Brandname)) FROM BIKES WHERE Bid = 1003;
(ii) SELECT COUNT(Biketype) FROM BIKES;
(iii) SELECT SUM(Cost), Brandname FROM BIKES GROUP BY Brandname Having Brandname = “WMV” OR Brandname = “Indiana”;

Ans.:

(i) UCASE(TRIM(Brandname)) 
   ------------------------
   INDIANA        
(ii)  COUNT(Biketype) 
   --------------------
                      9 
(iii) SUM(Cost)      Brandname
     -----------     -----------
         2350000     Indiana   
         8700000     WMV       

[3] Sejal, a Python programmer has been given the following tasks :
(i) Create two series – one to store various product names and the other to store the corresponding price. Each series should have appropriate row label as given below :

 Product_nameProduct_price
B1001Butterscotch130
V3002Vanilla100
M4002Mango Zap150
M4007Magnum190
C6005Cassatta200

(ii) Create a dictionary containing ‘Product_name’ and ‘Product_price’ as keys. Add the series created in part (i) as their corresponding values.
(iii) Create a DataFrame from the above created dictionary of series. Help her in writing the Python program to accomplish the above mentioned tasks.

Ans.:

import pandas as pd
#Answer(i)
pname=pd.Series({'B1001':'Butterscotch','V3002':'Vanilla','M4002':'Mango Zap','M4007':'Magnum','C6005':'Cassatta'})
price=pd.Series({'B1001':130,'V3002':100,'M4002':150,'M4007':190,'C6005':200})

#Answer(ii)
d={'Product_name':pname,'Product_price':price}

#Answer(iii)
df=pd.DataFrame(d)

[4] Answer the following questions based on the table Sales given below :
Table : Sales

idNameCityCommission
E001Naman BatraChandigarh20
E002Rupesh MannDelhi15
E005Ravi GautamMumbai25
E006Mukul SinghDelhi30
E007Ruby RaiMumbai19
E003Raman RoyKolkata16

(i) Suggest the Primary key for the given table ?
(ii) Write the SQL command to insert the following data in the table Sales :
id ->E009
Name -> Sukumar
City -> Nagpur
Commission -> 10
(iii) Is the command used in part (ii) a DDL or a DML command ?

Ans.:

(i) id column should be used as primary key as it contains unique records. 
(ii) insert into sales values ('E009','Sukumar','Nagpur',10);
(iii) insert command affects the records in table. Hence it is a DDL Command.

[5] Sarah works in a multinational IT firm. One day, she came to know that some mails were sent from her official mail account but she had not actually sent them. Based on the given information, answer the following questions :
(i) Sarah is a victim of which type of cybercrime ?
(ii) Write any two precautions that one should take to protect oneself from being the victim of cybercrime.
(iii) Should Sarah immediately change the password of her email account ?

Ans.:

(i) Sarah is a victim of email spoofing or email hacking. If someone sent emails using her account without her knowledge, it indicates that her email might have been compromised or spoofed.

(ii) Two precautions to protect oneself from cybercrime:

  1. Use Strong and Unique Passwords – Create a strong password with a mix of uppercase and lowercase letters, numbers, and special characters. Avoid using easily guessable information like birthdates or common words.
  2. Enable Two-Factor Authentication (2FA) – This adds an extra layer of security by requiring a second verification step, such as an OTP sent to a phone or authentication app, making unauthorized access more difficult.

(iii) Yes, Sarah should immediately change the password of her email account. Additionally, she should check for any unauthorized access, update security settings, enable 2FA, and scan her device for malware to ensure her account is secure.

[6] At a local electronics store, a new range of smartphones has been launched, creating a buzz among technology enthusiasts. However, the introduction of these new devices has also raised concerns about
the increasing generation of e-waste in the community. Answer the following questions based on above extract :

(i) Define e-waste.
(ii) Give any one environmental challenge posed by e-waste, including its impact on air, water, and soil quality.

(iii) Imagine you are a part of a local environment organization. Provide any two strategies that could be implemented to minimize the negative environmental effects of e-waste.

Ans.:

(i) E-waste (Electronic Waste) refers to discarded electronic devices such as smartphones, computers, televisions, and other electronic gadgets that are no longer in use or functional. It includes items that are outdated, broken, or unwanted.

(ii) Environmental Challenge of E-waste:
One major challenge is soil contamination. When e-waste is improperly disposed of in landfills, hazardous chemicals like lead, mercury, and cadmium leach into the soil, reducing its fertility and making it toxic for plants, animals, and humans.

(iii) Two Strategies to Minimize the Negative Environmental Effects of E-waste:

  1. Promote E-waste Recycling Programs – Encourage people to dispose of their old electronics at designated e-waste recycling centers where valuable materials can be recovered, and hazardous substances can be safely managed.
  2. Encourage Responsible Consumer Behavior – Educate consumers about buying durable and repairable devices, donating old gadgets, and opting for trade-in programs to extend the life cycle of electronics and reduce e-waste generation.

[7] Consider the following DataFrame Cricket :

 WonLostPlayed
A91120
B12517
C10616
D7714

Write suitable Python statements to perform the following tasks :
(i) Add a new column Rating to the DataFrame having the following values : 3, 1, 2, 4, 5
(ii) Change the row labels from A, B, C, D, E to Team A, Team B, Team C, Team D and Team E.
(iii) Change the column label of first column from ‘Won’ to ‘Matches won’.

Ans.:

(i) df['Rating'] = [3, 1, 2, 4]
(ii) df.index = ['Team A', 'Team B', 'Team C', 'Team D']
(iii) df.rename(columns={'Won': 'Matches won'}, inplace=True)

[8] Consider the table Customer given below and write SQL commands :

TABLE : Customer

CustIDNameCountryEmailidOrderdate
C1001RajatIndiarajat@gmail.com2022-12-22
C1002MichaelDenmarkmic@yahoo.com2023-11-15
C1003RiyoThailandRi@gmail.com2022-05-06
C1004JenniferS. KoreaJen@gmail.com2022-08-07
C1005SudhaIndiaSud@abc.com2023-01-01
C1006VivekNepalviv@xyz.com2023-04-14

(i) Display the details of all customers who have placed the order in the year 2023.
(ii) Count the total number of customers from India.
(iii) Display the last 9 characters of the email id of all customers of Denmark.

Ans.:

(i) SELECT * FROM Customers WHERE YEAR(OrderDate) = 2023;
(ii) SELECT COUNT(*) AS Total_Customers FROM Customers WHERE Country = 'India';
(iii) SELECT RIGHT(EmailID, 9) AS Email_Last9 FROM Customers WHERE Country = 'Denmark';

[9] Write a program in Python pandas to create series “car” from the following dictionary:

dic={
"Model":["Samurai","Accord","CR-V","Nexon"],
"Brand":["Suzuki","Honda","Honda","Tata"],
"Make":[1993,1997,1997,2021]}

Ans.:

import padas as pd
dic={"Model":["Samurai","Accord","CR-V","Nexon"],
"Brand":["Suzuki","Honda","Honda","Tata"],
"Make":[1993,1997,1997,2021]}
car=pd.Series(dic)

[10] Consider the given DataFrame ‘result’:

 NamePercentile
0Rohit95
1Mohit76
2Raman98
3Aditya47

Write the suitable Python statements for the following :
(i) Add a new column ‘Grade’ to the dataframe having values A,B,A,C,
(ii) Add a new row where Name is ‘Arti’ with percentile as 92 and Grade A
(iii) Display the top 3 rows.

Ans.:

(i) df.set_index('Index', inplace=True)

(ii) df.loc[4] = ['Arti', 92, 'A']

(iii) print(df.head(3))

[11] Riti received a message that she needs to update the KYC for her Bank Account therefore she should upload her Aadhar Card, Bank Account Number and the OTP on the link given in her message.

Answer the following questions :
(i) Should Riti upload the documents and give the OTP on the link?
(ii) Should Riti call her bank immediately to recheck the validity of the message received?
(iii) What is the act mentioned in the message known as?

Ans.:

(i) No, Riti should not upload the documents or share the OTP on the link. This could be a phishing attempt to steal her personal and financial information.

(ii) Yes, Riti should immediately call her bank using the official customer care number (not the one provided in the message) to verify the validity of the request.

(iii) The act mentioned in the message is known as phishing. It is a cybercrime where fraudsters trick individuals into providing sensitive information by pretending to be a legitimate entity.

[12] Briefly explain the term FOSS. Give examples of any 2 Operating Systems that are FOSS.

Ans.:

FOSS (Free and Open-Source Software) refers to software that is both free to use and open-source, meaning its source code is publicly available for anyone to view, modify, and distribute. This promotes collaboration, transparency, and community-driven development.

Examples of FOSS Operating Systems:

  1. Linux – A widely used open-source operating system with various distributions like Ubuntu, Fedora, and Debian.
  2. FreeBSD – A Unix-like open-source operating system known for its security and performance, often used in servers and networking environments.

[13] Write the output (i-iii) for the following SQL commands :

Table : CLUB

SNoActivityFeeDays
1Swimming10000M, W
2Singing8000Th, S
3Dance12000M, W
4Drawing7000T, Th
5Craft8000F, S
6Cooking9000T, F

(i) SELECT COUNT(*) FROM CLUB;
(ii) SELECT SUM(Fee) FROM CLUB;
(iii) SELECT LEFT(Activity,2) FROM CLUB WHERE Days=’M,W’;

Ans.:

(i) COUNT(*)
   ----------
            6
(ii) SUM(Fee)
     ---------
         54000 
(iii)  LEFT(Activity,2)
      ------------------
      Sw               
      Da               

[14] Find the output of the following:
(i) SELECT MID(“Exam”,1,2);
(ii) SELECT MONTHNAME(“2023-05-30”);
(iii) SELECT MONTH(“2023-03-05”);

Ans.:

(i) MID("Exam",1,2) 
   -----------------
   Ex              
(ii) MONTHNAME("2023-05-30") 
     -------------------------
     May                     
(iii) MONTH("2023-03-05") 
      ---------------------
                          3

[15] Predict the output of the following SQL queries :
(i) SELECT LENGTH(“GOOD LUCK”);
(ii) SELECT POWER(3, 3);
(iii) SELECT UPPER(“examination”);

Ans.:

(i) LENGTH("GOOD LUCK") 
    ---------------------
                        9
(ii) POWER(3, 3)
    -------------
               27
(iii) UPPER("examination")
      ----------------------
      EXAMINATION          

[16] Consider a Table “PETDATA” with the following data :

Table : PETDATA

IdPnameBreedLifeSpanPriceDiscount
101AdiGolden Retriever15160005
202CandyBoxer112200010
303DazzlerBulldog1018000NULL
404CooperYorkshire Terrier162000012
505AkiraPugNULL250008

Write SQL queries for the following :
(i) Display all the pet names in uppercase.
(ii) Display the total price of all the pets.
(iii) Display the average discount available on all the pets.

Ans.:

(i) SELECT UPPER(Pname) FROM PetData;
(ii) SELECT SUM(Price) FROM PetData;
(iii) SELECT AVG(Discount) FROM PetData;

[17] Write the names of SQL functions to perform the following operations :
(i) Display the name of the month from the given date value.
(ii) Display the day of month from the given date value.
(iii) Count the number of characters in a given string.

Ans.:

(i) SELECT MONTHNAME('2024-02-15') AS Month_Name;
(ii) SELECT DAY('2024-02-15') AS Day_Of_Month;
(iii) SELECT LENGTH('Hanuman') AS Character_Count;

[18] Consider the following Table : ITEM :

IDINAMEPRICEQTY
P1001Sketch Pen20.505
P1002Roller Ball Pen55.001
P1003Gel Pen25.103
P1004Notebook75.801

Find the output of the following SQL queries :
(a) SELECT 10+ QTY FROM ITEM WHERE ID = “P1003”;
(b) SELECT PRICE*QTY FROM ITEM WHERE QTY < 2;
(c) SELECT LEFT(INAME,3) FROM ITEM;

Ans.:

(i) 10+ QTY
    ---------
           13
(ii) PRICE*QTY 
    -----------
          55.00 
          75.80
(iii) LEFT(INAME,3)
      ---------------
      Ske
      Rol           
      Gel           
      Not           

[19] Predict the output of the following SQL queries : 

  1. SELECT TRIM(” ALL THE BEST “)
  2. SELECT POWER(5,2);
  3. SELECT UPPER(MID(“start up India”,10));

Ans.:

1. TRIM("   ALL THE BEST")
  -------------------------
   ALL THE BEST            
2. POWER(5,2) 
  ------------
            25 
3. UPPER(MID("start up India",10))
   ---------------------------------
   INDIA                           

[20] Consider a table “MYPET” with the following data:

Pet_idPet_NameBreedLifeSpanPriceDiscount
101RockyLabrador Retriever12160005
202DukeGerman Shepherd132200010
303OliverBulldog10180007
404CooperYorkshire Terrier162000012
505OscarShih TzuNULL250008

Write SQL queries for the following :

  1. Display the Breed of all the pets in uppercase.
  2. Display the total price of all the pets.
  3. Display the average life span of all the pets.

Ans.:

1. SELECT UPPER(Breed) FROM MYPET;
2. SELECT SUM(Price) FROM MYPET;
3. SELECT AVG(LifeSpan) FROM MYPET;

[21] Write the names of SQL functions to perform the following operations :

  1. Display name of the Month from your date of birth.
  2. Convert email-id to lowercase.
  3. Count the number of characters in your name.

Ans.:

1. SELECT MONTHNAME('2000-05-15');
2. SELECT LOWER('TutorialAICSIP@GMAIL.com');
3. SELECT LENGTH('TutorialAICSIP');

[22] Consider the following table: PRODUCT

PIDPNAMEPRICEQUANTITY
P1OO1Eraser10.505
P1002Ball Pen15.002
P1003Gel Pen25.103
P1004Ruler5.001

Find the output of the following SQL queries :

  1. SELECT 10+M0D(QUANTITY,3) FROM PRODUCT WHERE PNAME=”Eraser”;
  2. SELECT ROUND(PRICE,2)*QUANTITY FROM PRODUCT WHERE QUANTITY > 2;
  3. SELECT UCASE(RIGHT(PNAME,2)) FROM PRODUCT;

Ans.:

1. 10 + MOD(QUANTITY,3)
   ----------------------
                       12
2. ROUND(PRICE,2)*QUANTITY
   -------------------------
                   52.50 
                   75.30
3. UCASE(RIGHT(PNAME,2))
   -----------------------
   ER                    
   EN                    
   EN                    
   ER                    

[23] Consider the table Patient given below and write SQL commands.

Table : Patient

PatientidNameCityPhoneDateofadmDe artment
1000001Ritvik GarDelhi684762132021-12-10Sur e
1000002Rahil AroraMumbai365463212022-01-08Medicine
1000003Mehak BhattDelhi684218792022-02-02Cardiology
1000004Soumik RaoDelhi265432662022-01-11Medicine
1000005Suresh SoodBan alore654324422021-03-09Sur
  1. Display the details of all patients who were admitted in January.
  2. Count the total number of patients from Delhi.
  3. Display the last 2 digits of the Patientid of all patients from Surgery Department.

Ans.:

1. SELECT * FROM Patient WHERE MONTH(Dateofadm) = 1;
2. SELECT COUNT(*) FROM Patient WHERE City = 'Delhi';
3. SELECT RIGHT(Patientid, 2) FROM Patient WHERE Department = 'Surgery';

[24] Kavyanjali, a chemical analyst, needs to arrange data of few elements in the form of two series containing symbols and their atomic numbers respectively. Thereafter, the data of these two series has to be arranged and displayed in the form of Data Frame as shown below :

 SymbolAtomic Number
HydrogenH1
HeliumHe2
LithiumLi3
BerylliumBe4

Help her in writing suitable Python code to complete the task.

import pandas as pd
sym=pd.Series(['H','He','Li','Be'],index=['Hydrogen','Helium','Lithium','Beryllium'])
num=pd.Series([1,2,3,4],index=['Hydrogen','Helium','Lithium','Beryllium'])
df=pd.DataFrame({'Symbol':sym,'Atomic Number':num})
print(df)

[25] Consider the given DataFrame ‘health’.  

 DiseasenameAgent
0Common coldVirus
1ChickenpoxVirus
2CholeraBacteria
3TuberculosisBacteria

Write suitable Python statements for the following :

  1. Remove the row containing details of disease named Tuberculosis.
  2. Add a new disease named ‘Malaria’ caused by ‘Protozoa’.
  3. Display the last 2 rows.

Ans.:

1. health = health[health['Diseasename'] != 'Tuberculosis']

2. new_disease = pd.DataFrame({'Diseasename': ['Malaria'], 'Agent':['Protozoa']})
health = pd.concat([health, new_disease], ignore_index=True)

3. print(health.tail(2))

[26] Manohar received an email from a company, named Makemoney Pvt. Ltd., claiming that Manohar has won lakhs m a survey done online. In order to claim the prize money, he was required to answer few security questions such as his Name, Account number, PAN card details, Phone number and OTP for verification purposes. For this, he had to click on the link provided in the email. Answer the following questions :

  1. Should Manohar give the required details to the company ?
  2. What is the activity depicted above?
  3. What should he do with this email ? 

Ans.:

  1. No, Manohar should not provide any personal or financial details to the company. This email is most likely a scam designed to steal his sensitive information.
  2. The activity described is called phishing. Phishing is a fraudulent attempt to obtain personal and financial information by pretending to be a trustworthy entity through emails, messages, or fake websites.
  3. Do not click on any links or download attachments in the email. Do not share any personal or financial information. Report the email as spam/phishing to his email provider. Delete the email immediately.If he has already shared any details, he should contact his bank and take necessary security measures (e.g., changing passwords, blocking cards, etc.).

[27] What do you understand by the term Hacking ? Write any two measures that one should take to avoid being the victim of hacking.

Ans.:

Hacking refers to the act of gaining unauthorized access to a computer system, network, or data. It is often done to steal, modify, or destroy information. While ethical hackers use their skills to improve security, malicious hackers exploit vulnerabilities for personal gain or harm.

Two Measures to Avoid Being a Victim of Hacking:

  1. Use Strong Passwords and Enable Two-Factor Authentication (2FA):
    • Create complex passwords with a mix of letters, numbers, and special characters.
    • Enable 2FA for an extra layer of security.
  2. Keep Software and Antivirus Updated:
    • Regularly update operating systems, applications, and antivirus software to fix security vulnerabilities.
    • Avoid downloading software from untrusted sources.

[28] Write the output (i-lii) for the following SQL commands.

Table : FASHION

IDProductPriceQTY
F01Kajal97010
F02Foundation210015
F03Night Cream170020
F04DayCream140010
F05Shampoo120025
F06Lipstick85032
  1. SELECT COUNT(product) FROM FASHION;
  2. SELECT SUM(Price *Qty) FROM FASHION WHERE product=”Night Cream” ,
  3. SELECT LEFT(Product, 4) FROM FASHION WHERE price>1500;

Ans.:

1. COUNT(product)
  ----------------
                 6
2. SUM(Price *Qty)
  -----------------
           34000.00
3. LEFT(Product, 4) 
  ------------------
  Foun             
  Nigh             

[29] Find the output of the following SQL queries .                                                         

  1. SELECT SUBSTR (“CLIMATE CHANGE” , 4 , 4) ;
  2. SELECT UCASE(RIGHT (“Pollution” , 3) ) ;
  3. SELECT LENGTH (“HAPPY”) +3;

Ans.:

1. SUBSTR("CLIMATE CHANGE" , 4 , 4)
   ----------------------------------
   MATE                             
2. UCASE(RIGHT ("Pollution" , 3))
  ---------------------------------
   ION     
3. LENGTH("HAPPY") + 3
  --------------------
                     8                   

Watch this video to learn more:

4 Marks questions – Important PYQs Informatics Practices Class 12

[1] Ms. Sridevi is a placement head in a reputed engineering institute and has created the following table to store the records of students getting placement in various companies :
Table : Placement

CompidCompany NameVacanciesAppearedDepartmentDoJCity
CP01Rising Star20300Networking2020-07-02Bengaluru
CP02Smoke Ring30350Web Development2019-07-12Chennai
CP03Pilot15421Cloud2020-08-12Bengaluru
CP04Jingle10145Servers2019-01-23Hyderabad
CP05Neel Zone17568Data Analytics2018-09-02Bengaluru
CP06Hard Talk12276Marketing2020-07-02Hyderabad

Based on the given table, help Ms. Sridevi to write SQL queries for performing the following tasks :
(i) To list names of those companies where department is either Marketing or Networking.
(ii) To display the joining month name for Rising Star company.

Ms. Sridevi has written following queries. Write the output of each query :
(iii) SELECT LEFT (CompanyName, INSTR(CompanyName,”R”)) FROM Placement where vacancies >=20;
(iv) SELECT CompanyName FROM Placement WHERE Vacancies < 20 AND Appeared >300;

Ans.:

(i) select companyname from placement where department = 'marketing' or department='networking';
(ii) select month(doj) from placement where companyname='rising star';
(iii) LEFT (CompanyName, INSTR(CompanyName,"R"))
      --------------------------------------------
      R                                          
      Smoke R                                    
(iv) CompanyName
     -------------
     Pilot       
     Neel Zone

[2] Ms. Shambhavi, a data analyst working on a college admission project, has created the following DataFrame Sub_Details to store subjectwise details :

SubjectTotal StudentsSeat Availability
English50No
IT45Yes
AI40Yes
CS50No
CA47Yes

Help her by answering the following questions :
(i) Write suitable Python command to display the row having index value 3
(ii) Predict the output of the following Python statement :
print(Sub_Details.loc[2:3,’Total Students’])
(iii) Write suitable Python statement to display the list of various subjects along with their corresponding seat availability.
OR [option for part (iii) only]
Ms. Shambhavi has just created a folder named Project in the E: drive of her computer to store necessary files related to the project. Write suitable Python statement to export the given DataFrame into the file stud.csv, created inside project folder in E: drive.

Ans.:

(i) print(sub_details[sub_details.index==3])
(ii) 
2    40
3    50
Name: Total Students, dtype: int64
(iii) print(sub_details.loc[:,['Subject','Seat Availability']])
OR
sub_details.to_csv("E:\\project\\stud.csv")

[3] Consider the following table Student :
Table : STUDENT

AdmnNameClassOptionalMarks
1001Tony10AI90
1002Ivana11IP95
1003Nick10IT85
1004Sandy11IP80
1005Kavya11IP9

Write SQL queries for the following :
(a) Display the Total Marks secured by students of each class.
(b) Display the Average Marks secured by the students of IP optional subject.
(c) Display the total number of students in each Class where the number of students are more than 2.
OR
(c) Display the maximum and minimum marks secured in each optional subject.

(a) select class, sum(marks) from students group by class;
(b) select optional, avg(marks) from students where optional='IP';
(c) select class, count(*) from students group by class having count(*)>2;
OR
select optional,min(marks),max(marks) from students group by optional;

[4] Consider the following dataframe ‘Employee’:

EIDENameDepartmentSalary
1JohnIT50000
2RiaMKT45000
3ShobhitIT55000
4AdityaMKT60000
5RashiADMIN52000

(a) Write Python statement for the DataFrame ’employee’
(i) To remove the column salary
(ii) To remove the row having index 4.
(b) Write python statement to save the DataFrame ’employee’ to a ‘CSV’ file data.csv stored in D:drive of the computer.

OR

(b) Write a Python statement to display the new salary i.e., salary increased by 5000 for all employees.

(a) 
(i) employee.drop(columns='Salary',axis=1,inplace=True)
(ii) employee.drop(4,axis=0,inplace=True)

(b) employee.to_csv('d:\\data.csv') 
OR
(b) print(employee['Salary']+5000)

[5] Consider the Table FURNITURE with the following data :

S.No.ItemTypePriceStockdate
1HammockBedroom35500.582020-04-21
2DivanLiving310002019-03-18
3BookshelfStudy38000.6572019-01-10
4Writing DeskLiving61357.4252020-10-18
5NightstandBedroomNULL2021-07-23

Write SQL queries for the following :
(a) Display all the records in alphabetical order of Item.
(b) Display the Type and total number of items of each Type.
(c) Display the highest Price.
(d) Display the Item with their price rounded to 1 decimal place.

(a) select * from furniture order by item;
(b) select type, count(*) from furniture group by type;
(c) select max(price) from furniture;
(d) select item, round(price,1) from furniture;

[6] Consider the following table : EMPLOYEE

EcodeEnameAreaSalaryDeptDoj
S001RameshNorth12000Sales2015-12-01
S002RohitSouth10500Finance2012-08-01
S003SunilSouth6800Front Office2018-02-01
S004SambhavWest28000Back Office2010-04-01
S005AnkitEast9000NULL2018-10-01
S006RishuNorth25000Finance2019-02-01

Predict the output for the following SQL queries :
(i) SELECT MAX(Salary) FROM EMPLOYEE;
(ii) SELECT COUNT(Dept) FROM EMPLOYEE;
(iii) SELECT UCASE(Ename) FROM EMPLOYEE WHERE MONTH(Doj)=2;
(iv) SELECT Ename FROM EMPLOYEE WHERE Right(Ecode,1)=5;

(i) MAX(Salary)
    -------------
            28000
(ii) COUNT(Dept)
     -------------
                 5
(iii) UCASE(Ename)
      --------------
      SUNIL        
      RISHU     
(iv) Ename
    -------
     Ankit 

[7] Based on the given table EMPLOYEE write SQL queries to perform the following operations:
(i) Count the total number of employees.
(ii) Display the minimum salary from each area.
(iii) Display the average salary from each department where number of employees is more than 1.
(iv) Display all the records in descending order of date of joining.

Ans.:

(i) select count(*) from employee;
(ii) select area,min(salary) from employee;
(iii) select dept, avg(salary) from employee group by dept having count(*)>1;
(iv) select * froom employee order by doj desc;

[8] ABC Private Ltd., Bangalore has different divisions, Finance (A1), Sales (A2), Production (A3) and Marketing (A4).

The layout of the Bangalore branch is :

networking competency based question for class 12 IP

The company also has a branch in Shimla. The management wants to connect all the divisions as well as all the computers of each division (A1, A2, A3, A4).
Distance between the branches are as follows :

A3 to A125 m
A1 to A240 m
A2 to A425 m
A4 toA3120 m
A3 to A2990 m
A1 to A4170 m

The number of computers in each branch is as follows :

A150
A240
A3110
A460

Based on the above specifications, answer the following questions :
(a) Suggest the topology and draw the most suitable cable layout for connecting all the divisions of Bangalore branch.

Ans.:

most suitable cable layout for connecting all the divisions

As per server placement

as per short distance

(b) Suggest the kind of network required (out of LAN, MAN, WAN) for connecting Production (A3) with Shimla branch.

Ans.: WAN

(c) Suggest the placement of the following devices :
(i) Repeater
(ii) Switch/Hub

Ans.:

(i) Repeater should be placed between A3 and A2 wings
(ii) Switch/Hub should be placed in all divisions A1, A2, A3 and A4

(d) The company wanted to develop a healthy relation among the employees, therefore the HRA planned an online session with everyone so that they could play games from their devices. Suggest the protocol that helped to send the voice signals over Internet.

Ans.: VoIP or Voice Over Internet Protocol

[8] Consider the table : ITEM

SNoItemnameTypePriceStockdate
1ChaisesLiving11500.582020-02-19
2Accent ChairsLiving31000.672021-02-15
3Baker RacksKitchen25000.6232019-01-01
4SofaLiving7000.32020-10-18
5NightstandBedroomNULL2021-07-23

Write SQL queries for the following :

  1. Display all the records in descending order of Stockdate.
  2. Display the Type and total number of items of each Type.
  3. Display the least Price.
  4. Display the Itemname with their price rounded to 1 decimal place.

Ans.:

1. select * from item order by stockdate desc;
2. select type,count(*) from item group by type;
3. select min(price) from item;
4. select itemname,round(price,1) from item;

[9] Consider the table : SALESMAN

ScodeSnameAreaQtysoldDateofjoin
soo1RaviNorth1202015-10-01
s002SandeepSouth1052012-08-01
s003SunilNULL682018-02-01
s004SubhWest2802010-04-01
s005AnkitEast902018-10-01
s006RamanNorthNULL2019-12-01

Predict the output for the following SQL queries :

  1. SELECT MAX(Qtysold), MIN(Qtysold) FROM SALESMAN;
  2. SELECT COUNT (Area) FROM SALESMAN;
  3. SELECT LENGTH (Sname) FROM SALESMAN WHERE MONTH(dateofjoin)=10;
  4. SELECT Sname FROM SALESMAN WHERE RIGHT(Scode,1)=5;

Ans.:

1. MAX(Qtysold)  MIN(Qtysold)
  -------------- --------------
             280            68
2. COUNT(Area)
-------------
           5 
3. LENGTH (Sname)
  ----------------
                4 
                5
4. Sname
   -------
   Ankit 

[10] Based on the given table SALESMAN write SQL queries to perform the following operations :

  1. Count the total number of salesman.
  2. Display the maximum qtysold from each area.
  3. Display the average qtysold from each area where number of salesman is more than 1.
  4. Display all the records in ascending order of area.

Ans.:

1. select count(*) from salesman;
2. select area, min(qtysold) from salesman group by area;
3. select area, avg(qtysold) from salesman group by area having count(*)>1;
4. select * from salesman order by area asc;

[11] ABC International School, Delhi has different wings Administrative Wing (WI), Primary Wing (W2), Middle Wing(W3) and Secondary Wing(W4) as shown in the diagram :

The school also has a branch in Mumbai. The school management wants to connect all the wings as well as all the computers of each wing (WI, W2, W3, W4).

Last 3 years Important PYQs Informatics Practices Class 12

Distance between the wings are as follows :

W3 TO W185 m
W1 TO W240 m
W2 TO W425 m
W4 TO W3120 m
W3 TO W2150 m
W1 to W4170 m

Number of computers in each of the wing:

 W1125
 W2 40
 W342
 W460

Based on the above specifications, answer the following questions :

  1. Suggest the topology and draw the most suitable cable layout for connecting all the wings of Delhi branch.
  2. Suggest the kind of network required (out of LAN, MAN, WAN) for connecting
    • Administrative Wing (WI) with Middle Wing (W3)
    • Administrative Wing (WI) with the Mumbai branch.
  3. Suggest the placement of the following devices with justification :
    • Repeater
    • Switch/Hub
  4. Due to pandemic school had to adopt Online classes. Suggest the protocol that is used for sending the voice signals over internet. Also, give an example of an application of WWW that helped the teachers to send messages instantly to the students.

Ans:

1.

Cable Layout
Last 3 years Important PYQs Informatics Practices Class 12

2. a) LAN b) WAN

3.

(a) Repeater to be placed based on layout drawn in part(i), between two physically connected buildings wherever the distance between the two buildings is more.
(b) Switch/Hub to be placed in all wings W1, W2, W3 and W4 as each of the buildings has more than one computer.

4. Protocol name : VoIP OR Voice Over Internet Protocol WhatsApp, Slack, Skype, Yahoo Messenger, Google Talk, Facebook Messenger, Google Hangout, Instant Messenger
Any of the above or any other correct example of an application of WWW for instant messaging.

[12] Consider the following table schooldata:

Admno            Name Grade Club Marks Gender
20150001Sargam Singh  12       STEM86Male
20140212   Alok Kumar10SPACE75Male
20090234  Mohit Gaur   11SPACE           84Male
20130216 Romil Malik 10READER91Male
20190227  Tanvi Batra  11STEM70Female
20120200Nomita Ranjan12STEM64Female

Write SQL Queries for the following:

(i) Display the average marks secured by each gender

(ii) Display the minimum marks secured by the students of grade 10

(iii) Display the total number of students in each club where number of students are more than 1

(iv) Display the minimum and maximum marks secured by each gender

Ans.:

(i)  select gender, avg(marks) from schooldata group by gender;
(ii) select min(marks) from schooldata where grade=10;
(iii)  select club, count(*) from schooldata group by club having count(*)>1;
(iv) select gender, min(marks), max(marks) from schooldata group by gender;

[13] Consider the following DataFrame mdf:

RollnoNameEnglishHindiMaths
01Aditya232028
12Balwant18125
23Chirag272330
34Deepak1137
45Eva172124

(A) Write Python statements for the DataFrame ‘mdf’:

(i) To display the records of the students having roll numbers 2 and 3.

(ii) To increase the marks of subject Math by 4, for all students.

(B) Write Python statement to display the Rollno and Name of all students who secured less than 10 marks in Maths.

OR
(Option for Part B only)

Write Python statement to display the total marks, i.e., sum of marks secured in English, Hindi, and Maths for all students.

Ans.:

(A)
(i) print(df[df["Rollno"].isin([2, 3])])   or
    print(mdf[mdf.Rollno.isin([2, 3])])    or
    print(mdf[(mdf["Rollno"] == 2) | (mdf["Rollno"] == 3)]) or
    print(mdf.query("Rollno == 2 or Rollno == 3"))
(ii) mdf["Maths"] += 4

(B) print(mdf[mdf["Maths"] < 10][["Rollno", "Name"]])  or
    print(mdf[mdf.Maths < 10][["Rollno", "Name"]])     or
    print(mdf.query("Maths < 10")[["Rollno", "Name"]])

OR (Option for Part B Only)
print(mdf.English + mdf.Hindi + mdf.Maths) or
print(mdf['English'] + mdf['Hindi'] + mdf['Maths'])

Watch this video to learn more:

5 Marks questions – Important PYQs Informatics Practices Class 12

[1] Consider the tables Faculty and Batch given below :

Table : Faculty

F_IdFacNameDoJQualificationSalary
Emp01Neeta Khanna2013-07-01MCA85000
Emp02Sonia Chawla2023-05-05MA35000
Emp03Sheetal2015-06-28MSc90000
Emp04Bindu2016-03-30M.Com80000
Emp05Sunidhi2002-06-28BA100000
Emp06Ashish1999-07-01B.Com120000

Table : Batch

BatchidBatchNameF_IdDaysperweekSubjects
B01TXAlphaEmp013English
B02TXBetaEmp055Chemistry
B03TXGamaEmp024Physics
B04Super30Emp033Mathematics
B05G-20EMp042Economics
B06LXAlphaEmp014Accountancy

Write SQL queries for the following :
(i) Display name and salary of all faculties in alphabetical order of their names.
(ii) Display details of faculties who joined on Monday.
(iii) Display names of faculties, their salary and BatchName from both the tables.
(iv) Display the details of all faculties whose salary is more than 60000 and have joined before the year 2007.
(v) Display the name of faculty who is taking TXAlpha Batch.

(i) select facname, salary from faculty order by facname;
(ii) select * from faculty where dayname(doj)='Monday';
(iii)  select facname, salary, batchname from faculty, batche where faculty.f_id=batche.f_id;
(iv) select * from faculty where salary>60000 and year(doj)<2007; or
     select * from faculty where salary>60000 and doj<'2007-01-01';
(v) select facname from faculty, batche where faculty.f_id=batche.f_id and batchname='txalpha';

[2] Write Queries for following:

(i) Display maximum days per week for each F_Id from the table Batch.
(ii) Display names of faculties after removing leading and trailing spaces.
(iii) Display total number of records in the table Faculty.
(iv) Increase the salary by 25% of those employees whose qualification is MCA.
(v) Delete the records of batches whose subject is English.

Ans.:

(i) select f_id,max(daysperweek) from batche group by f_id;
(ii) select trim(facname) from faculty;
(iii) select count(*) from faculty;
(iv) update faculty set salary=salary + salary*0.25 where qualification='MCA';
(v) delere from batche where subjects='English';

[3] Classpoint Pvt. Ltd., Pune is a company that deals with development and training of software. They have different divisions HR (H1), Training (H2), Sales (H3) and Marketing (H4). The layout of the Pune branch is :

Q-34 IP class 12 Comppartment paper

The management wants to connect all the divisions as well as all the computers of each division (H1, H2, H3 and H4).

Distance between the divisions are as follows :

H1 to H290m
H1 to H3145m
H1 to H488m
H2 to h3110m
H2 to H480m
H3 to H4160m

Number of computers in each division :

DivisionNumber of computers
H1100
H2220
H3160
H4140

Based on the above specifications, answer the following questions :
(i) Suggest the topology and draw the most suitable cable layout for connecting all the divisions.
(ii) Classpoint Pvt. Ltd. plans to establish a new office in Dubai. Out of LAN, MAN and WAN, what kind of network will be created to connect Pune office with Dubai office ?
(iii) Suggest the division for the placement of server in Pune office. Explain the reason for your selection.
(iv) Suggest the placement of switch/hub with justification.
(v) Ms. Abhilasha, working in Dubai office, is creating a software for conducting program for the employees of Pune branch. Which protocol would help her in voice transmission over a computer network ?

Ans.:

(i)

Last 3 years Important PYQs Informatics Practices Class 12

(ii) WAN

(iii) Server should be placed in H2 (Training) division as it has the maximum number of computers.

(iv) Switch/hub should be placed in all blocks as it is used to connect computers within each building.

(v) VOIP/Voice over Internet Protocol

[4] Akriti keeps the calorie count of different food items as follows :
Food=[‘Apple’,’Banana’,’Rice’,’Wheat’,’Carrot’]
Calorie=[72,105,204,455,52]
Write a Python code to generate a Bar Chart on the given data, having suitable Chart Title and labels for X and Y axis. Also add suitable statement to save this chart with the name calorie.png.

Ans.:

import matplotlib.pyplot as plt
Food=['Apple','Banana','Rice','Wheat','Carrot']
Calorie=[72,105,204,455,52]
plt.bar(Food, Calorie)
plt.title("Calorie count of different food items")
plt.xlabel("Food")
plt.ylabel("Calorie")
plt.savefig("calorie.png")
plt.show()

[5] Consider the following data :

YearStudent Strength
2019150
2020180
2021240
2022120
2023180

Write a Python code to draw the following line chart having title and labels for x and y axis as shown below :

line chart ip class 12 5 mark question

Also give suitable Python statement to save this chart with name, stud.png.

Ans.:

import matplotlib.pyplot as plt
Year=['2019', '2020', '2021', '2022', '2023']
Strength=[150, 180, 240, 120, 180]
plt.plot(Year, Strength)
plt.title("Year Wise Students Strength in Class XII")
plt.xlabel("Year")
plt.ylabel("Student Strength")
plt.savefig("stud.png")
plt.show()

[6] Write the SQL queries which will perform the following operations:
(i) To display the day part from your date of admission, which is “2023-12-13”.
(ii) To convert your father’s email id ‘xyz@abc.com’ to uppercase.
(iii) To count the number of characters in the string ‘India’.
(iv) To display today’s day name i.e. Sunday or Monday
(v) To display your height 5.41 after rounding off to 1 decimal place.

Ans.:

(i) SELECT DAY('2023-12-13');
(ii) SELECT UPPER('xyz@abc.com');
(iii) SELECT LENGTH('India'); 
(iv) SELECT DAYNAME(CURDATE()); 
(v) SELECT ROUND(5.41, 1);

[7] Explain the following SQL functions using suitable examples:
(i) LTRIM( )
(ii) RTRIM( )
(iii) INSTR( )
(iv) MOD( )
(v) TRIM( )

Ans.:

Here’s a brief explanation of each function with an example:

1. LTRIM( )

Removes leading (left-side) spaces from a string.

SELECT LTRIM('   Hello World') AS Result;
Output: 'Hello World' (removes spaces before "Hello")

2. RTRIM( )

Removes trailing (right-side) spaces from a string.

SELECT RTRIM('Hello World   ') AS Result;
Output: 'Hello World' (removes spaces after "World")

3. INSTR( )

Finds the position of a substring within a string (1-based index).

SELECT INSTR('Hello World', 'World') AS Position;
Output: 7 (because 'World' starts at the 7th character)

4. MOD( )

Returns the remainder of a division operation.

SELECT MOD(10, 3) AS Remainder;
Output: 1 (10 divided by 3 gives remainder 1)

5. TRIM( )

Removes both leading and trailing spaces from a string.

SELECT TRIM('   Hello World   ') AS Result;
Output: 'Hello World' (removes spaces from both sides)

[8] AWESOME Private Ltd, Dehradun is a company that deals with hardware components. They have different divisions HR (A1), Sales (A2), Production (A3) and Marketing (A4). The layout of the Dehradun branch is :

Important PYQs Informatics Practices Class 12

The company also has a branch in Mumbai. The management wants to connect all the divisions as well as the computers of each division (A1, A2, A3, A4).

Distance between the wings are as follows :

A3 to A132m
A1 to A253m
A2 to A429m
A4 to A3110m
A3 to A2750m
A1 to A4200m
Dehradun Head Office to Mumbai Office1656 KM

Number of computers in each wing :

A170
A2140
A355
A470

Based on the above specifications, answer the following questions :
(a) Suggest the topology and draw the most efficient cable layout for connecting all the divisions of the Dehradun branch.
(b) Suggest the kind of network required (out of LAN, MAN, WAN) for connecting Production (A3) with Sales (A2).

(c) Suggest the placement of the server. Explain the reasons for your selection.
(d) Suggest the placement of the Switch/Hub device with justification.
(e) The company wants to do a collaborative project where the employees of Dehradun and Mumbai would collaborate and do the project. Therefore, the HR planned a series of webinars that employees could attend from their devices being online. Suggest the protocol that helped to send the voice signals over the Internet. Also, give an example of a video conferencing software that helps to connect all the employees.

Ans.:

(a)

Last 3 years Important PYQs Informatics Practices Class 12

(b) LAN

(c) Placement : SALES (A2) It has maximum number of computers.

(d) One switch/hub in each division. A switch/hub will be placed in each division to interconnect devices present in that division.

(e) Protocol: VoIP or Voice over Internet protocol – Example of video conferencing software: Google Meet, Zoom, Webex, MS Teams, Whereby (Any One)

[9] Consider the following graph. Write the Python code to plot it. Also add the Title and Label for X and Y axis.
Use the following data to draw the graph.

ClassMarks
783
875
981
1072
1188
1286
Last 3 years Important PYQs Informatics Practices Class 12

Ans.:

import matplotlib.pyplot as plt
cl = [7,8,9,10,11,12]
avmarks=[83,75,81,72,88,86]
plt.plot(cl,avmarks)
plt.title("AVERAGE RESULT OF CLASS VII-XII")
plt.xlabel('CLASS')
plt.ylabel('AVERAGE MARKS SCORED')
plt.show()

Marking scheme:

MarkFor
1correct import statement
1correct plot() function
1correct use of title
½ + ½correct use of xlabel, ylabel
1correct use of show()

[10] Write a Python code to draw the following bar graph representing the average marks secured by each student in Term-2 Exam. Add the Title and Label for X-axis and Y-axis. Use the following data to
draw the graph :

NamesAverage Marks
Ruby84
Yugesh92
Vishesh45
Rakesh72
Last 3 years Important PYQs Informatics Practices Class 12

Ans.:

import matplotlib.pyplot as plt
names = ['ruby','yugesh','Vishesh','Rakesh']
averagemarks=[84,92,45,72]
plt.bar(names,averagemarks)
plt.title("RESULT OF TERM-2 EXAM")
plt.xlabel('STUDENT NAMES')
plt.ylabel('AVERAGE MARKS SCORED')
plt.show()
MarkFor
1correct import statement
1correct bar() function
1correct use of title
½ + ½correct use of xlabel, ylabel
1correct use of show()

[11] Write the SQL queries which will perform the following operations :

(i) To display the year from your Date of Admission which is ‘2023-05-15’.

(ii) To convert your email id ‘ABC@XYZ.com’ to lowercase.

(iii) To remove leading spaces from a string ‘ my country’.

(iv) To display current date.

(v) To display the value of 106.

Ans.:

(i) SELECT YEAR('2023-05-15');
(ii) SELECT LOWER('ABC@XYZ.com');
(iii) SELECT LTRIM(' my country'); 
(iv) SELECT CURDATE(); 
(v) SELECT POW(10,6);

[12] Consider a table PRODUCT with the following data:

SNOItemnameCompanyStockdatePriceDiscount
1Monitor HP2021-12-2015499.73915
2WebcamLogitech2020-02-034890.905
3KeyboardLogitech2022-08-191878.98530
4MouseHCL2021-05-161200.007
5SpeakersiBa112021-10-19NULL25

Write SQL queries using SQL functions to perform the following operations:                                               

(i) Display the first 3 characters of all Itemnames

(ii) Display the names of all items whose Stockday is “Monday”.

(iii) Display the total price of all the products.

(iv) Display the maximum Price.

(v) Display the average Price of all the products by the company named ‘Logitech’.

Ans.:

(i) SELECT LEFT(ITEMNAME,3) FROM PRODUCT;
OR
SELECT MID(ITEMNAME,1,3) FROM PRODUCT;
OR
SELECT SUBSTR(ITEMNAME,1,3) FROM PRODUCT;
OR
SELECT SUBSTRING(ITEMNAME,1,3) FROM PRODUCT;
(ii) SELECT ITEMNAME FROM PRODUCT WHERE DAYNAME(STOCKDATE)='MONDAY';
OR
SELECT ITEMNAME FROM PRODUCT WHERE DAYOFWEEK(STOCKDATE)=2;
(iii) SELECT SUM(PRICE) FROM PRODUCT;
(iv) SELECT MAX(PRICE) FROM PRODUCT;
(v) SELECT AVG(PRICE) FROM PRODUCT WHERE COMPANY='Logitech';

[13] XEED Private Ltd., Delhi is a company that deals with educational toys. They have different divisions HR (Al), Sales (A2), Production (A3) and Marketing (A4).

The layout of the Delhi branch is:

Last 3 years Important PYQs Informatics Practices Class 12

The company also has a branch in Bangalore. The management wants to connect all the divisions as well as all the computers of each division (A1,A2,A3,A4).

Distance between the wings are as follows :

A3 to A125 m
A1 to A240 m
A2 to A425 m
A4 to A320 m
A3 to A230 m
A1 to A4170 m
Delhi Head Office to Bangalore Office2154 km

Number of computers in each of the wing :

 A150
 A2 40
 A3110
 A460

Based on the above specifications, answer the following questions :

(i) Suggest the topology and draw the most suitable cable layout for connecting all the divisions of Delhi branch.

(ii) Suggest the kind of network required (out of LAN, MAN, WAN) for connecting Production (A3) with the Bangalore branch.

(iii) Which device can be used to connect the network of Delhi Branch to the Internet ? This device should be able to receive data, analyse it and then transmit it to the network.

(iv) Suggest the placement of switch/hub with justification.

(v) Many employees were finding it difficult to cope up with work pressure and hence were showing stress related symptoms. In order to improve the mental health of its employees, HR planned to conduct an online session with a mental health expert from Mumbai. Out of the options given below, suggest the protocol that will help to send the voice signals over internet to conduct the session successfully.

(a) FTP     (b) SMTP                (c) VOIP                (d) POP

Ans.:

(i)

network layout

(ii) WAN

(iii) Router

(iv)

● Switch/Hub should be placed in all the buildings
● To interconnect nodes in each building

(v) (c) VoIP

[14] Consider the following graph. Write the Python code to plot it. Also add the Title, label for X and Y axis.

Use the following data for plotting the graph:

smarks=[10,40,30,60,55]

sname=[“Sahil”, “Deepak”, “Anil”, “Ravi”, “Riti”]

Last 3 years Important PYQs Informatics Practices Class 12

Ans:

import matplotlib.pyplot as plt
smarks=[10,40,30,60,55]
sname=["Sahil","Deepak","Anil","Ravi","Riti"]
plt.plot(sname,smarks)
plt.title("Marks secured by students in Term - 1")
plt.xlabel('Student Name')
plt.ylabel('Marks Scored')
plt.show()

[15] Write Python code to draw the following bar graph representing the total sales in each quarter. Add the Title, Label for X-axis and Y-axis. Use the following data for plotting the graph:

sales=[450, 300, 500, 650]

qtr=[“QTR1″,”QTR2″,”QTR3″,”QTR4”]

Last 3 years Important PYQs Informatics Practices Class 12

Ans.:

import matplotlib.pyplot as plt
sales=[450,300,500,650] 
qtr=["QTR1","QTR2","QTR3","QTR4"]
plt.bar(qtr,sales)
plt.title("Sales each quarter")
plt.xlabel("Quarter")
plt.ylabel("Sales")
plt.show()

Watch this video to learn more:

Follow this link for more questions:

Important questions IP Class 12

If you are looking for MCQs follow this link:

Important MCQs Class 12 IP

Leave a Reply


Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://api.aspose.cloud/connect/token` resulted in a `429 Too Many Requests` response in /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create() #1 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}() #2 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler() #3 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run() #5 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending() #7 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList() #8 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #9 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/guzzle/src/Client.php(123): GuzzleHttp\Promise\Promise->wait() #10 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/WordsApi.php(50640): GuzzleHttp\Client->send() #11 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/WordsApi.php(50648): Aspose\Words\WordsApi->_requestToken() #12 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/WordsApi.php(50654): Aspose\Words\WordsApi->_checkAuthToken() #13 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/WordsApi.php(50666): Aspose\Words\WordsApi->_getKey() #14 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/WordsApi.php(80): Aspose\Words\WordsApi->_checkRsaKey() #15 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/src/AsposeWords/Util.php(24): Aspose\Words\WordsApi->__construct() #16 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/src/AsposeWords/ExportEngine.php(87): AsposeWords\Util::getWordsApi() #17 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/src/AsposeWords/AutoExport.php(26): AsposeWords\ExportEngine->convert() #18 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-includes/class-wp-hook.php(324): AsposeWords\AutoExport->export() #19 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #20 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #21 /home/u251245109/domains/tutorialaicsip.com/public_html/wp-includes/load.php(1279): do_action() #22 [internal function]: shutdown_action_hook() #23 {main} thrown in /home/u251245109/domains/tutorialaicsip.com/public_html/wp-content/plugins/aspose-doc-exporter/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113