/**/ Sanjeev Study Hub – Class 11 & 12 Notes, Question Papers, IP & CS Study Material

Wednesday, February 11, 2026

MCQ CLASS 12 (2026)

MCQ FOR CLASS XII - 2026

 

Sl No

MCQ QUESTIONS

 

 

 

 

1

To display the 3rd, 4th and 5th columns from the 6th to 9th rows of a dataframe you can write

 

(a)   DF.loc[6:9, 3:5]

(b)   DF.loc[6:10, 3:6]

(c)  DF.iloc[6:10, 3:6]

(d)   DF.iloc[6:9, 3:5]

 

ANS: c) DF.iloc[6:10, 3:6]

 

 

2

We can add a new row to a DataFrame using the                                  method

(i)   rloc[ ]

(ii)   loc[ ]

(iii) iloc[ ]

(iv) None of the above

ANS: (ii) loc[ ]

 

 

 

 

3

The head() function of dataframe will display how may rows from top if no parameter is passed.

(i)   1

(ii)   3

(iii)   5

(iv)   None of these

 

ANS : (iii) 5

 

 

4

To change the 5th column's value at 3rd row as 35 in dataframe DF, you can write

 

(a)   DF[4, 6] = 35

(b)   DF.iat[4, 6] = 35

(c)  DF[3, 5] = 35


 

(d) DF.iat[3, 5] = 35

 

ANS:- d) DF.iat[3, 5] = 35

 

 

 

 

5

Which function is used to find values from a DataFrame D using the index number?

a)   D.loc

b)   D.iloc

c)  D.index

d)   None of these

 

ANS: b) D.iloc

 

 

 

 

6

In a DataFrame, Axis= 0 represents the elements

 

a.rows b.columns c.both

d.None of these.

 

ANS: a.rows

 

 

 

7

In DataFrame, by default new column added as the                                  column

(i)   First (Left Side)

(ii)   Second

(iii) Last (Right Side)

(iv)   Any where in dataframe

 

ANS: (iii)Last (Right Side)

 

 

 

 

8

Which of the following is correct Features of DataFrame?

a.   Potentially columns are of different types

b.   Can Perform Arithmetic operations on rows and columns

c.  Labeled axes (rows and columns)

d.   All of the above

 

ANS: d. All of the above

 

 

 

 

9

Write the code to append df2 with df1

 

a. Df2=Df2.append(Df1)

b.   Df2=Df2+Df1

c.   Df2=Df2.appendwith.Df1

d.   Df2=Df1.append(Df1)

 

ANS: a.Df2=Df2.append(Df1)

 

 

10

When we create DataFrame from List of Dictionaries, then number of columns in DataFrame isequal to the                   

a.      maximum number of keys in first dictionary of the list

b.      maximum number of different keys in all dictionaries of the list

c.      maximum number of dictionaries in the list


 

d. None of the above

 

ANS: b. maximum number of different keys in all dictionaries of the list

 

 

 

 

11

When we create DataFrame from List of Dictionaries, then dictionary keys will become               

(i)   Column labels

(ii)   Row labels

(iii)   Both of the above

(iv)   None of the above

 

ANS: (i) Column labels

 

 

 

12

Which method is used to access vertical subset of a dataframe?

(i)   iterrows()

(ii)   iteritems()

(iii)   itercolumns()

(iv)   itercols()

 

ANS: (ii) iteritems()

 

 

 

13

Write statement to transpose dataframe DF.

(i)   DF.t

(ii) DF.transpose (iii)DF.T (iv)DF.T( )

 

ANS: (iii)DF.T

 

 

 

14

In DataFrame, by default new column added as the                                  column

a.      First (Left Side)

b.      Second

c.      Last (Right Side)

d.      Any where in dataframe

 

ANS: Last (Right Side)

 

 

 

15

We can add a new row to a DataFrame using the                                  method

(i)                 rloc[ ]

(ii)                loc[ ]

(iii)              iloc[ ]

(iv)              None of the above

 

ANS: (ii) loc[ ]

 

 

 

 

16

Which of the following function is used to load the data from the CSV file to DataFrame?

 

(i)                 read.csv( )

(ii)                readcsv( )

(iii)              read_csv( )

(iv)              Read_csv( )


 

ANS: (iii) read_csv( )

 

 

 

17

Which of the following function is not a Boolean reduction function

(i)  Empty

(ii)  Any()

(iii)  All()

(iv)  Fillna()

 

ANS: (iv) Fillna()

 

 

 

 

18

Which among the following options can be used to create a DataFrame in Pandas ?

(a)   A scalar value

(b)   An ndarray

(c)  A python dict

(d)   All of these

 

ANS:- (d) All of these

 

 

 

 

19

Which attribute of a dataframe is used to convert row into columns and columns into rows in a dataframe?

a)   T

b)   ndim

c)  empty

d)   shape

 

ANS: a) T

 

 

 

 

20

When we create DataFrame from List of Dictionaries, then number of columns in DataFrame is equal to the                   

(i)   maximum number of keys in first dictionary of the list

(ii)   maximum number of different keys in all dictionaries of the list

(iii)   maximum number of dictionaries in the list

(iv)   None of the above

 

ANS: (ii) maximum number of different keys in all dictionaries of the list

 

 

 

21

Which of the following is/are characteristics of DataFrame?

a)   Columns are of different types

b)   Can Perform Arithmetic operations

c)  Axes are labeled (rows and columns)

d)   All of the above

 

ANS: d) All of the above

 

 

 

 

22

Write short code to show the information having city=”Delhi” from dataframe SHOP.

 

(a)   print(SHOP[City==’Delhi’])

(b)   print(SHOP[SHOP.City==’Delhi’])

(c)  print(SHOP[SHOP.’City’==’Delhi’])

(d)   print(SHOP[SHOP[City]==’Delhi’])


 

ANS: (b) print(SHOP[SHOP.City==’Delhi’])

 

 

 

23

Which of the following commands is used to install pandas?

(i)pip install python –pandas

(ii)pip install pandas (iii)python install python (iv)python install pandas

 

ANS: (ii) pip install pandas

 

 

 

 

24

Which attribute of a dataframe is used to get number of axis? a.T

b.Ndim c.Empty d.Shape

 

ANS: b.Ndim

 

 

 

25

Display first row of dataframe ‘DF’

(i)   print(DF.head(1))

(ii)   print(DF[0 : 1])

(iii) print(DF.iloc[0 : 1]) (iv)All of the above

 

ANS: (iv)All of the above

 

 

 

26

To delete a column from a DataFrame, you may use statement.

(a)   remove

(b)   del

(c)  drop

(d)   cancel statement.

 

ANS:- (b) del

 

 

 

 

 

27

In given code dataframe ‘Df1’ has                       rows and                  columns import pandas as pd

dict= [{‘a’:10, ‘b’:20}, {‘a’:5, ‘b’:10, ‘c’:20},{‘a’:7, ‘d’:10, ‘e’:20}]

Df1 = pd.DataFrame(dict)

(i)   3, 3

(ii)   3, 4

(iii) 3, 5

(iv) None of the above

 

ANS: (iii)3, 5

 

 

28

To delete a row from a DataFrame, you may use

(a)   remove

(b)   del

(c)  drop

(d)   cancel


 

ANS:- (c) drop

 

 

 

 

29

In the following statement, if column ‘mark’ already exists in the DataFrame ‘Df1’ then the assignment statement will                                   Df1['mark'] = [95,98,100] #There are only three rows in DataFrame Df1

(i)   Return error

(ii)   Replace the already existing values.

(iii) Add new column

(iv) None of the above

 

ANS: (ii) Replace the already existing values.

 

 

 

 

30

To skip first 5 rows of CSV file, which argument will you give in read_csv( ) ?

 

(a)   skip_rows = 5

(b)   skiprows = 5

(c)  skip - 5

(d)   noread - 5

 

ANS:- (a) skip_rows = 5

 

 

 

 

31

. Which of the following statement is false:

i.                    DataFrame is size mutable

ii.                   DataFrame is value mutable

iii.                 DataFrame is immutable

iv.                 DataFrame is capable of holding multiple types of data

 

ANS:- iii. DataFrame is immutable

 

 

 

32

Which of the following statements is false?

(i)   Dataframe is size mutable

(ii)   Dataframe is value mutable

(iii)   Dataframe is immutable

(iv)   Dataframe is capable of holding multiple type of data

 

ANS: (iii) Dataframe is immutable

 

 

 

 

33

To delete a row, the parameter axis of function drop( ) is assigned the value

 

(i)         0

(ii)       1

(iii)     2

(iv)     3

 

ANS: (i) 0

 

 

34

Which of the following function is used to load the data from the CSV file to DataFrame?

(i)   read.csv( )

(ii) readcsv( ) (iii)read_csv( )


 

(iv)Read_csv( )

 

ANS: (iii)read_csv( )

 

 

 

35

Write code to delete rows those getting 5000 salary.

(a)   df=df.drop[salary==5000]

(b)   df=df[df.salary!=5000]

(c)  df.drop[df.salary==5000,axis=0]

(d)   df=df.drop[salary!=5000]

 

ANS: (b) df=df[df.salary!=5000]

 

 

 

36

DF1.loc[ ] method is used to                 # DF1 is a DataFrame

(i)   Add new row in a DataFrame ‘DF1’

(ii)   To change the data values of a row to a particular value

(iii) Both of the above

(iv) None of the above

 

ANS: (iii)Both of the above

 

 

 

 

 

37

To iterate over horizontal subsets of dataframe,

(a)   iterate( )

(b)   iterrows( ) function may be used.

(c)  itercols( )

(d)   iteritems( )

 

ANS:- (b) iterrows( ) function may be used.

 

 

 

 

38

Write code to delete the row whose index value is A1 from dataframe df.

 

(a)   df=df.drop(‘A1’)

(b)   df=df.drop(index=‘A1’)

(c)  df=df.drop(‘A1,axis=index’)

(d)   df=df.del(‘A1’)

 

ANS: (a) df=df.drop(‘A1’)

 

 

 

 

39

A two-dimension labeled array that is an ordered collection of columns to store heterogeneous data type is

i.                    Series

ii.                   ii. Numpy array

iii.                   iii. Dataframe

iv.                 iv. Panel

 

ANS:- iii. Dataframe

 

40

To skip 1st, 3rd and 5th rows of CSV file, which argument will you give in read_csv( ) ?

(a)   skiprows = 11315

(b)   skiprows - (1, 3, 5]


 

(c)  skiprows = [1, 5, 1]

(d)   Any of these

 

ANS:- (b) skiprows - (1, 3, 5]

 

 

 

41

In Pandas                                    is used to store data in multiple columns. (i)Series

(ii)   DataFrame

(iii)   Both of the above

(iv)   None of the above

 

ANS: (ii) DataFrame

 

 

 

 

42

What is dataframe?

a.   2 D array with heterogeneous data

b.   1 D array with homogeneous data

c.  2 D array with homogeneous data

d.   1 D array with heterogeneous data

 

ANS: a. 2 D array with heterogeneous data

 

 

 

 

43

In a DataFrame, Axis= 1 represents the                                 elements

(a)   Row

(b)   Column

(c)  True

(d)   False

 

ANS: (b) Column

 

 

 

44

Which of the following is not an attribute of a DataFrame Object ?

a.   index

b.   Index

c.  size

d.   value

 

ANS: b. Index

 

 

 

45

To get top 5 rows of a dataframe, you may use

(a)   head( )

(b)   head(5)

(c)  top( )

(d)   top(5)

 

ANS:- (a) head( ) , b) head(5)

 

 

46

27.   To iterate over horizontal subsets of dataframe,

(a)   iterate( )

(b)   iterrows( ) function may be used.

(c)  itercols( )

(d)   iteritems( )


 

ANS:- (b) iterrows( ) function may be used.

 

 

 

 

47

Write code to delete the row whose index value is A1 from dataframe df.

(a)   df=df.drop(‘A1’)

(b)   df=df.drop(index=‘A1’)

(c)  df=df.drop(‘A1,axis=index’)

(d)   df=df.del(‘A1’)

 

ANS: (a) df=df.drop(‘A1’)

 

 

 

 

48

A two-dimension labelled array that is an ordered collection of columns to store heterogeneous datatype is

v.                  Series

vi.                ii. Numpy array

vii.                 iii. Dataframe

viii.             iv. Panel

 

ANS:- iii. Dataframe

 

 

 

 

49

To skip 1st, 3rd and 5th rows of CSV file, which argument will you give in read_csv( ) ?

(a)   skiprows = 11315

(b)   skiprows - (1, 3, 5]

(c)  skiprows = [1, 5, 1]

(d)   Any of these

 

ANS:- (b) skiprows - (1, 3, 5]

 

 

 

50

In a DataFrame, Axis= 1 represents the                                elements

(a)   Row

(b)   Column

(c)  True

(d)   False

 

ANS: (b) Column

 

 

51

NaN stands for:

a.   Not a Number

b.   None and None

c.  Null and Null

d.   None a Number

ANS: a. Not a Number

 

 

 

52

To get top 5 rows of a dataframe, you may use

(a)   head( )

(b)   head(5)

(c)  top( )

(d)   top(5)

 

ANS:- (a) head( ) , b) head(5)

53

The correct statement to read from a CSV file in a dataframeis :

(a)   .read_csv()


 

(b) . read_csv( )()

(c) = pandas.read()

(d) = pandas.read_csv()

 

ANS:- (d) = pandas.read_csv()

 

 

 

54

To delete a column from a dataframe, you may use                  statement.

i.                    remove()

ii.                   ii. del()

iii.                 iii. drop()

iv.                 iv. cancel()

 

ANS:- iii. drop()

 

 

 

 

 

55

The following code create a dataframe named ‘Df1’ with                                      

columns.

import pandas as pd

Df1 = pd.DataFrame([10,20,30] )

(i) 1

(ii) 2

(iii) 3

(iv) 4

 

ANS: (i) 1

 

 

 

56

To delete a row from dataframe, you may use                    statement.

i.                    remove()

ii.                   ii. del()

iii.                 iii. drop()

iv.                 iv. cancel()

 

ANS:- ii. del()

 

 

 

57

In a Data-Frame, Axis= 0 represents the elements along the                  

a.   Row

b.   Column

c.  Row and Column Both

d.   None of the above

 

ANS: a. Row

 

 

 

 

58

                         method in Pandas can be used to change the index of rows and columns of a Series or Dataframe

(a)   rename()

(b)   reindex()

(c)  reframe()

(d)   none of these

 

ANS: (b) reindex()

 

59

Write the single line command to delete the column “marks” from dataframe df using drop function.

(a) df=df.drop(col=‘marks’)


 

EmpCode

Name

Desig

0

1405

VINAY

Clerk

1

1985

MANISH

Works Manager

2

1636

SMINA

Sales Manager

3

1689

RINU

Cleark

 

 

 


(b)   df=df.drop(‘marks’,axis=col)

(c)  df=df.drop(‘marks’,axis=0)

(d)   df=df.drop(‘marks’,axis=1)

 

ANS: (d) df=df.drop(‘marks’,axis=1)

 

 

 

60

Which of the following is used to give user defined column index in DataFrame?

(i)   index

(ii)   column

(iii)   columns

(iv)   colindex

 

ANS: (iii) columns

 

 

 

 

61

The following statement will                       

df = df.drop(['Name', 'Class', 'Rollno'], axis = 1) #df is a DataFrame object

 

a.   delete three columns having labels ‘Name’, ‘Class’ and ‘Rollno’

b.   delete three rows having labels ‘Name’, ‘Class’ and ‘Rollno’

c.  delete any three columns

d.   return error

 

ANS:- a. delete three columns having labels ‘Name’, ‘Class’ and ‘Rollno’

 

 

 

 

62

Difference between loc() and iloc().:

a.   Both are Label indexed based functions.

b.   Both are Integer position-based functions.

c.  loc() is label based function and iloc() integer position based function.

d.   loc() is integer position based function and iloc() index position based function.

ANS: c. loc() is label based function and iloc() integer position based function.

 

 

 

 

63

Which command will be used to delete 3 and 5 rows of the data frame. Assuming the data frame name as DF.

a.   DF.drop([2,4],axis=0)

b.   DF.drop([2,4],axis=1)

c.  DF.drop([3,5],axis=1)

d.   DF.drop([3,5])

 

ANS: a DF.drop([2,4],axis=0)

 

 

 

 

 

64

Assuming the given structure, which command will give us the given output:

Output Required: (3,4)

 

 

 

 

 

 

 

a.   print(df.shape())

b.   print(df.shape)


 

EmpCode

Name

Desig

0

1405

VINAY

Clerk

1

1985

MANISH

Works Manager

2

1636

SMINA

Sales Manager

3

1689

RINU

Clerk

 

 

 


c. print(df.size)

d. print(df.size()).

 

ANS: b. print(df.shape)

 

 

 

 

 

 

 

65

Write the output of the given command: df1.loc[:0,'Name'] Consider the given dataframe.

 

 

 

 

 

 

 

a.      0  1405  VINAY Clerk

b.    VINAY

c.    Works Manager

d.    Clerk

ANS : VINAY

 

Thursday, November 27, 2025

Important Questoins for Board Exam 2026

Sample Questions Paper : 2026 

Important Questions

Board Exam 2026

1. SELECT ROUND(12.789, 1) ;

Ans: 12.8

2. SELECT LENGTH("Infromatics Practices") ;

Ans: 21

3. Which of the following is protected under copyright law?

(a) Slogan of a brand         (b)A poem written by student

(c) An algorthm                   (d) A company name

Ans: (b)A poem written by student

4. What will df.loc[ : 3] return?

Ans: First 3 rows of df

5. Which SQL functoin return the current date from the system?

(a) SYSDATE                  (b) CURDATE()

(c) NOW()                        (d) All of these

Ans: All of these

6. What is the result of MOD(19,4) ;

Ans: 3

7. Which keyword is used to display unique values from a column in an SQL table?

Ans: DISTINCT

8. Which function is used to combine two strings in SQL?

Ans: CONCAT()

9. In which network topology is every node directly connected to every other node?

Ans: Mesh

10. Rita created a logo for her handmade soap business. What type of IPR protects her logo from being copied?

Ans: Trademark

11. Which type of error is returned by the following statement?

import pandas aa pa

pa.Series([1, 2, 3, 4], index = [ 'a', 'b', 'c' ])

(a) Value Error                    (b) Syntax Error

(c) Name Error                    (d) Logical Error

Ans: (a) Value Error

12. Which of the following statement is wrong?

(a) Can't change the index of the Series

(b) We can easily convert the list, tuple, and dictionary into a series.

(c) A Series represents a single column in memory.

(d) We can create empty Series.

Ans: (a) Can't change the index of the Series

13. Consider a series FRUITS:

        10        Apple

        20        Mango

        30        Pear

        40        Orange

        50        Papaya

Write a Python statement to:

(i) Display the elements: Mango and Orange

(ii) Display first four elements

Ans:(i) print (FRUITS [ [ 20, 40 ] ] )

       (ii) print (FRUITS.head(4) )

14. The primary law in India dealing with cybercrime and electronic commerce is:

(a) India's Technology (IT) Act, 2008

(b) India's Digital Information Technology (DIT) Act, 2000

(c) India's Information Technology (IT) Act, 2000

(d) The Technology Act, 2008

Ans: (c) India's Information Technology (IT) Act, 2000

15. Abhilasha forgot to sign out from her gamil id and Aditi used Abhilasha's gamil id to send mail. This act of Aditi is considered as:

(a) Plagiarism                    (b) Identity Theft

(c) Phishing                        (d) Piracy

Ans: (b) Identity Theft

16. The trail that is automatically created when a person uses the internet on any digital devices like Laptops, smart phones, tablets etc. is called:

(a) Cyberbullying                (b) Phishing

(c) Digital Footprint            (d) Digital Activity

Ans: (c) Digital Footprint  

17. ________ operating systemcomes under FOSS.

(a) Windos                            (b) Ubuntu

(c) Mac                                (d) Oracle

Ans:(b) Ubuntu

18. There is only 1 day left for Ravisha to submit her Science project. There she performed the following activities to complete her task. Which of the following activities can be considered as plagiarism?

(a) Download the images that were marked a CC and pasted in her project file.

(b) Copied the content from some website and pasted in her project file.

(c) Copied the content from the website and gave references about the same in the project.

(d) Downloaded and installed the open source software for typing the synopsis.

Ans: (b) Copied the content from some website and pasted in her project file.

19. Which of the following is not a violation of IPR?

(a) Plagiarism                    (a) Copyright infringement

(c) Patent                            (d) Trademark infringement

Ans: (c) Patent

20. Assertion (A): df.iloc[ 1: 3 ] includes the rows at index position 1 and 3.

    Reason(R) : iloc[ ] includes the upper bound index in slicing.

(a) Both A and R are True, and R correctly explains A.

(b) Both A and R are True, but R does not correctly explain A.

(c) A is True, but R is False

(d) A is False, but R is True

Ans: (d) A is False, but R is True

21. Assertion (A): The ALTER command in SQL can be used to add or remove columns in an existing table.

    Reason(R): ALTER is a DDL command that modifies the structure of the database schema

(a) Both A and R are True, and R correctly explains A.

(b) Both A and R are True, but R does not correctly explain A.

(c) A is True, but R is False

(d) A is False, but R is True

Ans: (a) Both A and R are True, and R correctly explains A.

SECTION - B

22. Explain any two ways to create a Series in Pandas with an example.

OR

Explain any two Python libraries used in data analysis.

Ans: Method 1: From a List

import pandas as pd

data = [10, 15, 20]

ser = pd.Series(data)

print(ser)

Method 2: From a Dictionary

import pandas as pd

data = {'IP' : 95,  'CS : 90, 'IT' : 85}

ser = pd.Series(data)

print(ser)

                                                    OR

LIbrary                               Use

Pandas                   For data manipulations and analysis using DataFrames.        

NumPy                    For numerical computations and handling arrays.

Matplotlib                For data visualisation using graphs and charts.

23. Intellectual property right means that the person who produces the information is the only one who can use that information. Now, explain the need of protecting intellectual property right.

Ans: The intellectual property rights must be protected because of protecting them

(i) Encourages individuals and business to create new software and new software applications, as well as improving existing applicatoins.

(ii) Ensures new ideas and technologies are widely distributed.

(iii) Promotes investment in the national economy.

24. Define DataFrame in Pandas.

Ans: A DataFrame is a two-dimensional data structure with heterogeneous data, usually represented in tabular format. The data is organized into rows and columns. Each column represents an attribute, and each row represents an observation or record (for example, a person).






Class 12 Informatics Practices 2026 Question Paper with Answers (Full Solution)

  CBSE Class 12 IP 2026 बोर्ड पेपर + Solutions 1. State whether the following statement is True or False: In Pandas Series, the Positional...