/**/ Python & MySQL: September 2021

Monday, September 13, 2021

CBSE BOARD EXAM 2022 CLASS 10

CBSE - SAMPLE QUESTIONS PAPERS

FIRST TERM

SESSION - 2021-22

CLASS - X


 Computer Application - QP

https://drive.google.com/file/d/1pg9_AetZQRBPCjjf749gMa1XSJJdUZ_8/view?usp=sharing

Computer Application - MS

https://drive.google.com/file/d/1emyV8MCxkjRqng9osToA9XxR67lbRRnX/view?usp=sharing

English (Language & Literature) -QP

https://drive.google.com/file/d/1fJdblodbwle4OuohUS-UcM9jrGVbr8YQ/view?usp=sharing

English (Language & Literature) - MS

https://drive.google.com/file/d/14A7QUAVWEuQu1LVWxxMK3UXwF6Ab9Ga3/view?usp=sharing

Hindi Course B - QP

https://drive.google.com/file/d/1MuGEulF2Q-SMVbJW260mME8Yruwcq4BG/view?usp=sharing

Hindi Course B - QP

https://drive.google.com/file/d/1a9ttKqiDzM_BB9ebk2uBSyYisxnZpmRX/view?usp=sharing

Maths Standard - QP

https://drive.google.com/file/d/1GPF99lgHEJtg3W43K1Wnp9qxwGz7Su0Y/view?usp=sharing

Maths Standard - MS

https://drive.google.com/file/d/1pNiCpnKk9BLUdOdeFH9VMs579QW3zKiG/view?usp=sharing

Science - QP

https://drive.google.com/file/d/1gJV-zrhY9zM48jOCf6Vs1bskimrHO5yX/view?usp=sharing

Science - MS

https://drive.google.com/file/d/1zD0SJSaLzTDoSUKMHbffmucrKJlluX9f/view?usp=sharing

Maths Basic - QP

https://drive.google.com/file/d/1e04IPfV3gRaiCUPwJFyNx8nug0Ruf7-J/view?usp=sharing

Maths Basic - MS

https://drive.google.com/file/d/1ZERzhy2fvYrXmumszMezvaQfNpuYapPw/view?usp=sharing

Social Science - QP

https://drive.google.com/file/d/1_NSJrzRJhmkL0FVEoimXojT9lqQSnrqR/view?usp=sharing

Social Science - MS

https://drive.google.com/file/d/1hlCN6rBxPwRoYqQ2y-xtoUph6IrYmwOd/view?usp=sharing



CBSE BOARD EXAM 2022 CLASS - XII

FIRST TERM - (2021-22)

CBSE SAMPLE PAPERS

CLASS - XII

Accountancy - QP 

https://drive.google.com/file/d/1_62x3yugh3rb3FUh7tGvTpDRH3Siv79U/view?usp=sharing

Accountancy - MS

https://drive.google.com/file/d/12RGynH-Jkz2HnkNr6Z49aegvVXOvcJRS/view?usp=sharing

Biology - QP

https://drive.google.com/file/d/162eyJg_GFhmswnHQZtadWKwE3UQLLN9G/view?usp=sharing

Biology - MS

https://drive.google.com/file/d/1JRNABufZfoTd4di5_0XS4RnvRt9TZnjw/view?usp=sharing

Business Studies - QP

https://drive.google.com/file/d/1NpBm-4T11JU5hn97XQ47vmPMvkQLNFlr/view?usp=sharing

Business Studies - MS

https://drive.google.com/file/d/1rdHV5ZkjCgYklXOXPb3gyKDu5X3ftXjf/view?usp=sharing

Chemistry - QP

https://drive.google.com/file/d/19EjoWtIBiA-uuonhwUB68w0L9NsQYl8G/view?usp=sharing

Chemistry - MS

https://drive.google.com/file/d/1jIvnaT_Eo-bzkOGVTzyTSkyZZUNbR2-D/view?usp=sharing

Economics - QP

https://drive.google.com/file/d/1FFYEaSo_T0OtW1Bxujautg72ScPxuWli/view?usp=sharing

Economics - MS

https://drive.google.com/file/d/1Gb_mMCjVMcEbfuaMWQXA_LAvwjx3v_jv/view?usp=sharing

English Core - QP

https://drive.google.com/file/d/1zBQPko1OPldRbUp86yczAJv4as13DeBk/view?usp=sharing

English Core - MS

https://drive.google.com/file/d/1MWn50p3PK378KCRX6VYTSU-2zar4iXLL/view?usp=sharing

Hindi Core - QP

https://drive.google.com/file/d/1v6rPdzeWlnYc9NQ9yMLYSWMmhD8ZMZh8/view?usp=sharing

Hindi Core - MS

https://drive.google.com/file/d/1x58H_VAcnXMt9Rhbh1R3J1-XoVM_xzdi/view?usp=sharing

Phy sics - QP

https://drive.google.com/file/d/1A5nEPHEpnkz3hGsk6yFXYgleHiQM5qIY/view?usp=sharing

Physics - MS

https://drive.google.com/file/d/1cmkayQ-XxtRWW8JTBE03T7OZsPcNhLko/view?usp=sharing

Physical Education - QP

https://drive.google.com/file/d/1L1_W2hZgTNmm-fNTUEUtiSoV3ZQDE5Q_/view?usp=sharing

Mathematics - QP

https://drive.google.com/file/d/1-NY7uwQZ9QcHXLI6eXceauK13Htj3IVA/view?usp=sharing

Mathematics - MS

https://drive.google.com/file/d/1ZYoB5U_rNWDtihh_zHsa_roZcdW-IR36/view?usp=sharing


Wednesday, September 8, 2021

Computer Science Term 1 Sample Paper 2021

Sample Question Paper

Class - XII : 2021-22

Computer Science (Code: 083)

(Theory: Term - 1)

Maximum Marks: 35                                                     Time Allowed: 90 Minutes

General Instructions:

  • The question paper is divided into 3 sections - A, B and C.
  • Section A, consist of 25 Questions(1-25). Attempt any 20 questions.
  • Section B, consist of 24 Questions(26-49). Attempt any 20 questions.
  • Section C, consist of 6 case study based Questions (50 -55). Attempt any 5 questions.
  • All questions carry equal marks.

Section - A

This section consists of 25 Questions (1 to 25). Attempt any 20 questions from this section. Choose the best possible option.

1. Find the invalid identifier from the following

(a) none

(b) address

(c) Name

(d) pass

Answer:(d) pass

2. Consider a declaration L = (1, 'Python', '3.14').

Which of the following represents the data type of L?

(a) list

(b) tuple

(c) dictionary

(d) string

Answer: (b) tuple

3. Given a Tuple tup1= (10, 20, 30, 40, 50, 60, 70, 80, 90).

What will be the output of print (tup1 [3:7:2])? 

(a) (40,50,60,70,80)

(b) 40,50,60,70)

(c) [40,60]

(d) (40,60)

Answer: (d) (40,60)

4. Which of the following option is not correct?

(a) if we try to read a text file that does not exist, an error occurs.

(b) if we try to read a text file that does not exist, the file gets created.

(c) if we try to write on a text file that does not exist, no error occurs.

(d) if we try to write on a text file that does not exist, the file gets Created.

Answer: (b) if we try to read a text file that does not exist, the file gets created.

5. Which of the following options can be used to read the first line of a text file Myfile.txt?

(a) myfile = open('Myfile.txt'); myfile.read()

(b) myfile = open('Myfile.txt','r'); myfile.read(n)

(c) myfile = open('Myfile.txt'); myfile.readline()

(d) myfile = open('Myfile.txt'); myfile.readlines()

Answer: (c) myfile = open('Myfile.txt'); myfile.readline()

6. Assume that the position of the file pointer is at the beginning of 3rd line in a text file. Which of the following option can be used to read all the remaining lines?

(a) myfile.read()

(b) myfile.read(n)

(c) myfile.readline()

(d) myfile.readlines()

Answer: (d) myfile.readlines()

7. A text file student.txt is stored in the storage device. Identify the correct option out of the following options to open the file in read mode.

i. myfile = open('student.txt','rb')

ii. myfile = open('student.txt','w')

iii. myfile = open('student.txt','r')

iv. myfile = open('student.txt')

(a) only i

(b) both i and iv

(c) both iii and iv

(d) both i and iii

Answer: (c) both iii and iv

8. The return type of the input() function is

(a) string

(b) integer

(c) list

(d) tuple

Answer: (a) string(a) string

9. Which of the following operator cannot be used with string data type?

(a) +

(b) in

(c) *

(d) /

Answer: (d) /

10. Consider a tuple tup1 = (10, 15, 25, and 30). Identify the statement that will result in an error.

(a) print(tup1[2])

(b) tup1[2] = 20

(c) print(min(tup1))

(d) print(len(tup1))

Answer: (b) tup1[2] = 20

11. Which of the following statement is incorrect in the context of binary files?

(a) Information is stored in the same format in which the information is held in memory.

(b)No character translation takes place

(c) Every line ends with a new line character

(d) pickle module is used for reading and writing

Answer: (c) Every line ends with a new line character

12. What is the significance of the tell() method?

(a) tells the path of file

(b) tells the current position of the file pointer within the file

(c) tells the end position within the file

(d) checks the existence of a file at the desired location.

Answer: (b) tells the current position of the file pointer within the file

13. Which of the following statement is true?

(a) pickling creates an object from a sequence of bytes

(b) pickling is used for object serialization

(c) pickling is used for object deserialization

(d) pickling is used to manage all types of files in Python

Answer: (b) pickling is used for object serialization

14. Syntax of seek function in Python is myfile.seek(offset, reference_point) where myfile is the file object. What is the default value of reference_point?

(a) 0

(b) 1

(c) 2

(d) 3

Answer: (a) 0

15. Which of the following components are part of a function header in Python?

(a) Function Name

(b) Return Statement

(c) Parameter List

(d) Both a and c

Answer: (d) Both a and c

16. Which of the following function header is correct?

(a) def cal_si(p=100, r, t=2)

(b) def cal_si(p=100, r=8, t)

(c) def cal_si(p, r=8, t)

(d) def cal_si(p, r=8, t=2)

Answer: (d) def cal_si(p, r=8, t=2)

17. Which of the following is the correct way to call a function?

(a) my_func()

(b) def my_func()

(c) return my_func

(d) call my_func()

Answer: (a) my_func()

18. Which of the following character acts as default delimiter in a csv file?

(a) (colon) :

(b) (hyphen) -

(c) (comma) ,

(d) (vertical line) |

Answer: c) (comma) ,

19. Syntax for opening Student.csv file in write mode is

        myfile = open("Student.csv","w",newline='').

What is the importance of newline=''?

(a) A newline gets added to the file

(b) Empty string gets appended to the first line.

(c) Empty string gets appended to all lines.

(d) EOL translation is suppressed

Answer: (d) EOL translation is suppressed

20. What is the correct expansion of CSV files?

(a) Comma Separable Values

(b) Comma Separated Values

(c) Comma Split Values

(d) Comma Separation Values

Answer: (b) Comma Separated Values

21. Which of the following is not a function / method of csv module in Python?

(a) read()

(b) reader()

(c) writer()

(d) writerow()

Answer: (a) read()

22. Which one of the following is the default extension of a Python file?

(a) .exe

(b) .p++

(c) .py

(d) .p

Answer: (c) .py

23. Which of the following symbol is used in Python for single line comment?

(a) /

(b) /*

(c) //

(d) #

Answer: (d) #

24. Which of the following statement opens a binary file record.bin in write mode and writes data from a list lst1 = [1,2,3,4] on the binary file?

(a) with open('record.bin','wb') as myfile:

                        pickle.dump(lst1,myfile)

(b) with open('record.bin','wb') as myfile:

                        pickle.dump(myfile,lst1)

(c) with open('record.bin','wb+') as myfile:

                        pickle.dump(myfile,lst1)

(d) with open('record.bin','ab') as myfile:

                        pickle.dump(myfile,lst1)

25. Which of these about a dictionary is false?

(a) The values of a dictionary can be accessed using keys

(b) The keys of a dictionary can be accessed using values

(c) Dictionaries aren’t ordered

(d) Dictionaries are mutable

Answer: (a)


Section B

This section consists of 24 Questions (26 to 49). Attempt any 20 questions.

26. What is the output of following code:

                                T=(100)

                                print(T*2)

(a)Syntax error

(b) (200,)

(c) 200

(d) (100,100)

Answer: (c) 200

27. Suppose content of 'Myfile.txt' is:

                            Twinkle twinkle little star

                            How I wonder what you are

                            Up above the world so high

                            Like a diamond in the sky

What will be the output of the following code?

myfile = open("Myfile.txt")

data = myfile.readlines()

print(len(data))

myfile.close()

(a) 3

(b) 4

(c) 5

(d) 6

Answer: (b) 4

28. Identify the output of the following Python statements.

        x = [[10.0, 11.0, 12.0],[13.0, 14.0, 15.0]] y = x[1][2]

        print(y)

(a) 12.0

(b) 13.0

(c) 14.0

(d) 15.0

Answer: (d) 15.0

29. Identify the output of the following Python statements.

x = 2

while x < 9:

    print(x, end='')

    x = x + 1

(a) 12345678

(b) 123456789

(c) 2345678

(d) 23456789

Answer: (c) 2345678

30. Identify the output of the following Python statements.

b = 1

for a in range(1, 10, 2):

    b += a + 2

print(b)

(a) 31

(b) 33

(c) 36

(d) 39

Answer (c) 39

31. Identify the output of the following Python statements.

                    lst1 = [10, 15, 20, 25, 30]

                    lst1.insert( 3, 4)

                    lst1.insert( 2, 3)

                    print (lst1[-5])

(a) 2

(b) 3

(c) 4

(d) 20

Answer: (b) 3

32. Raghav is trying to write a tuple tup1 = (1,2,3,4,5) on a binary file test.bin. Consider the following code written by him.

                    import pickle

                    tup1 = (1,2,3,4,5)

                    myfile = open("test.bin",'wb')

                    pickle._________ #Statement 1

                    myfile.close()

Identify the missing code in Statement 1.

(a) dump(myfile,tup1)

(b) dump(tup1, myfile)

(c) write(tup1,myfile)

(d) load(myfile,tup1)

Answer: (b) dump(tup1, myfile)

33. A binary file employee.dat has following data


def display(eno):

    f=open("employee.dat","rb")

    totSum=0

    try:

        while True:

            R=pickle.load(f)

            if R[0]==eno:

                ___________      #Line1

                totSum=totSum+R[2]

    except:

        f.close()

    print(totSum)

When the above mentioned function, display (103) is executed, the output displayed is 190000.

Write appropriate jump statement from the following to obtain the above output.

(a) jump

(b) break

(c) continue

(d) return

Answer: (c) continue

34. What will be the output of the following Python code?

def add (num1, num2):

    sum = num1 + num2

sum = add(20,30)

print(sum)

(a) 50

(b) 0

(c) Null

(d) None

Answer: (d) None

35. Evaluate the following expression and identify the correct answer.

                16 - (4 + 2) * 5 + 2**3 * 4

(a) 54

(b) 46

(c) 18

(d) 32

Answer: (c) 18

36. What will be the output of the following code?

def my_func(var1=100, var2=200):

    var1+=10

    var2 = var2 - 10

    return var1+var2

print(my_func(50),my_func())

(a) 100 200

(b) 150 300

(c) 250 75

(d) 250 300

Answer: (d) 250 300

37. What will be the output of the following code?

value = 50

def display(N):

    global value

    value = 25

    if N%7==0:

        value = value + N

    else:

        value = value - N

print(value, end="#")

display(20)

print(value)

(a) 50#50

(b) 50#5

(c) 50#30

(d) 5#50#

Answer: (b) 50#5

38. What will be the output of the following code?

import random

List=["Delhi","Mumbai","Chennai","Kolkata"]

for y in range(4):

    x = random.randint(1,3)

    print(List[x],end="#")

(a) Delhi#Mumbai#Chennai#Kolkata#

(b) Mumbai#Chennai#Kolkata#Mumbai#

(c) Mumbai# Mumbai #Mumbai # Delhi#

(d) Mumbai# Mumbai #Chennai # Mumbai

Answer: (b) Mumbai#Chennai#Kolkata#Mumbai#

39. What is the output of the following code snippet?

def ChangeVal(M,N):

    for i in range(N):

        if M[i]%5 == 0:

            M[i]//=5

        if M[i]%3 == 0:

            M[i]//=3

L = [25,8,75,12]

ChangeVal(L,4) for i in L:

    print(i,end="#")

(a) 5#8#15#4#

(b) 5#8#5#4#

(c) 5#8#15#14#

(d) 5#18#15#4#

Answer: (b) 5#8#5#4#

40. Suppose content of 'Myfile.txt' is

                Humpty Dumpty sat on a wall

                Humpty Dumpty had a great fall

                All the king's horses and all the king's men

                Couldn't put Humpty together again

What will be the output of the following code?

myfile = open("Myfile.txt")

record = myfile.read().split()

print(len(record))

myfile.close()

(a) 24

(b) 25

(c) 26

(d) 27

Answer: (c) 26

41. Find the output of the following code:

Name="PythoN3.1"

R=""

for x in range(len(Name)):

    if Name[x].isupper():

        R=R+Name[x].lower()

    elif Name[x].islower():

        R=R+Name[x].upper()

    elif Name[x].isdigit():

        R=R+Name[x-1]

    else:

        R=R+"#"

print(R)

(a) pYTHOn##@

(b) pYTHOnN#@

(c) pYTHOn#@

(d) pYTHOnN@#

Answer: (b) pYTHOnN#@

42. Suppose content of 'Myfile.txt' is

                                            Honesty is the best policy.

What will be the output of the following code?

            myfile = open("Myfile.txt")

            x = myfile.read()

            print(len(x))

            myfile.close()

(a) 5

(b) 25

(c) 26

(d) 27

Answer: (d) 27

43. Suppose content of 'Myfile.txt' is

            Culture is the widening of the mind and of the spirit.

What will be the output of the following code?

            myfile = open("Myfile.txt")

            x = myfile.read()

            y = x.count('the')

            print(y)

            myfile.close()

(a) 2

(b) 3

(c) 4

(d) 5

Answer: (b) 3

44. What will be the output of the following code?

x = 3

def myfunc():

    global x

    x+=2

    print(x, end=' ')

print(x, end=' ')

myfunc()

print(x, end=' ')

(a) 3 3 3

(b)3 4 5

(c) 3 3 5

(d) 3 5 5

Answer: (d) 3 5 5

45. Suppose content of 'Myfile.txt' is

                                    Ek Bharat Shreshtha Bharat

What will be the output of the following code?

myfile = open("Myfile.txt")

vlist = list("aeiouAEIOU")

vc=0

x = myfile.read()

for y in x:

    if(y in vlist):

        vc+=1

print(vc)

myfile.close()

(a) 6

(b) 7

(c) 8

(d) 9

Answser: (b) 7

46. Suppose content of 'Myfile.txt' is

                        Twinkle twinkle little star

                        How I wonder what you are

                        Up above the world so high

                        Like a diamond in the sky

                        Twinkle twinkle little star

What will be the output of the following code?

myfile = open("Myfile.txt")

line_count = 0

data = myfile.readlines()

for line in data:

    if line[0] == 'T':

        line_count += 1

print(line_count)

myfile.close()

(a) 2

(b) 3

(c) 4

(d) 5

Answer: (a) 2

47. Consider the following directory structure.


Suppose root directory (School) and present working directory are the same. What will be the absolute path of the file Syllabus.jpg?

(a) School/syllabus.jpg

(b) School/Academics/syllabus.jpg

(c) School/Academics/../syllabus.jpg

(d) School/Examination/syllabus.jpg

Answer: (b) School/Academics/syllabus.jpg

48. Assume the content of text file, 'student.txt' is:

                        Arjun Kumar

                        Ismail Khan

                        Joseph B

                        Hanika Kiran

What will be the data type of data_rec?

myfile = open("Myfile.txt")

data_rec = myfile.readlines()

myfile.close()

(a) string

(b)list

(c) tuple

(d) dictionary

Answer: (b)list

49. What will be the output of the following code?

                tup1 = (1,2,[1,2],3)

                tup1[2][1]=3.14

                print(tup1)

(a) (1,2,[3.14,2],3)

(b) (1,2,[1,3.14],3)

(c) (1,2,[1,2],3.14)

(d) Error Message

Answer: (b) (1,2,[1,3.14],3)

Section - C

Case Study based Questions

This section consists of 6 Questions (50 - 55). Attempt any 5 questions.

Rohit, a student of class 12, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File

                                                            CSV File

                                                            1,AKSHAY,XII,A

                                                            2,ABHISHEK,XII,A

                                                            3,ARVIND,XII,A

                                                            4,RAVI,XII,A

                                                            5,ASHISH,XII,A

Incomplete Code

import________                                                         #Statement-1

fh = open(________,________, newline='')                         #Statement-2

stuwriter = csv.________                                                 #Statement-3

data = [ ]

header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION']

data.append(header)

for i in range(5):

    roll_no = int(input("Enter Roll Number : "))

    name = input("Enter Name : ")

    Class = input("Enter Class : ")

    section = input("Enter Section : ")

    rec = [________]                                                               #Statement-4

    data.append(________)                                              #Statement-5

stuwriter.________ (data)                                              #Statement-6

fh.close()

50. Identify the suitable code for blank space in the line marked as Statement-1.

(a) csv file

(b) CSV

(c) csv

(d) cvs

Answer: (c) csv

51. Identify the missing code for blank space in line marked as Statement-2.

(a) "Student.csv","wb"

(b) "Student.csv","w"

(c) "Student.csv","r"

(d) "Student.cvs","r"

Answer: (b) "Student.csv","w"

52. Choose the function name (with argument) that should be used in the blank space of line marked as Statement-3.

(a) reader(fh)

(b) reader(MyFile)

(c) writer(fh)

(d) writer(MyFile)

Answer: (c) writer(fh)

53. Identify the suitable code for blank space in line marked as Statement-4.

(a) 'ROLL_NO', 'NAME', 'CLASS', 'SECTION'

(b) ROLL_NO, NAME, CLASS, SECTION

(c) 'roll_no','name','Class','section'

(d) roll_no,name,Class,section

Answer: (d) roll_no,name,Class,section

54. Identify the suitable code for blank space in the line marked as Statement-5.

(a) data

(b) record

(c) rec

(d) insert

Answer: (c) rec

55. Choose the function name that should be used in the blank space of line marked as Statement-6 to create the desired CSV File?

(a) dump()

(b) load()

(c) writerows()

(d) writerow()

Answer: (c) writerows()

==================FINISH==================

First Term Sample Paper for other subjects

Physics Sample Paper 

http://cbseacademic.nic.in/web_material/SQP/ClassXII_2021_22/Physics-SQP.pdf

==================FINISH==================



Monday, September 6, 2021

Infromatics Practices Term - 1 Sample Question Paper

Sample Question Paper with Marking Scheme

Term - 1

Subject: Informatics Practices (Code - 065)

Class - XII

Time Allowed: 90 minutes                                                       Maximum Marks: 35

General Instructions:

  • The paper is divided into 3 Sections - A, B and C.
  • Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
  • Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
  • Section C, consists of Question number 50 to 55 and student need to attempt 5 questions.
  • All question carry equal marks.

Section - A

Section A consists of 25 question, attempt any 20 questions.

1. The name "Pandas" is derived from the term:

(a) Panel Data

(b) Panel Series

(c) Python Document

(d) Panel Data Frame

Answer : (a) Panel Data

2. The command to install the pandas is:

(a) install pip pandas

(b) install pandas

(c) pip pandas

(d) pip install pandas

Answer: d) pip install pandas

3. Python pandas was developed by:

(a) Guido van Rossum

(b) Travis Oliphant

(c) Wes McKinney

(d) Brendan Eich

Answer: (c) Wes McKinney

4. Pandas Series is:

(a) 2 Dimensional

(b) 3 Dimensional

(c) 1 Dimensional

(d) Multidimensional

Answer: (c) 1 Dimensional

5. Pandas is a:

(a) Package

(b) Language

(c) Library

(d) Software

Answer: (c) Library

6. We can analyse the data in pandas with

(a) Series

(b) Data Frame

(c) Both of the above

(d) None of the above

Answer: (c) Both of the above

7. Out of the following which function cannot be used for customization of charts in Python?

(a) xlabel()

(b) colour()

(c) title()

(d) xticks()

Answer: (b) colour()

8. What is the minimum number of argument required for plot() function in matplotlib?

(a) 1

(b) 2

(c) 3

(d) 4

Answer: (a) 1

9. Method or function to add a new row in data frame is:

(a) .loc()

(b) .iloc()

(c) join

(d) add()

Answer: (a) .loc()

10. _________ is the function to save a graph.

(a) savefig()

(b) savefigure()

(c) savegraph()

(d) savechart()

Answer: (a) savefig()

11. A_______ is a unique data trace of a user's activities, action, communication or transactions in digital media.

(a) Digital Handprint

(b) Digital Footprint

(c) Offline Footprint

(d) Offline Handprint

Answer: (b) Digital Footprint

12. Which of the following is not a type of cybercrime?

(a) Data theft

(b) Forgery of online documents

(c) Damage of data and systems

(d) Installing antivirus for protection

Answer: (d) Installing antivirus for protection

13. 'F' in FOSS stands for:

(a) Free

(b) Forever

(c) Fire

(d) Freezing

Answer: (a) Free

14. Which of the following import statement is not correct?

(a) import pandas as class12

(b) import pandas as 1pd

(c) import pandas as pd1

(d) import pandas as pd

Answer: (b) import pandas as 1pd

15. IPR stands for:

(a) Intelligent Property Rights

(b) Intellectual Property Reserve

(c) Intellectual Property Rights

(d) Intellectual Product Rights

Answer: (c) Intellectual Property Rights

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

(a) Plagiarism

(b) Copyright Infringement

(c) Patent

(d) Trademark Infringement

Answer: (c) Patent

17. While accessing the column from the data frame, we can specify the column name. In case column does not exist, which type of error it will raise:

(a) Key Error

(b) Syntax Error

(c) Name Error

(d) Runtime Error

Answer: (a) Key Error

18. _________ is the practice of taking someone else's work or ideas and passing them off as ones' own:

(a) Plagiarism

(b) Copyright

(c) Patent

(d) All of the above

Answer: (a) Plagiarism

19. Function to display the first n rows in the DataFrame:

(a) tail(n)

(b) head(n)

(c) top(n)

(d) first(n)

Answer: (b) head(n)

20. Following are the impact of e-waste on the environment. Choose the odd one out.

(a) Soil Pollution

(b) Water Pollution

(c) Air Pollution

(d) Sound Pollution

Answer: (d) Sound Pollution

21. Abdul deleted all his chats from all his social media accounts, and he think that all his traces are deleted completely. Is he right in thinking so?

(a) Yes

(b) No

(c) May be

(d) Not sure

Answer: (b) No

22. The legal and regulatory aspects of the internet refer to ________.

(a) Cyber Space

(b) Cyber Crime

(c) Criminal law

(d) IT act

Answer: (d) IT act

23. Pandas data frame cannot be created using:

(a) Dictionary of tubles

(b) Series

(c) Dictionary of List

(d) List of Dictionaries

Answer: (a) Dictionary of tubles

24. Which function will be used to read data from a CSV file into pandas data frame?

(a) readcsv()

(b) to_csv()

(c) read_csv()

(d) csv_read()

Answer:(c) read_csv()

25. Which of the following is not an attribute of pandas data frame?

(a) length

(b) T

(c) Size

(d) shape

Answer: (a) length

Section - B

Section B consists of 24 Questions (26 to 49). Attempt any 20 questions.

26. What will be the output of the given code?

import pandas as pd

s = pd.Series([1,2,3,4,5],

              index=['akram','brijesh','charu','deepika','era'])

print(s['charu'])

(a) 1

(b) 2

(c) 3

(d) 4

Answer: (c) 3

27. Assuming the given series, named stud, which command will be used to print 5 as output?

        Amit                90

        Ramesh        100

        Mahesh         50

        John              67

        Abdul             89

        Name: Student, dtype: int64

(a) stud.index

(b) stud.length

(c) stud.values

(d) stud.size

Answer: (d) stud.size

28. A social science teacher wants to use a pandas series to teach about Indian historical monuments and its states. The series should have the monument names as values and state names as indexes which are stored in the given lists, as shown in the code. Choose the statement which will create the series:

import pandas as pd

Monument=['Qutub Minar','Gateway of India','Red Fort','Taj Mahal']

State=['Delhi','Maharashtra','Delhi','Uttar Pradesh']

(a) S = df.Series(Monument, inde=State)

(b) S = pd.Series(State, Monument)

(c) S = pd.Series(Monument, index=State)

(d) S = pd.series(Monument, index=State)

Answer: (c) S = pd.Series(Monument, index=State)

29. ____________ is a cybercrime in which a target or targets are contacted by email, telephone or text message by someone posing as a legitimate institution to lure individuals into providing sensitive data such as personally identifiable information, banking and credit card details, and passwords.

(a) Plagiarism

(b) Phishing

(c) Cyberstalking

(d) Hacking

Answer: (b) Phishing

30. Observe the following figure. Identify the coding for obtaining this as output:


(a)     import matplotlib.pyplot as plt

         plt.plot( [ 1, 2], [4, 5])

        plt.show()

(b)      import matplotlib.pyplot as plt

          plt.plot( [ 1, 2, 3], [4, 5, 1])

          plt.show()

(b)      import matplotlib.pyplot as plt

          plt.plot( [2, 3], [5, 1])

          plt.show()

(d)      import matplotlib.pyplot as plt

          plt.plot( [ 1, 3], [4, 1])

          plt.show()

Answer: (b)

31. Read the statements given below and identify the right option to draw a histogram.

Statement A: To make a Histogram with Matplotlib, we can use plt.hist() function.

Statement B: The bin parameter is compulsory to create histogram.

(a) Statement A is correct

(b) Statement B is correct

(c) Statement A is correct, but Statement B is incorrect

(d) Statement A is incorrect, but Statement B is correct

Answer: (c) Statement A is correct, but Statement B is incorrect

32. Which graph should be used where each column represents a range of values, and the height of a column corresponds to how many values are in that range?

(a) plot

(b) line

(c) bar

(d) histogram

Answer: (d) histogram

33. Suhhani is confused about the free operating system available in the market. Few of her friends suggested a few operating systems. Help her in choosing free operating system for her device:

(a) Ubuntu

(b) Windows

(c) Mozilla Firefox

(d) Blender

Answer: (a) Ubuntu

34. Consider the following statements with reference to the use of email:

Statement 1: Sending threatening messages to a classmate.

Statement 2: Inviting friends to participate in a school club or sports activity.

Statement 3: Asking your teacher for help on homework.

Statement 4: Responding to or forwarding spam emails.

Which of the above statements refer to appropriate use of email?

(a) Statements 1 and 2.

(b) Statements 2 and 3.

(c) Statements 3 and 4.

(d) Statements 2 and 4.

Answer: (b) Statements 2 and 3.

35. Consider the following series named animal:

            L                Lion

            B                Bear

            E          Elephant

            T               Tiger

            W              Wolf

            dtype: Object

Write the output of the command:

print(animal[: : -3] )

(a)        L            Lion

            T            Tiger

            dtype: object

(b)        B              Bear

            E         Elephant

            dtype: object

(c)        W            Wolf

             B            Bear

            dtype: object

(d)        W            Wolf

            T             Tiger

            dtype: object

Answer: (c)

36. Saharsh is a student of class -9 and he is a very frequent user of internet applications. One day he got an unpleasant message on his instant messenger. What do you think he should do?

(a) ignore it and start chatting to someone else.

(b) reply back to them and find out what their problem is.

(c) shut down the computer and hope they'll leave him alone in future.

(d) go to his parents, teacher, or other trusted adult and let them know that he feels uncomfortable.

Answer: (d)

37. What is a correct syntax to return the values of first row of a Pandas DataFrame?

Assuming the name of the DataFrame is dfRent.

(a) dfRent[0]

(b) dfRent.loc[1]

(c) dfRent.loc[0]

(d) dfRent.iloc[1]

Answer: (c) dfRent.loc[0]

38. Feasible method(s) to manage e-wase:

(a) Reduce

(b) Reuse

(c) Recycle

(d) All of the above

Answer: (d) All of the above

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

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

40. Write the output of the given program:

import pandas as pd

S1=pd.Series([5,6,7,8,10],index=['v','w','x','y','z'])

l=[2,6,1,4,6]

S2=pd.Series(l,index=['z','y','a','w','v'])

print(S1-S2)

 (a)   a            0

                 -1.0

        w           2.0

        x            NaN

        y            2.0

        z            8.0

        dtype: float64

(b)    a            NaN

        v           -1.0

        w           2.0

        x            NaN

        y            2.0

        z            8.0

        dtype: float64

(c)    

        v           -1.0

        w           2.0

        y            2.0

        z            8.0

        dtype: float64

(d)    a            NaN

        v           -1.0

        w           2.0

        x            3.0

        y            2.0

        z            8.0

        dtype: float64

Answer: (b)

41. We should exhibit proper manners and etiquettes while being online. Choose the right net etiquette (s) from the following:

(a) Avoid Cyber Bullying

(b)Respect Other’s Privacy

(c) No Copyright violation

(d) All of the above

Answer: (d) All of the above

42. 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])

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

43. Write the output of the given command:

import pandas as pd

s=pd.Series([1,2,3,4,5,6],index=['A','B','C','D','E','F'])

print(s[s%2==0])

(a)     B    0

         D    0

         F    0

        dtype: int64

(b)     A    1

         B    2

         C    5

        dtype: int64

(c)     B    2

         D    4

         F    6

        dtype: int64

(d)     B    1

         D    2

         F     3

        dtype: int64

Answer: (c)

44. Ritika is a new learner for the python pandas, and she is aware of some concepts of python. She has created some lists, but is unable to create the data frame from the same. Help her by identifying the statement which will create the data frame. 

import pandas as pd

Name=['Manpreet','Kavil','Manu','Ria']

Phy=[70,60,76,89]

Chem=[30,70,50,65]

(a) df=pd.DataFrame({"Name":Name,"Phy":Phy,"Chem":Chem})

(b) d=("Name":Name,"Phy":Phy,"Chem":Chem) df=pd.DataFrame(d)

(c) df=pd.DataFrame([Name,Phy,Chem],columns=['Name',"Phy","Chem","Total"])

(d) df=pd.DataFrame({Name:"Name", Phy :"Phy",Chem: "Chem"})

Answer: (a) df=pd.DataFrame({"Name":Name,"Phy":Phy,"Chem":Chem})

45. Linux, MySQL and Mozilla Firefox software come under _________ category.

(a) Proprietary

(b) FOSS

(c) Freeware

(d) Shareware

Answer: (b) FOSS

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

Output Required: (3, 5)

(a) print(df.shape())

(b) print(df.shape)

(c) print(df.size)

(d) print(df.size())

Answer: (b) print(df.shape)

47. Write  the output of the given command:

        df.loc[:0, 'Sal']

Consider the given dataframe


(a) 0 Kavita 50000 3000

(b) 50000

(c) 3000

(d) 50000

Answer: (b) 50000

48. Consider the following data frame df

Write the output of the given command:

print(df.marks/2)

(a)          0            45.0

               1            NaN

               2            43.5

               Name: Marks, dtype: float64

(b)          0            45.0

               1            NaN

               2            43

               Name: Marks, dtype: float64

(c)          0            45

               1            NaN

               2            43.5

               Name: Marks, dtype: float64

(d)          0            45.0

               1              0

               2            43.5

               Name: Marks, dtype: float64

Answer: (a)

49. Read the statements given below. Identify the right option from the following for Attribute and method/function.

Statement A: Attribute always ends without parenthesis.

Statement B: Function/Method cannot work without arguments.

(a) Both statements are correct.

(b) Both statements are incorrect.

(c) Statement A is correct, but Statement B is incorrect

(d) Statement A is incorrect, but Statement B is correct

Answer: (c) Statement A is correct, but Statement B is incorrect


Section - C

Section C, consists of 6 question (50 to 55). Attempt any 5 questions.

Case Study

Mr. Sharma is working with an IT company, and he has provided some data. On which he wants to do some operations, but he is facing some problem, help him:

Code:

import pandas as pd

ResultSheet={

'Naveen': pd.Series([90, 91, 97],

index=['Maths','Science','Hindi']),

'Rehana': pd.Series([92, 81, 96],

index=['Maths','Science','Hindi']),

'John': pd.Series([89, 91, 88],

index=['Maths','Science','Hindi']),

'Roja': pd.Series([81, 71, 67],

index=['Maths','Science','Hindi']),

'Mannat': pd.Series([94, 95, 99],

index=['Maths','Science','Hindi'])}

DF = pd.DataFrame(ResultSheet)

print(DF)

Output of the above code:


Based on the given information, answer the question No. 50 - 55.

50. He wants to add a new column with name of student ‘Prem’ in above data frame choose the right command to do so:

(a) DF['Prem']=[89,78,76]

(b) df['Prem']=[89,78,76]

(c) DF['Prem']=[89,78,76,67]

(d) DF['Name']=[89,78,76]

Answer: (a) DF['Prem']=[89,78,76]

51. He wants to set all the values to zero in data frame, choose the right command to do so:

(a) DF=0

(b) DF[]=0

(c) DF[:]=0

(d) DF[:]==0

Answer: (c) DF[:]=0

52. He wants to delete the row of science marks:

(a) DF.drop('Science', axis=1)

(b) DF.drop('Science', axis=0)

(c) DF.drop('Science', axis=-1)

(d) DF.drop('Science', axis==0)

Answer: (b) DF.drop('Science', axis=0)

53. The following code is to create another data frame, which he wants to add to the existing data frame. Choose the right command to do so:

Sheet1={

'Aaradhya': pd.Series([90, 91, 97],

                      index=['Maths','Science','Hindi'])}

S1=pd.DataFrame(Sheet1)

(a) DF.append(S1,axis=0)

(b) DF.append(S1)

(c) DF.insert(S1)

(d) DF.join(S1)

Answer: (b) DF.append(S1)

54. What will be the output of the given command?

        DF.index = ['A', 'B', 'C']

(a)

(b)

(c)

(d) Error, Index already exists and cannot be overwritten.

Answer: (b)

55. What will be the output of the given command?

print(DF.size)

(a) 15

(b) 18

(c) 21

(d) 23

Answer: (a) 15

===================FINISH====================




CLASS XI HALF YEARLY QP WTH MS 2024

  Half Yearly Examination: 2024-25 Informatics Practices (065) Class- XI       Time Allowed: 3hrs                                     ...