100+ Important and Most expected questions IP Class 12

Most expected questions IP Class 12

In this article, I am going to discuss the most expected questions IP class 12. Informatics Practices with subject code 065 is one of the popular subjects of the CBSE curriculum for the senior secondary school certificate exam. This subject is mostly given to commerce students.

Most expected questions IP Class 12

This article mainly covers the Most expected questions in IP Class 12 for CBSE exam 2023. The topics which are covered in this subject are as follows:

  1. Unit 1 Data Handling using Pandas – I
    • Introduction to Python Libraries – Pandas, Matploltib
    • Data structures in Pandas – Series and Data Frames
    • Series: Creation of Series from – ndarray, dictionary, scalar value; mathematical operations; Head and Tail functions; Selection, Indexing and Slicing
    • Data Frames: creation – from the dictionary of Series, list of dictionaries, Text/CSV files; display; iteration; Operations on rows and columns: add, select, delete, rename; Head and Tail functions; Indexing using Labels, Boolean Indexing
    • Importing/Exporting Data between CSV files and Data Frames
  2. Data Visualization
    • Purpose of plotting; drawing and saving following types of plots using Matplotlib – line plot, bar graph, histogram
    • Customizing plots: adding labels, titles, and legends in plots.
  3. Unit 2: Database Query using SQL
  4. Introduction to Computer networks

Unit 1 Data handling using pandas

So let us start the article Most expected questions IP Class 12 with a Unit 1 data handling using pandas. Here we go!

Important Data handling using pandas MCQ Questions

[1] Which of the following statement will install pandas library in python?

a) Pip install pand as pd

b) pip install pandas as pd

c) pip install pandas.pd

d) pip install pandas

[2] Given a Pandas series called HEAD, the command which will display the first 3 rows is ______.

a) print(HEAD.head(3))

b) print(HEAD.Heads(3))

c) print(HEAD.heads(3))

d) print(head.HEAD(3))

[3] We can create dataframe from:

a) Series

b) Numpy arrays

c) List of Dictionaries

d) All of the above

[4] To create an empty Series object, you can use:

a) pd.Series(empty)

b) pd.Series( )

c) pd.Series(np.NaN)

d) pd.Series(None)

[5] Assertion (A):- While creating a dataframe with a nested or 2D dictionary, Python interprets the outer dict keys as the columns and the inner keys as the row indices.

Reasoning (R):- A column can be deleted using the remove command.

[6] Assertion (A): DataFrame has both a row and column index.

Reasoning (R): .loc() is a label-based data selecting method to select a specific row(s) or column(s) that we want to select.

[7] Assertion (A) : Pandas is an open-source Python library that offers high-performance, easy-to-use data structures and data analysis tools.

Reason (R) : Professionals and developers are using the pandas library in data science and machine learning.

[8] Assertion (A): – When DataFrame is created by using Dictionary, keys of dictionary are set as columns of DataFrame.

Reasoning (R):- Boolean Indexing helps us to select the data from the DataFrames using a boolean vector.

[9] To display First 15 rows of a series object ‘Ser1’, you may write:

a) Ser1.tail(15)

b) Ser1.head()

c) Ser1.head(15)

d) Ser1.tail()

[10] Given a Pandas series called p_series, the command which will display the last 4 rows is ________

a) print (p_series.Tail(4))

b) print (p_series.Tails(4))

c) print (p_series.tail(4))

d) print (p_series.Tails(4))

[11] In Pandas which of the following dataframe attribute can be used to know the number of rows and columns in a dataframe?

a) size

b) index

c) count

d) shape

[12] Consider the below-given series, named Batsman, which command will be used to print 6 as output?

a WD Parnell
b   David Warner
c     RG Sharma
d    KL Rahul
e      Baber Azam
f     Ross Taylor

dtype: object

a) Batsman .index

b) Batsman .length

c) Batsman .values

d) Batsman .size

[13] When a DataFrame is created from List of Dictionaries, then dictionary keys will become ______

a) Column labels

b) Row labels

c) Both of the above

d) None of the above

[14] Assertion (A):- DataFrame has both a row and column index.

Reasoning (R): – A DataFrame is a two-dimensional labeled data structure like a table of MySQL.

[15] Consider the following code and identify the error:

import pandas as pd
s=pd.Series([1,9,6,4],index=['a','b','c'])
print(s)

a) ValueError

b) TypeError

c) IndexError

d) SyntaxError

Data handling using pandas 2 Marks Questions

[1] What do you mean by python libraries? Illustrate your answer with an example.

[2] NumPy stands for what? What is used for?

[3] What do you mean by Pandas? What are three important data structures of pandas?

[4] What do you mean by data structure?

[5] What is Matplolib library? Explain in short.

[6] Differentiate between NumPy and Pandas.

Ans.:

NumPyPandas
DeveloperTravis OliphantWes McKinney
RequiresHomogenous DataHeterogeneous data
ApplicationsUseful in calculationsUseful in data processing applications
Data formatUsed where data is available in Tabular formatUsed for numeric-based data manipulations
Datasethandles small datasethandles large dataset
ToolsNumPy works on ArraysPandas works on Series and DataFrame
SpeedFast in processing compared to PandasSlow in processing compared to NumPy

[7] Samira wants to install python pandas on her laptop. She is not aware of the prerequisite for the same and commands to install it. Help her to understand her requirements and complete her task.

[8] Krish wants to store an individual score of players 34,56,78,23 with appropriate data labels. Which Pandas data structure is used for this purpose? Write a short code to store the values with data labels as names of players.

[9] Lax is confused to understand what is series and how it is helpful in data analysis? Illustrate the answer in short and help him.

[10] Shiv wants to know various ways to create a series. Suggest any four ways to create a series for him.

[11] Identify the error from below given code, rectify errors and rewrite the correct code:

import panda as pd
s=pd.series([99,999,9999],index=1,2,3)
print s

Ans.:

import pandas as pd 
s=pd.Series([99,999,9999],index=[1,2,3]) 
print(s)

[12] Adnan has been given a task to create an empty series. But he is confused about what it is and how to create it. Suggest to him the way to create it and understand what is empty series?

[13] Krushn has given the task to create an empty series with default data type float. Write code for the same and display series.

[14] What are the various ways of accessing series elements?

[15] What do you mean by slicing? How to access series elements using slicing? Explain in short.

[16] Consider the following code and fill in the gaps to get the given output:

import _____________ as pd
s=pd.Series(______,_______)
print(____)
13
23
33
43

[17] Consider the following series and write code to get the given output:

Shikhar23
Virat78
Rohit53
Rahul40
Hardik37
Surya85

Output 1:

Shikhar23
Rohit53
Hardik37

Output 2:

Virat78
Rahul53
Surya85

Ans.:

print(s[::2])
print(s[1::2])

[18] Consider the above data frame and write output for the following code:

print(s[-3:])
print(s[:-3])

Ans.:

Output 1:

Rahul40
Hardik37
Surya85

Output 2:

Surya23
Virat78
Rohit53

[19] Consider the above data frame and write code for the following:

i) Display the records of batsmen who scored more than 50.

ii) Display the runs of Rohit.

Ans.:

i) print(s[s>50])

ii) print(s[‘Rohit’])

[20] What will be the output of the following:

import pandas as pd
s=pd.Series([[34,56,78],[4,3,2]])
print(s)

Ans.:

0 [34, 56, 78]
1 [4, 3, 2]
dtype: object

[21] Consider a given Series , M1. Write a program in Python Pandas to create the series.

 Marks
PT123
WT219
PT258
WT221

Ans.:

import pandas as pd
M1=pd.Series([23,19,58,21],index=['PT1','WT1','PT2','WT2'])
print(M1)

[22] Given two series S1 and S2

S1
P23
Q14
R19
S24
S2
P17
Q17
T17
U17

Find the output for the following python pandas statements.

a. S1[ : 2]*100

b. S1 * S2

Ans.:

a)

Steps:

  • S1[:2] returns the values at 0 and 1 index – 23 and 14.
  • Now its multiplies by 100.
  • So the final values are 2300 and 1400

Output:

P    2300
Q    1400
dtype: int64

b) It performs multiplication with matched values and the rest will be shown NaN.

Output:

P    230.0
Q    140.0
R      NaN
S      NaN
T      NaN
U      NaN
dtype: float64

[23] Carefully observe the following code:

import pandas as pd
L=[[1,'Adnan',68],[2,'Krish',56],[3,'Krishn',55],[4,'Laksh',45],[5,'Shiv',52]]
df=pd.DataFrame (L, columns=['Rno','Name','Marks'])
print(df)

i. Write the statement to print shape of dataframe df

ii. Write statement to print the index and column names of dataframe df

Ans:

i. df.shape
ii. df.index, df.columns

[24] Write a program to create a series objects using a dictionary that stores the number of cities in district of your state.

Note: Assume some districts like Ahmedabad, Baroda, and Bharuch have 44,32,12 cities respectively and the pandas library has been imported as pd_district_cities.

Ans.:

import pandas as pd_district_cities
dis={'Ahmedabad':44,'Baroda':32,'Bharuch':12}
s=pd_district_cities.Series(dis)

[25] Write a program to create a series object using a dictionary that stores the number of students in each section of class XII.

Note: Assume four sections as ‘XII A’, ‘XII B’, ‘ XII C’ and ‘XII D’ with 40, 38, 40, 26 students respectively.

Ans.:

import pandas as pd
d={'XII A':40,'XII B':38,'XII C':40,'XII D':26}
s=pd.Series(d)

[26] Consider the commands below:

import pandas as pd
lst=[10,20]
ds=pd.Series([10,20])

Here lst is a list and ds is a series. Both have same values 10 and 20. What will be the output of the following commands? Justify your answer.

a. print ( lst * 2 )

b. print ( ds * 2 )

Ans.:

a) [10,20,10,20]
b) 0 20
    1 40

[27] What will be the output of the following code:

import pandas as pd
mydata=pd.Series( [‘Delhi’, ‘Mumbai’, ‘Kolkata’, ‘Ahmedabad’] )
print(mydata < ‘Baroda’ )

Ans.:

0    False
1    False
2    False
3     True
dtype: bool

[28] Carefully observe the following code:

import pandas as pd
xiic = {'Arnavee':[34,59], 'Samira':[27,38], 'Ayush':[37,55]}
df = pd.DataFrame(xiic,index=['PT1','PT2'])
print(df)

What will be the output of following:

i) print(df.dtypes)

ii) print(df.axes)

Ans.:

i) 
Arnavee    int64
Samira     int64
Ayush      int64
dtype: object

ii) [Index(['PT1', 'PT2'], dtype='object'), 
Index(['Arnavee', 'Samira', 'Ayush'], 
dtype='object')]

[29 ]Consider the following DataFrame, DF

 RollnoNameClassSectionCGPA
St11AmanIXE8.7
St22PreetiXF8.9
St33KartikeyIXD9.2
St44LakshayXA9.4

Write commands to :

i. Write a statement to print the dimensions of given dataframe

ii. Write a statement to print the number of elements of given dataframe

Ans.:

i) DF.ndim
ii) DF.size or DF.shape[0]*DF.shape[1]

[30] Carefully observe the following code:

import pandas as pd
L=[['XIIC01','Nishtha',65,67],['XIIC02','Rohit',56,54],['XIID04','Laksh',37,43],['XIID05','Krishn',45,48]]
df=pd.DataFrame (L, columns=['ID','Name','PB1','PB2'])
print(df)

i. Write a statement to display the average of Preboard 1 and Preboard 2 marks

ii. Write a statement to display the difference between Preboard 1 and Preboard 2 marks

Ans.:

i. (df.PB1+df.PB2)/2 or (df['PB1']+df['PB2'])/2
ii. df.PB1-df.PB2 or df['PB1']-df['PB2']

Python Pandas 3 marks Questions

Let us begin python pandas 3 marks questions for most expected class IP class 12. Here we go!

[1] Write a Python code to create a DataFrame with appropriate column headings from the list given below:

[[1,’GT vs CSK’,’2023-03-31’], [2,’KEP vs KKE’,’2023-01-04’],

 [3,’LSG vs DC’ , ‘2023-01-04], [4,’SRH vs RR’,’2023-04-02’]]

[2] Write a Python code to create a DataFrame with appropriate column headings and serial numbers as index from starting 1 from the list given below:

[[’Puzzle’,21.8],[’Casino’,18.9],[’Strategy’,17.17]]

[3] Consider the given DataFrame ‘Student’:

 NamePercentage
0Parth71.55
1Dhananjaya83.25
2Kauntey68.69
3Arjun54.35

Write suitable Python statements for the following:

  1. Add a column called grade with the given data: [‘B1’,’A2’,’C2’,’D1’].
  2. Add a new Student named ‘Parantap’ having Percentage 80.5.
  3. Remove the column grade.

[3] Write a Python code to create a DataFrame from the dictionary given below and write the output also:

d={‘Rollno’:[11,23,34],’Names’:(‘Ankit’,’Dhaval’,’Marvin’),’Fees’:[2000,2100,1800]}

[4] Consider the given DataFrame ‘IPL_AUC’:

TeamNameSpentAvailable
0RCB93.25 Cr1.75 Cr
1KKR93.35 Cr1.65 Cr
2CSK9.50 Cr1.50 Cr

Write suitable Python statements for the following:

  1. Write code to create the above dataframe.
  2. Write code to create a series with index as column TeamName and spent amount as data.

[5] Consider the given DataFrame ‘Stock’:

 NamePriceQuantity
0Pen1540
1Pencil1025
2Erasers1025
3Scale1040

Write suitable Python statements for the following:

  1. Display first 3 rows
  2. Display last 2 rows
  3. Display name and price only

[6] Consider the following DataFrame:

 CityBusTerminalsRailwayStations
0Ahmedabad19824
1Baroda14518
2Surat9812
3Bhavnagar747

Write appropriate statements for the following:

i) Display the first two rows only with city and railwaystations

ii) Administrator has written the following code to display data for the last 2 rows and city along with busterminals but not getting the proper results:

df.tail(2,columns=['city','bustermminals'])

Write correct statements to get the desired output.

iii) Write statement to display only column names

[7] DataFrame ‘STU_DF’:

 RollnoNameMarks
011Priya97.5
136Rishi98.0
27Preet98.5
34Vansh98.0

Perform the following operations on the DataFrame stuDF:

i. Iterate dataframe by rows and make sum of marks

ii. Transpose the dataframe

iii. Display the number of rows and columns in tuple form

[8] Consider the following dataframe ndf as shown below :

C1C2C3C4
R1A151.2533True20
R2B131.5241False25
R3C165.3214True15
R4D187.452None28

What will be the output produced by the following statements :-

a. print( ndf.loc [ : , ’C3’ : ] )

b. print( ndf.iloc[2 : , : 3] )

c. print( ndf.iloc [ 1:3 , 2:3 ])

Watch this video to get the answers to above 8 questions:

3 Marks Questions Python Pandas IP Class 12

Python Pandas 4 Marks Important Questions

[1] Vishvesh, a data analyst has designed the DataFrame df that contains data about inter house competition with ‘P01’, ‘P02’, ‘P03’, ‘P04’, ‘P05, and ‘P06’ as indexes shown below. Answer the following questions:

 Schoolparticipantsmeritdemerit
 P01ABPS 160 5 155
 P02LMJ 120 8 112
 P03JKLU 45 6 39
 P04Anandalaya 80 12 68
 P05RPS190 20170
 P06Podar 160 63 223

i) Predict the output of the following python statement:

A) df.shape

B) df[2:4]

ii) Write a Python statement to display the data of the demerit column of indexes P03 to P05.

OR (Option for part ii only)

Write a Python statement to compute and display the product of data of the participants column and merit column of the above given DataFrame.

Ans.:

i)

a) (6,4)

b)

Schoolparticipantsmeritdemerit
P03JKLU45639
P04Anandalaya801268

ii) print(df.loc[‘P03′:’P05′,’demerit’])

OR

print(df.participants*df.merit) or print(df[‘participants’]*df[‘merit’])

[2] Consider the following DataFrame, DFCL with row index S1,S2,S3,S4

 RollnoNameClassSectionCGPAStream
S11201AdityaXIID8.7Science
S21202DevXIB8.9Humanities
S31203KavyaXID9.2Science
S41204SureshXE9.4Commerce

Based on the above dataframe answer the following:

A. Predict the output

i. DFCL.T                        

ii. DFCL.ndim

B.

i. Write a python statement to print no. of columns present in data frame

ii. Write a python statement to print no. rows present in dataframe

OR

Write a python Statement to print the list of rows

Ans.:

A.

i)

S1S2S3S4
Rollno1201120212031204
NameAdityaDevKavyaSuresh
ClassXIIXIXIX
SectionDBDE
CGPA8.78.99.29.4
StreamScienceHumanitiesScienceCommerce

ii) 2

B.

i)

print(DFCL.shape[1]) 
#or 
print(len(DFCL.columns)) 
#or
r,c=DFCL.shape
print(c)
#or
print(len(DFCL.axes[1]))

ii)

print(DFCL.shape[0])
#Or
print(len(DFCL))
#Or
r,c=DFCL.shape
print(r)
#Or
print(len(DFCL.axes[0]))

OR

print(DFCL.to_string(index=False,header=False))
#OR

l=[]
for i,r in DFCL.iterrows():
  lr=[r.Rollno,r.Name,r.Class]
  l.append(lr)

for i in l:
  print(i)

[3] Mr. Kaushik, a data analyst has designed the dataframe DF that contains data about punching time as shown below:

nametime_intime_out
E001Akash7:39 AM1:45 PM
E002Nisha7:42 AM1:45 PM
E003Disha7:45 AM2:00 PM
E004Manisha7:32 AM1:45 PM
E005Mehul7:40 AM1:46 PM

Answer the following questions:

A. Predict the output of the following python statement:

i) print(DF.iloc[3: ])

ii) print(list(DF.index))

B.

i) Write a python statement to print data types used in each column

ii) Write a python statement to check whether data type is empty or not

OR (for option B only)

Write a python Statement to print the all the values column wise

Ans.:

A.

i)

Nametime_intime_out
E004Manisha7:32 AM1:45 PM
E005Mehul7:40 AM1:46 PM

ii) [‘E001′,’E002′,’E003′,’E004′,’E005’]

B.

i) print(DF.dtypes)

ii) print(DF.empty)

or


for i,c in df.iteritems():
  print(c)

[4] Bhargav, a data analyst has designed a series df that contains data about score made by 4 batters in a match as shown below.

Rohit Sharma101
Shubman Gill112
Virat Kohli36
Ishan Kishan17

Answer the following questions:

A. Predict the output of the following python statement:

i) print(s.shape)

ii) print(s*3)

iii) Write a python statement to divide runs by 5 (exclude decimals) for each player individually.

OR (For Part (iii) only)

Write a python statement to display names of players’ index containing ‘sh’.

iv) Write a statement to produce the following output: (Displaying boolean value for players made century)

Rohit SharmaTrue
Shubman GillTrue
Virat KohliFalse
Ishan KishanFalse

Ans.:

i) (4,)

ii)

Rohit Sharma303
Shubman Gill336
Virat Kohli108
Ishan Kishan51

iii) print(s//3)

OR

for i in s.index:
  if 'sh' in i.lower():
    print(i)

iv) print(s>=100)

[5] Consider the following dataframe:

100+ Important and Most expected questions IP Class 12

Write code to do the following: (1 + 1 + 2)

a) Display categories from dataframe       

b) Display Appname, Category, and Rating for app having a rating more than 4

c) Display AppName and installs for sports category apps          

OR (Only for c)

Display the dimensions and shape of given dataframe  

Ans.:

a) print(df.Category) or print(df[‘Category’])

b)

d1=df[df['Rating']>4] or d1=df[df.Rating>4] or d1=df[df.loc[:,'Rating']>4]
print(d1.loc[:,['AppName','Category','Rating']])

c)

d1=df[df['Category']=='Sports'] or d1=df[df.Category=='Sports'] or d1=df[df.loc[:,'Category']=='Sports']
print(d1.loc[:,['App','Installs']])

OR

d=df.ndim
s=df.shape
print(d,s)

Data Visualization

In this section, I will cover data visualization’s most important questions for informatics practices class 12. Here we go!

Most important questions Data Visualization 5 Marks

As per sample paper 2023, 5 marks questions will be asked from the topic data visualization. In this section, we will see a few questions from the data visualization chapter for informatics practices class 12. So here we go!

[1] Write python code to plot a bar chart for India’s runs in T20 World cup as shown below:

Data Visualization 5 marks question IP class 12

Apply appropriate labels to the chart and x and y axis.

Ans.:

import matplotlib.pyplot as plt
teams=["Pakistan","Netherlands","South
 Africa","Bangladesh","Zimbabwe","England"]
runs=[160,179,137,184,186,168]
plt.bar(teams,runs,color=['r','g','b','c','m','k'])
plt.title("India's T20W Cup 2022")
plt.xlabel("Teams")
plt.ylabel("Runs")
plt.show()

[2] Write python code to depict the data of India/England semi-final runs by over on line chart. The data is as follows:

Overs51015
India3162100
England5298156
  1. Display the overs as same as given here on x-axis.
  2. Apply the line colours as – India : Blue, England: Red
  3. Apply appropriate labels
  4. Apply chart label – T20W Cup 2022 : Semi-final 2

Ans.:

import matplotlib.pyplot as plt
overs=[5,10,15]
ind=[31,62,100]
eng=[52,98,156]
plt.plot(overs,ind,'b')
plt.plot(overs,eng,'r')
plt.title("T20W Cup Semi-final 2")
plt.xlabel("Overs")
plt.xticks(overs)
plt.ylabel("Runs")
plt.show()

[3] Write python code to plot a bar chart for Library Books as shown below:

100+ Important and Most expected questions IP Class 12

Also give suitable python statement to save this chart.

Ans.:

import matplotlib.pyplot as plt
book=['Maths','IP','Accounts']
qty=[60,40,72]
plt.bar(book,qty)
plt.title("Books in library")
plt.xlabel("Books")
plt.ylabel("Number of Books")
plt.savefig("Books.jpg")
plt.show()

[4] Write a program to plot a line chart based on the given data to depict the runs scored by a batsman in 5 innings.
Innings = [1,2,3,4,5]
Runs = [102,88,98,146,52]

Ans.:

import matplotlib.pyplot as plt
Innings = [1,2,3,4,5]
Runs = [102,88,98,146,52]
plt.plot(Innings,Runs)
plt.show()

[5] Write a python code to draw a histogram of runs scored by 10 players in previous innings. Apply following customizations:

  1. Take bins as 7
  2. Apply title “Player Performance”
  3. Show histogram cumulatively
  4. Apply bar color – red

Ans.:

import matplotlib.pyplot as plt
dt=[34,56,28,89,75,33,45,68,23,90]
plt.hist(dt,7,color='red',cumulative=-1)
plt.title("Player Performance")
plt.show()

[6] Observe the following figure. Write code for same:

100+ Important and Most expected questions IP Class 12
import matplotlib.pyplot as plt
city=['Ahmedabad','Vadodara','Surat','Patan','Bharuch']
max_temp=[32,28,39,31,27]
min_temp=[25,22,30,24,20]
plt.plot(city,max_temp,color='red')
plt.plot(city,min_temp,color='blue')
plt.xlabel("City")
plt.ylabel("temperature")
plt.title("Temprature")
plt.yticks([20,25,30,35,40])
plt.show()

[7] Observe the following chart and write code for the following:

100+ Important and Most expected questions IP Class 12
Ans.:
import matplotlib.pyplot as plt
virat=[80,65,34,42,55]
rohit=[55,35,88,78,42]
x1=[0.25,1.25,2.25,3.25,4.25]
x2=[.75,1.75,2.75,3.75,4.75]
plt.bar(x1,virat,label='Virat Kohli',width=0.5,color='red')
plt.bar(x2,rohit,label='Rohit Sharma',width=0.5,color='blue')
plt.xlabel("Macthes")
plt.ylabel("Runs")
plt.title("Player Stats")
plt.xticks([1,2,3,4,5])
plt.show()

[8] Mrs. Namrata is a coordinator in the senior section school. She represented data on number of students who passed the exam on line chart as follows:

competency-based questions class xii ip
import matplotlib.pyplot as plt
classes=["X A","X B","XI A","XI B","XII A","XII B"]
no_of_boys=[23,22,20,26,33,30]
no_of_girls=[17,10,20,12,5,8]
plt.line(classes,no_of_boys) #Statement 1
plt.line(classes,no_of_girls) #Statement 2
plt.xtitle("No of Stduents") #Statement 3
plt.ytitle("Classes") #Statement 4
plt.show()

i) What will be the correct code for Statement 1 and Statement 2?

ii) What is the correct function name for Statement 3 and Statement 4?

iii) Write a method and parameter required to display legends?

iv) Name the parameter and values used to apply the marker as given in the output.

v) Name the parameter and values used to apply linestyle as given in the output.

vi) How to apply the line colours as given in the figure?

vii) Write to save the figure as image.

Ans:

i) The code for statement 1 and statement 2 is as follows:

  1. Statement 1: plt.plot(classes,no_of_boys)
  2. Statement 2:plt.plot(classes,no_of_girls)

ii) The correct code for statement 3 and statement 4 is as follows:

  1. plt.xlabel(‘classes’)
  2. plt.ylabel(‘No of stduents’)

iii) To display the legend she need to add label parameter in the plot method as following:

  1. plt.plot(classes,no_of_boys,label=’Boys’)
  2. plt.plot(classes,no_of_girls,label=’Girls’)

To display legend she need to write this function:

plt.legend()

iv) To apply the marker as given in the figure she needs to write the code as follows:

plt.plot(classes,no_of_boys,marker='D') 
plt.plot(classes,no_of_girls,marker='o')

To display legend she need to write this function:

plt.legend()

iv) To apply the marker as given in the figure she needs to write the code as follows:

plt.plot(classes,no_of_boys,marker='D') 
plt.plot(classes,no_of_girls,marker='o')

v) To apply the lines styles she needs to use a parameter linestyle or ls with the values ‘dashed’ and ‘dotted’ respectively as follows:

plt.plot(classes,no_of_boys,ls='dashed') 
plt.plot(classes,no_of_girls,ls='dotted')

vi) She can use color parameter to apply colours as follows:

plt.plot(classes,no_of_boys,color='m') 
plt.plot(classes,no_of_girls,color='pink')

vii) To save the figure as image she needs to use savefig() method as follows:

plt.savefig('boygirlspass.jpg')

Follow this link for more questions:

Important Questions Data Visualization

Unit 2 Database Query using SQL

In this section of Most expected questions IP Class 12 I am going to cover MCQs from MySQL. Here we go!

Important MySQL MCQs/1 Mark Questions

[1] Identify the data type returned by the following query:

Select length(“LENGTH”) ;

a) Numeric value

b) Text value

c) Null value

d) Float value

[2] If column “SCORE” of table PLAYER contains the data set (45,80, 35,15, 7) , what will be the output after execution of the following query?

SELECT MAX(SCORE) – MIN(SCORE) FROM PLAYER;

a) 38

b) 73

c) 8

d) 35

[3] If column “temp” of the weather table contains the data set (45, 35, 35, 28, 28), what will be the output after the execution of the given query?

SELECT AVG (DISTINCT temp) FROM weather;

a) 34.2

b) 21.6

c) 38.33

d) 36

[4] Ravi is class 12 student. He is learning MySQL functions. He wants to know the category of mid() function. Select an appropriate category to help him to understand well.

a) Math function

b) Text function

c) Date Function

d) Aggregate Function

[5] What will be the output of the following SQL command?

SELECT round(155.9772,-1);

a) 155

b) 156

c) 160

d) 156

[6] Consider the string “TutorialAICSIP.com is best”, Which among the following SQL command(s) will give the output as – best?

(i) SELECT right(“Tutorialaicsip.com is best”,4);

(ii) SELECT left(“Tutorialaicsip.com is best”,4);

(iii) SELECT substr(“Tutorialaicsip.com is best”,23,4);

(iv) SELECT substr(“Tutorialaicsip.com is best”,-4)

a) option (i)

b) option (i) and (iii)

c) option (i) and (iv)

d) option (i), (iii), and (iv)

[7] If column “venue” of table matches contains the data set (‘Ahmedabad’, ‘Baroda’, ‘Ahmedabad’, ‘Anand’, ‘Baroda’) , what will be the output after execution of the following query?

SELECT COUNT(DISTINCT venue) FROM matches ;

a) 5

b) 3

c) 2

d) 4

[8] The correct SQL form below to find the temperature in increasing order of all cities

a) SELECT city FROM weather order by temperature ;

b) SELECT city, temperature FROM weather ;

c) SELECT city, temperature FROM weather ORDER BY temperature ;

d) SELECT city, temperature FROM weather ORDER BY city ;

[9] Which one of the following is an aggregate function(s)?

i) min()

ii) max()

iii) power()

iv) now()

a) Only (i)

b) (i) and (ii)

c) (i) , (ii) and (iii)

d) (i), (iii) and (iv)

[10] Observe this statement and select appropriate option: “Where and Having clauses can be used interchangeably in SELECT queries“.

a) True

b) False

c) Only in views

d) With order by

[11] Sohail is confused about which function returns the time when the function executes. Help him by selecting the correct option out of the following:

a) SYSDATE()

b) NOW()

c) CURRENT()

d) TIME()

[12] Prakash has been given a task to select a function used to display the current date and time. Select an appropriate function for same.

a) Date( )

b) Time( )

c) Current( )

d) Now( )

[13] Find the output for the below SQL statement:

Select substr(“BoardExam@2023”, -1, 7);

a )3

b) am@2023

c) BoardEx

d) 3202@ma

[14] What is the output of following?

Select Round(9999.299,2);

a) 9999.30

b) 10000.29

c) 19999.00

d) 10000.30

[15] What is the use of a desc word along with order by clause?

a) Display the result with all rows

b) Display results with in descriptive format

c) Display distinct rows

d) Display results in descending order

Most expected questions IP Class 12 – 2 Marks Questions

In the first section of Most expected questions IP Class 12 we will cover the questions from my SQL functions.

[1] In a table employee, a  column occupation contains many duplicate values. Which keyword would you use if wish to list of only different values?

[2] Define and Identify Single Row functions of MySQL amongst the following :

TRIM(), MAX(), COUNT(*), ROUND()

[3] Given the table ‘Player’ with the following columns :

PcodePoints
P00125
P00236
P00312
P004NULL
P00542

Write the output of the following queries:

  • SELECT ROUND(AVG(POINTS)) FROM Player;
  • Select COUNT(POINTS) FROM Player;

[4] Name SQL Single Row functions (for each of the following) that

  1. returns total no. of letters of the given text
  2. returns text into lowercase letters
  3. returns names of days, For example : ‘‘Monday’’, ‘‘Tuesday’’
  4. returns month number from the given date

[5] Name two Aggregate (Group) functions of SQL and explain them with example.

[6] Consider the table ‘Hotel’ given below:

EmpidCategorySalaray
101Regular25300
102Probation18500
103Regular20000
104Regular12000
105Probation8000

Mr. Vinay wanted to display average salary of each Category. He entered the following SQL statement. Identify error(s) and Rewrite the correct SQL statement.

SELECT Category, Salary FROM Hotel GROUP BY Category;

[7] Write the output of the following SQL queries :

  1. SELECT MID(‘BoardExamination’,2,4);
  2. SELECT ROUND(67.246,2);
  3. SELECT INSTR(‘INFORMATION FORM’,‘FOR’);
  4. SELECT LEFT(‘2022-06-13’,4);

[8] Distinguish between Single Row and Aggregate functions of MySQL. Write one example of each.

[9] Consider the following table :

studentidnameexamidscore
101Mohit11134595
102Sagar11134898
101Manish11158687
102Jayesh11174575

Abhay wants to know the number of students who took the test. He writes the following SQL statement to count STUDENTID without duplicates. However the statement is not correct. Rewrite the correct statement.

SELECT DISTINCT(COUNT STUDENTID) FROM RESULTS;

[10] Aman has used the following SQL command to create a table ‘stu’ :

CREATE TABLE stu ( id INTEGER, name VARCHAR(100) );

Then, Aman enters the following SQL statements to enter 3 rows :

INSERT INTO stu VALUES (1, “abc”);

INSERT INTO stu VALUES (2, “abc”);

INSERT INTO stu VALUES (3, “bcd”);

Write the output that will be produced by the following SQL statement :

SELECT name, Count(*) FROM stu GROUP BY name;

[11] Table Student has the columns RNO and SCORE. It has 3 rows in it. Following two SQL statements were entered that produced the output (AVG(SCORE)) as 45 and COUNT(SCORE) as 2). Data in SCORE column is same in two rows. What data is present in the SCORE column in the three rows?

[12] Consider the following table – activity

activitycodeactivitynamepoints
A001Skating120
A001Karate105
A002Judo110
A002Boxing115
A003Swimming107
A004Archery135
  1. Write query to display Activity Code along with total points of each activity (Activity Code wise) from the table Participant.
  2. To display Activity Code, Activity Name in alphabetic ascending order of names of activityname.

[13] Consider the following table: results

studentidnameexamidscore
1Ankit101098
2Bhavik101195
3Suman101085
4Sachin101175

Write the outputs that the following SQL statements will generate :

  1. SELECT AVG(SCORE) FROM RESULTS WHERE EXAMID = 1010;
  2. SELECT EXAMID, AVG(SCORE) FROM RESULTS GROUP BY EXAMID;

[14] Consider the following table: item

InoInamePrice
1Pencil10
2Sketch Pens40
3Ball Pens18
4Gel Pens20
5Eraser8

Write queries to

  1. To display Names of Items and Price of all the items in descending order of their Price.
  2. To display Minimum and Maximum Price of each item from the table item for pens and pencil)

[15] Write the output of the following queries:

  1. select mod(-23,2);
  2. select right(lower(‘Class XII Term 2 Exam’),4);
  3. select month(‘2022-04-03’);
  4. select pow(day(‘2022-05-03’),-2);

[16] Consider the following table game:

GNOGNAMEFEES
G001Cricket2200
G002Volleyball2100
G003Football2500
G004Basketball2300
G005HandBall1700
  1. Write a query to display the maximum, and minimum fees of grames.
  2. Write a query to display the average fees of game number G001,G003,G004 and G005.

[17] What will be the output of the following queries:

  1. select length(substring(‘SSC Exam 2022’),10,4);
  2. select dayname(‘2022-06-13’);
  3. select trim(‘ Term 2 Examination ‘);
  4. select UCASE(‘IP XII’);

[18] Differentiate between order by clause and group by clause.

[19] Differentiate between where and having clause.

[20] Ankur has written the following commands with respect to a table employee having fields empno, name, department, and commission.

Command 1 – select count(*) from employee;

Command 2 – select count(commission) from employee;

She gets the output as 6 for the first command but gets 4 rows for the second command. Explain the output with justification.

[21] Roshan, is a student of class 12 learning MySQL, he wants to remove leading and trailing spaces from ‘#####LEARNING###MYSQL####’ (#denotes a blank space) and also wants to know the output. Write the output and explain how these spaces are removed?

[22] Mr. Kalpesh is Admin Manager in Krishna Hospital. He created the following table named doctor to store records of doctors.

IDDNAMEDEPARTMENTSALARY
1AnmolAdmin25000
2KalpeshAdmin35000
3JasminOrthopaedics45000
4JamesSurgery55000
5SoniaOncology52000
6RaniOrthopaedics48000
7KapilSurgery50000
8MokshOrthopaedics57000

Write output of the following queries:

i) select SUM(Salary) from Doctor where Department =’Surgery’;
ii) select Department, Count(*) from Doctor Group By Department;

[22] Based on the table given above, help Mr. Kalpesh write queries for the following task:
i) To display the names and salaries of doctors in descending order of salaries.
ii) To display the unique departments from the doctor table.

[23] Gopal is using a table EMPLOYEE. It has the following columns: He wants to display the maximum salary Department wise.

Table Fields – Code, Name, Salary, Deptcode

He wrote the following query:
SELECT Deptcode, Max(Salary) FROM EMPLOYEE order by deptcode;
But he did not get desired result. Rewrite the above query with necessary changes to help him get the desired output. and also write the category of a query and function of this command.

[24] Write the name of the functions to perform the following operations and write an example:
1. To display the day, from the date when the constitution of India came into effect.
2. To display the position of India from the given string – ‘Republic India’.

[25] Predict the output:

  1. select power(3,0);
  2. select round(125.7654,-2)

Database Query Using SQL 3 Marks Most expected questions IP Class 12

[1] Predict the output of the following:

i. select instr(‘Term 2 Boardexams @2022′,’@’);
ii. select mid(‘Term 2 Boardexams @2022’,8,5);
iii. select left(‘Term 2 Boardexams @2022’,6);

[2] Consider the following table ‘Prepaid’ and write queries given below:

CustIDCustNamePlanCompany
1Bhavin399Jio
2Milan699Vodafone
3Kashish599Airtel
4Hetvi799Jio
5Rushi499BSNL
6Preet599Vodafone
  1. To fetch the First 5 characters of customer’s name
  2. To display the company names is longer than 4 characters
  3. To display the customer name in capitals

[3] Raj is working with functions of MySQL. Suggest a query to him for the following:

  1. To display the name of the month of the today
  2. To remove spaces from the beginning and end of the string “ Popular ”
  3. To compute the remainder of the division between two numbers 5 and 7

[4] Consider the following table – ‘Garment’

GCODEGNAMESIZECOLOURPrice
G001T-shirtXLRed1499
G002JeansLBlue1749
G003SkirtMGray1845
G004ShirtLWhite1475
G005Ladies TopLYellow780
G006Cotton JeansXLBlack1249

Write the following queries in some other methods or ways:

  1. select sum(price) from garment where price>=1300 and price<=1800
  2. select max(price) from garment where size = ‘XL’ or size=’L’
  3. select sum(price)/count(price) from garment;

[5] Consider the table – Garment and write the following queries:

  1. Display the Minimum price of the Garment.
  2. Count and display the number of GARMENT from each SIZE where number of GARMENTS are more than 1.
  3. Display the sum of price of each color garment

[6] Write output of the following:

  1. select power(length(substr(“Salam India”,-5)),0);
  2. select round(power(instr(“Informatics Practices”,’for’),-3),2);
  3. select mod(length(“Jai Hind”),9);

[7] Consider the table – friends

IDSalaryDesignationSubjectSchool
195000PGT PhysicsDelhi Public School
275000TGTMathsArmy Public School
365000PGTChemistryJawahar Navodaya Vidyalaya
480000PGTMathsDelhi Public School
550000TGTMathsJawahar Navodaya Vidyalaya
645000TGTScienceArmy Public School
748000TGTMathsJawahar Navodaya Vidyalaya
  1. Display the total salary received by each designation.
  2. Display the Maximum Salary of Maths subject friends
  3. Display the Total Number of freinds working in Army public school

[8] Name the SQL command used for the following:

  1. To add new record
  2. To remove a record
  3. To change the name of a column
  4. To change the database
  5. To display records
  6. To edit records

[9] Explain the difference between each and justify using an example for each.

  1. DAY() and DAYNAME()
  2. MONTH() and MONTHNAME()
  3. INSTR() and SUBSTR()

[10] Binal has joined as a trainee in a database company. While working with real-time data, he has few queries: As a senior, help him name the functions to clear his queries and explain the difference among them:

  1. A function that returns a constant time that indicate’s the time at which the statement began to execute
  2. A function that returns exact time at which it executes.
  3. A function that returns the current date only and not the time.

[11] Sanjana is executing the following queries:

  1. Select length(trim(“##CBSE Term 2 Exam##“));
  2. Select length(ltrim(“##CBSE Term 2 Exam###“));
  3. Select length(rtrim(“###CBSE Term 2 Exam##“));

The # sign is used to denotes the space. He got the output for the commands are as follows:

  1. Predict the output for above queries
  2. Explain the reason for above output to Sanjana

[12] Consider “Winners never quit”. Write the queries for the following tasks.

  1. Write a command to display “quit”.
  2. Write a command to display number of characters in the string.
  3. Write a command to check the first occurrence of letter ‘n’

[13] What will be the output of the following queries?

  1. SELECT UPPER(‘winners never quit’);
  2. SELECT substr(‘winners never quit’,-9,4);
  3. SELECT Right(‘winners never quit’,4);

[14] Consider the following table stduent and write answer of the following questions:

NoNameAgeDepartmentDateofadmFeesGender
1Bhumin16Computer2006/06/0135000M
2Selina15Commerce2008/04/0225000F
3Deep15Commerce2010/03/2345000M
4Santosh17Physics2006/07/0438000M
5Rutu15Biology2009/05/2523000F
6Dharti17Fine Arts2008/04/2027000F
7Veer16Computer2007/06/1525000M

[1] Display square of age that got admission in the month of June.

[2] Divide age the by 2 and display the output with 2 decimal places along with name and department.

[3] Display unique departments in capital letters.

[4] Display the name from 3rd letter to 6th letter along with age and department who admitted after 1997.

[5] Display the name, admission date and fees whose name is 6 letters long.

[6] Display the total number of years for all students from the table and rename the heading as years in school.

[7] Display name, department and month name in which they got admission for all students.

[8] Display name and subtract today’s day from date of admission day.

[9] Display no, name, and day name for students whose name contains ‘ha’.

[10] Display the most senior student and most junior student’ age.

[11] Display maximum age for each department.

[12] Display young age for each gender.

[13] Display total number of student for each department and display the report where no. of students are more than 2.

[14] Display the details of students in descending order of age.

[15] Display the details of students according to youngest to oldest.

Watch this video for more understanding:

Unit 3 Introduction to Computer Network

In this section, you will find important questions from Introduction to a computer network for Informatics practices 065 class 12. Here we go!

MCQs Introduction to Computer Networks Class 12 IP

So let us begin with MCQs for the topic Introduction to Computer networks Class 12 IP.

[1] A computer network created by connecting the computers of your school’s computer lab is an example of

a) LAN

b) MAN

c) WAN

d) PAN

[2] If different branches of a hospital in different state capitals are connected together, which type of network it forms?

a) LAN

b) MAN

c) WAN

d) None of the above

[3[ Which of the following covers a geographical area like a city or town?

a) LAN

b) MAN

c) WAN

d) PAN

[4] The Internet is an example of

a) LAN

b) MAN

c) WAN

d) PAN

[5] Nishtha is preparing for her IP board exams. She is confused about the types of URL. Select the appropriate option and help her to understand.

a) Absolute & Relative

b) Static & Dynamic

c) Absolute & Dynamic

d) Physical & Relative

[6] Rajesh is working as a lab technician in a school. He needs to install a web browser in school computers. Help him in choosing the best browser for computers:

a) Google Chrome

b) Apple Safari

c) Opera Mini

d) UC Browser

[7] Assertion (A): Each website has a unique address called URL.

Reasoning (R): It is Unified Resource Locator and a correct example is

https://ncert.nic.in/textbook.php?leip1=5-7

[8] Jyoti is searching for a device that is used to regenerate the signals over long-distance data transmission:

a) switch

b) modem

c) Repeater

d) None of the above

[9] Suhas wants to make video and voice calls to his clients staying abroad. Which protocol help him to accomplish his task?

a) HTTP

b) VoIP

c) Video Chat

d) SMTP

[10] Udit is attempting an online test where he has been given a question URL that stands for what? Select an appropriate option and help him.

a) Universal Resource Locator

b) Uniform Resource Locator

c) Universal Range Limit

d) None of the above

[11] The device used to connect two networks using different protocols is:

a) Router

b) Repeater

c) Gateway

d) Hub

[12] Which one is incorrect about MAC address?
a) It is the Physical Address of any device connected to the internet.
b) Anyone can change the MAC address of a device.
c) It is the address of the NIC card installed in the network device.
d) It is used to track the user over the Internet

[13] Assertion (A):- VoIP makes audio and video calls possible from any internet-connected device having a microphone and speakers.
Reasoning (R):- VoIP is possible if both caller and receiver have the right software and hardware to speak to one another.

a) Both A and R are true and R is the correct explanation for A

b) Both A and R are true and R is not the correct explanation for A

c) A is True but R is False

d) A is false but R is True

[14] Ankit is preparing for a network engineer interview. He asked his friend to make questions for him. His friend asked him which of the following is not network topology.

a) Star

b) Mesh

c) Firewall

d) Tree

[15] Ram is a network analyst in a multination company. His boss asked him to prepare a network layout that uses fewer wires. Suggest to him the best topology to accomplish this task.

a) Bus

b) Star

c) Ring

d) Hybrid

[16] A group of two or more similar things or people interconnected with each other is called _________

a) Group

b) Community

c) Collection

d) Network

[17] Which of the following is not a benefit of a network?

a) Sharing information

b) Sharing resources

c) Sharing Usernames and Passwords

d) Communication

[18] Apart from computers networks include

a) Office Staff

b) Networking devices like a switch, routers, modem

c) Packets

d) Sockets

[19] In network communications packets refers to ______________

a) layout of the network

b) set of rules to establish the network

c) media used in the network

d) data divided into small chunks

[20] In a communication network, each device that is part of a network and that can receive, create, store, or sends data to do different network routes is called ____________

a) Network Path

b) URL

c) Node

d) Communication Media

[21] Which of the following cannot be a node in the network?

a) WiMAX

b) Hub

c) Router

d) Server

[22] Which of the following is comparatively secure network access among all kinds of networks?

a) WAN

b) MAN

c) LAN

d) None

[23] The data transfer in LAN generally ranges from

a) 10 to 50 Mbps

b) 10 to 100 Mbps

c) 10 to 500 Mbps

d) 10 to 1 Gbps

[24] Mbps stands for

a) Megabits Per Second

b) Mega Bytes Per Second

c) Mega Binary Per Second

d) Mega Billion Per Second

[25] ______________ is a set of rules that decides how computers and other devices connect with each other through cables in a local area network or LAN.

a) Communication

b) Topology

c) Ethernet

d) Firewall

[26] State True or False – “Data transfer rate in MAN network is high as compared to MAN network. “

[27] Modem Stands for ________________
a) Modulate Demodulate

b) Modulator Demodulator

c) Modulation Demodulation

d) Modules Demodules

[28] The modulator connected to sender’s end acts as

a) Client

b) Server

c) demodulator

d) modulator

[29] The modem at the receiver’s end acts as a

a) Client

b) Server

c) demodulator

d) modulator

[29] Mehul wants to connect his personal computer with his office LAN. He is confused about which device is used to set up a wired network from his computer, help him to do the same.

a) HDD

b) NIC

c) RAM

d) CPU

[30] Select the correct statements about NIC:

i) Can act as an interface between computer and network

ii) It is a circuit board mounted on the motherboard

iii) Coaxial/Ethernet cable directly connects to NIC

iv) Each NIC has its unique Address

a) Only i

b) i), ii) and iii)

c) i) and ii)

d) All of the above

[31] In general network, signals can travel up to _______________

a) 1m

b) 10m

c) 100m

d) 500m

[32] Select correct statements for the hub

a) It extracts the destination address from data packet

b) It sends signal to only the intended node

c) It drops the noisy or corrupted signals

d) If data from two devices come across they will collide

[33] Nirali wants to connect a local area network to the internet. Suggest her best device out of the following:

a) bridge

b) router

c) switch

d) repeater

[34] The gateway has _________________, usually integrated with it.

a) firewall

b) router

c) Internal modem

d) router

[35] To build a fully connected mesh topology of n nodes, how many wires are required?

a) n

b) n-1

c) n(n-1)

d) n(n-1)/2

[36] Arjun wants to connect 10 computers with fully connected mesh topology, how many wires are required?

a) 45

b) 50

c) 55

d) 100

[37] In which of the following topology the link is unidirectional?

a) star

b) bus

c) ring

d) mesh

[38] Which of the following is not an application of the internet?

a) WWW

b) Email

c) Chat

d) Firewall

[39] Which of the following statements correct about WWW

a) It is an ocean of information

b) Firewall must be required to access information

c) A browser is a part of WWW

d) It was invented by Brett Lee

[40] Which of the following is not a fundamental technology that led to the creation of the web?

a) HTML

b) URI

c) Email

d) HTTP

[41] Which of the following is not a popular search engine?

a) Google

b) Facebook

c) Yahoo

d) Bing

[42] Which of the following is the most popular email service provider?

a) gmail

b) facebook

c) linkedin

d) ChatGPT

[43] Which of the following is the more popular chat application?

a) ChatGPT

b) Slack

c) Google Map

d) None

[44] _____ will be displayed when the website is launched.

a) Startup Page

b) Splash Screen

c) Home Page

d) Front Page

[45] Nishant has started a business. Now he wants to sell his products online. Which of the following is helpful for him with his own online infrastructure?

a) Website

b) Network

c) Selling on social media

d) Selling on Amazon

[45] State True or False – “A website design should be user-friendly and provide information to users with minimum effort.”

[46] Basic structure of web site is created using

a) MS Word

b) C++

c) HTML and CSS

d) MS Excel

[47] CSS stands for ____________________

a) Character Style Sheet

b) Cascading Style Sheet

c) Cross Style Sheet

d) Core Style Sheet

[48] Which of the most popular and commonly used scripting languages?

a) Python Script

b) Web Script

c) Java Script

d) C++ Script

[49] A web page can be ________________ or _____________

a) Absolute, Relative

b) Static, Dynamic

c) Absolute, Dynamic

d) Physical, Relative

[50] Select the correct statement about static webpage:

a) Webpage can be different for different users

b) Server may perform some additional information

c) They are more complex

d) Static web pages are generally written in HTML, JavaScript or CSS

[51] A ________________ is used to store and deliver the contents of a website to clients such as a browser that requests it.

a) Web Page

b) Home Page

c) Web Server

d) WebSite

[52] When the web server is not able to locate the page, it sends a page containing an error message. Identify this error:

a) 400 Bad Syntax

b) 404 Not Found

c) 408 Request Timed out

d) 410 Gone

[53] _______ is a service that allows us to put a website or a web page onto the Internet, and make it a part of the World Wide Web.

a) web browser

b) web server

c) word wide web

d) web hosting

[54] __________ is a service that does the mapping between domain name and IP address.

a) Domain Name System (DNS)

b) Top Level Domain

c) Protocol

d) Absolute/Relative Path

[55] A ____________ is a software application that helps us to view the web page(s).

a) Web hosting

b) Web Browser

c) Web Server

d) Web Page

[56] Which was the first web browser?

a) Mosaic

b) Opera

c) Apple Safari

d) Google Chrome

[57] A _____________ is a complete program or may be a third-party software.

a) Add on

b) Extension

c) Plug in

d) App

[58] Add-on is also referred as

a) Plug in

b) App

c) Adware

d) Extension

[59] Which of the following is a text file, containing a string of information, which is transferred by the website to the browser when we browse it?

a) cookies

b) script

c) program

d) session

[60] State True or False – “Cookies are usually harmful.”

Introduction to Computer Networks Class XII IP 2 Marks Questions

[1] A school with 20 stand-alone computers is considering networking them together and adding a server. State 2 advantages of doing this.

[2] Distinguish between LAN and WAN.

[3] What is the purpose of Modem in network ?

[4] Define ‘Domain Name Resolution’.

[5] Illustrate the layout for connecting 5 computers in a Bus and a Star topology of Networks.

Star Topology

star topology computer science class 12
Start topology
Bus topology class 12 computer science
Bus Topology

[6] State one way with which an online shopper can be sure that he/she is using a secure website.

[7] Expand:

(i) POP3 (ii) SMTP (iii) VolP (iv) HTTP

[8] A CEO of a car manufacturing company ElectroCars Ltd. located at Mumbai wants to have an annual meeting with his counterparts located at Delhi and Chennai where he would like to show as well as see and discuss the presentations prepared at the three locations for the financial year. Which communication technology out of the following is best suited for taking such an online demonstration ? 

(i) Chat                                       (ii) Teleconferencing                                     (iii) Video Conferencing

[9] What kind of data gets stored in cookies and how is it useful?

[10] State the reason why star topology requires more cable length than bus topology.

[11] Seema needs a network device that should regenerate the signal over the same network before the signal becomes too weak or corrupted. Amit needs a network device to connect two different networks together that work upon different networking models so that two networks can communicate properly.

[12] How is the domain name related to IP address?

[13] What happens to the Network with Star topology if the following happens :

  1. One of the computers on the network fails?
  2. The central hub or switch to which all computers are connected, fails ?

[14] Write the purpose of HTTP.

[15] Write the purpose of the following devices : Router, Modem

[16] Name any two private Internet Service Providers (company) in India.

[17] Pratima is an IT expert and a freelancer. She undertakes those jobs, which are related to setting up security software/tools and managing networks in various companies. If we name her role in these companies, what it will be out of the following and justify the reason:

(i) Cracker (ii) Network Admin (iii) Hacker (iv) Operator

[18] Kamakshi Ltd. Company wants to link its computers in the Head office in New Delhi to its office in Sydney. Name the type of Network that will be formed. Which device should be used to form this Network ?

[19] Name the devices :

  1. This device constantly looks at all the data entering and exiting your connection. It can block or reject data in response to an established rule.
  2. This device connects multiple nodes to form a network. It redirects the received information only to the intended node(s).

[20] Differentiate between Bus Topology and Star Topology of Networks. What are the advantages and disadvantages of Star Topology over Bus Topology ?

[21] Atul is learning the topic of types of networks. He is confused about which type of network formed by the following:

  1. A network formed between computers across the continent
  2. A network formed between computers on the university campus

[22] Identify the smallest and largest network out of these and write an example of each of them:

LAN, MAN, WAN, PAN, CAN

[23] Match the following devices functions:

1ModemAConnect the different networks together that work upon different networking models
2GatewayBRegenerate the signal over the same network before the signal becomes too weak or corrupted
3RepeaterCConverts analogue signals to digital signals and vice versa
4HubDConnect multiple devices in a network and send information to all nodes

[24] Parul is learning topic network topologies. Identify the following topologies:

  1. All devices are connected with the same cable
  2. A central device is connected with all devices
  3. Every node has a dedicated point-to-point link to every other node
  4. A topology which is a combination of star and bus topology

[25] Arun is going to select a network topology for his company. Suggest him the topology from the following hints:

(i) He needs to maximise the speed maximise the speeds and make each computer independent.

(ii) A topology which contains a backbone cable running through the whole length.

[26] Bhumin wants to know about the hub. Explain the device with its type to him in short.

[27] Explain the types of repeaters in short.

Unit 3 Introduction to computer networks 5 marks questions

[1] Biswas Enterprise is starting its first regional office in Baroda, Gujarat. And a branch office in Bhruch. Bharuch office has three units Admin, HR and Sales in the 2 Km Area. As a network admin, you need to suggest the network plan as per (i) to (iv) to the leaders keeping in mind the distances and other parameters:

Most expected questions IP Class 12 4 marks questions networking

The approximate distance between these units are as follows:

HR to Admin70 M
HR to Sales50 M
Admin to Sales100 M
Baroda Office to Bharuch Office95 KM

The number of computers installed in each unit are:

HR30
Admin50
Sales20
Baroda10

(i) Suggest the best suitable cable layout for the given case to connect each unit of the Bharuch office.

(ii) Suggest the most suitable place to install the server and specify the reason.

(iii) Which device is out of the following to be installed in each unit of the Bharuch office?

Router, Repeater, Swich, Modem

(iv) Which topology is best for each unit of the Bharuch Office?

Bus, Star, Tree, Mesh

(v) Which type of network is formed between the following:

(a) HR to Admin Unit

(b) Baroda office to Bharuch Office

(vi) Suggest a suitable technology to access the internet at various units of Bharuch Office.

(vii) Suggest the best option to connect the Baroda office with the Bharuch office’s units.

(viii) Suggest a device/software to provide security for the entire network of Bharuch Office.

(ix) Company wants to arrange online meetings frequently throughout the year. Suggest anyone online video conferencing software/app and protocol used for the software.

(x) Company has launched its R & D department office in USA. They want to connect this office network with Baroda office. Suggest the best way to connect them.

(xi) Which device is used to share dedicated bandwidth in LAN?

(xii) Company want to add one more unit at the Bharuch office. This unit is away from Admin unit and the cables can be spread through the Narmada River. Suggest best options for :

(a) Cables to connect these units across the river Narmada

(b) Device to extend the network

(c) In this unit they want to connect the internet line with their telephone. Suggest a device which can be used to establish an internet connection through telephone.

Answers:

(i)

Cable layout networking questions class 12

(ii) Admin unit is the most suitable place to install a server as it has a maximum number of computers.

(iii) Switch can be used to connect all the devices of the Bharuch office.

(iv) Star topology is best for each unit of the Bharuch Office.

(v) (a) LAN (b) WAN

(vi) Broadband

(vii) Sattelite is the best option to connect Baroda office and Bharuch office units.

(viii) Firewall

(ix) Software: Skype, Zoom, Google Meet, Webex & Protocol : VoIP

(x) Satellite

(xi) Switch

(xii) (a) Fibre Optic Cables

(b) Repeater

(c) Modem

Unit 4 Societal Impacts

In the next section of Most expected questions IP Class 12 we will see questions from Unit 4 Societal Impacts. So let us begin!

MCQs Societal Impacts Class 12

In this section of Most expected questions IP Class 12, we will discuss questions from Unit 4 Societal Impacts. Let us begin with 1 mark MCQs.

[1] Parul is surfing the Internet using smartphones where she left a trail of data reflecting the activities performed by her online. This trail of data is known as ______________

a) Data print

b) Digital Activity

c) Digital footprint

d) Digital print

[2] Stealing someone’s intellectual work and representing it as another person’s work is known as _____.

a) Phishing

b) Spamming

c) plagiarism

d) hacking

[3] Free software provides

a) Freedom to run the program for any purpose

b) Freedom to study and adapt its needs

c) Freedom to redistribute and improve the program

d) All of the these

[4] Observe the given options and identify the option which violates IPR:

a) Licensing

b) Digital Footprint

c) GPL

d) Plagiarism

[5] Unsolicited commercial emails is known as …………..

a) Spam

b) Malware

c) Virus

d) Worms

[6] Identify the organization responsible for E-Waste management in India

a) NITI Aayog

b) Ministry of Commerce

c) Central Pollution Control Board

d) National Green Tribunal

[7] Which of the following is not protected by copyright and available to everyone is categorized as:

a) Proprietary

b) Open Source

c) Patent

d) Plagiarism

[8] Which of the following is not a cybercrime?

a) Unauthorized account access

b) Mass attack using Trojans as botnets

c) Email spoofing and spamming

d) Report vulnerability in any system

[9] What is meant by the term ‘cyber crime’?

a) Any crime that uses computers to jeopardize or attempt to jeopardize national security

b) The use of computer networks to commit financial or identity fraud

c) The theft of digital information

d) Any crime that involves computers and networks

[10] Ankit is working in an organization that purchases new computers every year and dumps the old ones into the local dumping yard. Select an appropriate category of waste created, out of the following options:

a) Artificial waste

b) Computerized waste

c) E-waste

d) Natural Waste

[11] ______ are the attempts by individuals to obtain confidential information from you through a clone or similar kind of interface of website and URL.

a) Pharming

b) Cloning

c) Spamming

d) Phishing

[12] Karishma sets up her own company to sell her own range of clothes on social media platforms. What type of intellectual property can she use to show that the clothes are made by her company only?

a) Patents

b) Copyright

c) Trademark

d) Design

[13] Some etiquettes followed while using the internet is called Net Etiquette. Which of the following is/are Net Etiquette(s)?

a) Be Ethical

b) Be Responsible

c) Be Respectful

d) All of these

[14] Akshat is fraudulently acquiring someone’s personal and private information, such as online account names, login information, and password, Here Akshat is doing

a) Phishing

b) Identity Theft

c) Plagiarism

d) all the above

[15] Purva got a link in a WhatsApp group that diverts her to a bogus site. This type of activity is known as _______

a) Phishing

b) Spoofing

c) Eavesdropping

d) Pharming

[16] Assertion (A): – E-waste cause of Damage to the immune system, Skin disease, Multi ailments and Skin problems.

Reasoning (R):- Mostly all electronic waste comprises of toxic chemicals such as lead, beryllium, mercury etc.

[17] Assertion(A): Digital footprint is the trail of data we leave behind when we visit any website (or use any online application or portal) to fill-in data or perform any transaction.

Reason(R): While online, all of us need to be aware of how to conduct ourselves, how best to relate with others and what ethics, morals and values to maintain.

[18] The information/art/work that exists in digital form is called________.

a) job work

b) computerized property

c) digital property

d) e-property

[19] Legal term to describe the right of creator of original creative or artistic work is called_____.

a) Copyright

b) Copyleft

c) GPL

d) Trademark

[20] Rajesh received an email warning him of closure of his bank accounts if he did not update his banking information as soon as possible. He clicked the link in the email and entered his banking information. Next he got to know that he was duped. This is an example of __________ .

a) Online Fraud

b) Identity Theft

c) Plagiarism

d) Phishing

[21] Assertion (A):- VoIP makes audio and video calls possible from any internet connected device having a microphone and speakers.

Reasoning (R):- VoIP is possible if both caller and receiver have the right software and hardware to speak to one another

[22] An online activity that enables us to publish website or web application on the internet

a) Web server

b) Web Browser

c) Web Hosting

d) None

[23] Violating the intellectual property rights of a copyright holder is known as

a) Encryption

b) Digital footprint

c) Offline phishing

d) Copyright infringement

[24] Which of the following activity is an example for Active digital footprint?

a) Surfing internet

b) Apps and websites that use geolocation to pinpoint your location

c) Agreeing to install cookies on your devices when prompted by the browser d) None of the above

[25] Assertion(A) : Incognito browsing opens up a version of the browser that will track your activity

Reasoning(R) : Incognito browsing is useful when entering sensitive data

[26] State TRUE or FALSE against the following statement –

“Cyber-laws are incorporated for punishing all criminals only.”

[27] Which of the following is an example of e-waste?

a) empty soda can

b) Old clothes

c) an old computer

d) a ripened banana

[28] Online textual talk is called ______________

a) Video Conference

b) Chat

c) Text Phone

d) Telephony

I hope this article will help you to prepare for the CBSE informatics practices board exam. If you have doubts or queries related to any topic feel free to ask in the comment section.

Thank you for visiting my blog.