Xii-Informatics Practices-Qp-Set B-18-11-2021

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

COIMBATORE SAHODAYA SCHOOLS COMPLEX

&

MADURAI SAHODAYA SCHOOLS COMPLEX

AISSE/AISSCE
COMMON MOCK EXAMINATION
ACADEMIC YEAR 2021-22- TERM I
SET – B

065
ROLL NUMBER : SUBJECT CODE :
GRADE : XII SUBJECT : INFORMATICS PRACTICES
DATE : 18-11-2021 DAY : Thursday
MAX MARKS: 35 TIME : 90 minutes

GENERAL INSTRUCTIONS

1. The paper is divided into 3 Sections- A, B and C.


2. Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
3. Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
4. Section C, consists of Question number 50 to 55 and student need to attempt 5 questions.
5. All questions carry equal marks.
Section – A
Section A consists of 25 questions, attempt any 20 questions.
Q1. Python is an open source, BSD library built for Python Programming language. It offers:
a. high performance b. easy to use data structures
c. both a and b d. only b

Q2. ___________ command is used to create any empty series.


a. pd.Series( ) b. S=pd.Series(np.NAN)
c. S=pd.Series(empty) d. s=pd.Series()

Q3. Series is a _____ dimensional array like structure with__________ data, which can be
used to handle and manipulate data.
a. two, heterogeneous b. one, heterogeneous
c. one, homogeneous d. two, homogeneous

Q4. We can transpose a DataFrame by swapping its indexes and columns by using
____________ attribute.
a. Trans b. T c. swap d. index

Q5. Which method displays the first five rows of a DataFrame?


a. discover b. tail c. head d. hover

Q6. Which method is used to change the labels of rows and columns in DataFrame?
a. change( ) b. replace( ) c. rename( ) d. None of the above

Q7. An upward trend means positive correlation and downward trend means a negative
correlation are denoted by ________ chart.
a. Pie chart b. line Chart c. scatter chart d. none of the above

Q8. ________returns True if there are any NaN values; otherwise returns False.
a. obj.nbytes b. obj.dtype c. obj.ndim d. obj.hasans

Q9. A summarization tool for discrete or continuous data is called _________.


a. frequency polygon b. histogram c. box plot d. none of the above

Q10. The ______ argument of legend () provides the location for legend, which by default is 1
or upper right.
a.loc b. X label() c. Y label() d. Title()

Q11. DataFrame.loc[ ] is an important method that is used for ____________ with


DataFrames
a. Boolean based indexing b. Label based indexing
c. Both of the above d. None of the above

Q12. Which functions used to transfer data from dataframe to CSV files?
a. to_data() b. df_csv() c. to_csv() d. from_dataframe()

Q13. Which is the correct Pandas syntax to read in a csv file and assign it to a DataFrame df?
a. df = pd.read_csv('file.csv') b. df = read('file.csv', type = 'csv')
c. df = read_csv('file.csv') d. df = with open('file.csv') as pd.DataFrame

Q14. Which of the following object you get after reading CSV file?
a. Panel b. Character Vector
c. DataFrame d. All of the mentioned
Q15. Digital footprints are stored _______
a. Temporarily (for few days) b. for 7 days only
c. Permanently d. for 3 days

Q16. Online posting of rumors, giving threats online, posting the victim’s personal
information, comments aimed to publicly ridicule a victim is termed as __________
a. Cyber act b. Cyber bullying c. Cyber insult d. All of the above

Q17. The ____________ include right to copy (reproduce) a work, right to distribute copies of
the work to the public, and right to publicly display or perform the work.
a. Patent b. Copyright c. Createright d. None of the
above

Q18. Derogatory messages or comments posted online targeting people are


called__________.
a. social pretexting b. social engineering c. cyber trolls d. phishing

Q19. ___________ means using other’s work and not giving adequate citation for use.
a. Copyright b. Licensing c. Plagiarism d. None of the
above

Q20. A ____________ is a type of contract between the creators of an original work


permitting someone to use their work, generally for some price.
a. Distribute b. Copy c. Copyleft d. License
Q21. ____________ browser comes under FOSS.
a. Mozilla Firefox b. Chrome c. Internet explorer d. None of the above

Q22. A ___________ is some lines of malicious code that can copy itself and can have
detrimental effect on the computers, by destroying data or corrupting the system.
a. Computer virus b. Cyber crime c. Program d. Software

Q23. ______________ is the practice of attempting to acquire sensitive information from


individuals over the internet, by means of deception.
a. Spamming b. Hacking c. Phishing d. Identity theft

Q24. GPL stands for ___________


a. GNU Public Licens b. GNU General Private License
c. GNU General Public License d. General Public License

Q25. What is an example of e-waste?


a. Old cloths b. Old computer c. Old furniture d. Empty soda
bottles
Section – B
Section B consists of 24 Questions (26 to 49).
Attempt any 20 questions.

Q26. Write the output of the following:


import pandas as pd
series1 = pd.Series([10,20,30])
print(series1)
a. Output: b. Output: c. Output: d. Error

10 0 10 0
20 1 20 1
30 2 30 2

dtype: int64 dtype: int64 dtype: int64

Q27. What is the output for the following code?


import numpy as np
import pandas as pd
obj2=pd.Series( range(5))
print(obj2)

a. b. c. d. None of the above

Q28. What will be the output produced by the following code ?


Python Program:
dict = {'name':["aparna", "pankaj", "sudhir", "Geeku"],
'degree': ["BCA", "BCA", "M.Tech", "BCA"],
'score':[90, 40, 80, 98]}
df = pd.DataFrame(dict, index = [0, 1, 2, 3])
rf= df.index == 3
print(df[rf])
a. 0 aparna BCA 90 b. 2 sudhir M.Tech 80
c. 3 Geeku BCA 98 d. 1 pankaj BCA 40
Q29. To show all the rows of the Students_df DataFrame, for which the age of the student is
less than 17, which of the following needs to be issued?
a. Students_df[Students_df['Age']<18] b. Students_df['Age']<18
c. Students_df (Students_df['Age']<18) d. None of the above

Q30. In given code dataframe ‘D1’ has _____ rows and _____ columns.
import pandas as pd
S1 = pd.Series([1, 2, 3, 4], index = ['a', 'b','c','d'])
S2 = pd.Series([11, 22, 33, 44], index = ['a', 'bb','c','dd'])
D1 = pd.DataFrame([S1,S2])
a. 2, 6 b. 4, 6 c. 4, 4 d. 2, 4

Q31. Read the statements given below and identify the right option to draw a chart.
Statement A: A line plot is a graph that shows the frequency of data along a number line.
Statement B: The legend is displayed by default associating the colors with the plotted
data.
a. Statement B is correct b. Statement A is correct
c. Both Statements A and B are correct d. None of the statement is correct

Q32. Graph and charts are very effective tools for _________.
a. data frames b. data collection c. data visualization d. data dictionary

Q33. A software that can be freely accessed and modified is called_______.


a. Synchronous software b. Package software
c. Open Source Software d. Middle software
Q34. Consider the following statements with reference to the use of email:
Statement 1: Sending email text in capitals.
Statement 2: Inviting friends to participate in a school club activity.
Statement 3: Asking your teacher for help on assignment.
Statement 4: Responding to or forwarding spam emails.
Which of the above statements refer to appropriate use of email?
a. Statements 2 and 3. b. Statements 1 and 3.
c. Statements 3 and 4. d. Statements 2 and 4.

Q35. Identify the right type of chart using the following hints.
Hint 1: This chart is often used to visualize a trend in data over intervals of time.
Hint 2: The line in this type of chart is often drawn chronologically.
a. Bar Chart b. Line Chart c. Pie Chart d. Histogram
Q36. A class teacher of XII , want to plot a bar graph for the name of days on x-axis and total
students present on those days on y-axis to get the average weekly attendance. Complete
the code to perform the following
I. To plot the bar chart in statement 1
II. To show the chart in statement 2
import matplotlib.pyplot as pl
Days=['Mon','Tue','Wed','Thurs','Fri','Sat']
Present=[36,37,32,31,35,39]
____________________________statement 1
____________________________statement 2
a. pl.bar(No.,Days) Statement 1 b. pl.bar(Present,Present) Statement 1
pl.show() Statement 2 pl.show() Statement 2
c. pl.bar(Days,Present) Statement 1 d. pl.bar(Days,Days) Statement 1
pl.show() Statement 2 pl.show() Statement 2

Q37. The following code creates a dataframe named ‘D1’ with ______ rows.
import pandas as pd
Dt = [{'a':10, 'b':20}, {'a':5, 'b':10, 'c':20}]
D1 = pd.DataFrame(Dt)
a. 0 b. 1 c. 3 d. 2

Q38. The following two statement will return _______________


>>> DF.loc[:,'Name'] #DF is a DataFrame object
>>> DF['Name'] #DF is a DataFrame object
a. No Output b. Name column of DataFrame DF
c. Same output d. Different Output

Q39. We can now plot the DataFrame using the _____________


command and the_____________command to display it.
a. line and plt.show b. plot() and plt.show()
c. pyplot and plot.show d. None of the
above

Q40. Histogram represents quantitative data and Bar charts represent categorical data.
a. True, False b. False, True c. True, True d. False, False

Q41. Identify the correct output:


s=pd.Series([1,2,3,4,5],index=['a','b','c','d','e'])
print(s>2)
a. c 3 b. [3,4,5] c. d. An Error
d 4 a False
e 5 b False
dtype: int64 c True
d True
e True
dtype: bool
Q42. Read the code:
import matplotlib.pyplot as plt
plt.plot(3,2)
plt.show()
Identify the output for the above coding.

a. b.

c. d.

Q43. Write the correct output on execution of the following Pandas code:
import pandas as pd
df=pd.DataFrame([("Soham", 93),("Sidhant", 91),("Diya", 96)], columns=['Name',
'Mark'])
print(df.values)
a. Marks b. Name Marks c. Name d. [['Soham' 93]
96 Soham 93 Diya ['Sidhant' 91]
91 Siddhant 91 Siddhant ['Diya' 96]]
93 Diya 96 Soham

Q44. Predict the output for the following:


import pandas as pd
ob1=pd.Series([1.85,12.75,-15.75,-15.75,46.50])
ob2=pd.Series([1.50,12.75,24.00,35.25,46.50],['a','b','c','d','e'])
print("Testing expressions:")
print(ob2)
print()
a. . Output: b. Output: c. Output: d. Error in
Testing Testing expressions: i. Testing the
expressions: a 1.50 expressions: coding
a 1.50 b 12.75 ii. a -1.50
b 12.75 c 24.00 iii. b -12.75
d 35.25 iv. c -24.00
e 46.50 v. d -35.25
f dtype: float64 vi. dtype: float64

Q45. Directions: In the following question a statement of Assertion (A) is followed by a


statement of reason (R). Mark the correct choice as:
Assertion (A): Informal processing of electronic waste in general lead to various health
and pollution problems.
Reason (R) : Electronic waste contains toxic chemicals and metals like lead, cadmium,
mercury etc. When they are disposed on landfills these chemicals get enter into
surrounding soil, groundwater and ultimately reaches the human.
a. Assertion (A) is false but reason (R) is true.
b. Both Assertion (A) and reason (R) are true but reason (R) is not the correct explanation
of Assertion (A).
c. Assertion (A) is true but reason (R) is false.
d. Both Assertion (A) and reason (R) are true and reason (R) is the correct explanation of
Assertion (A).

Q46. Write the correct output on execution of the following Pandas code:
x=np.array( [[98.5,98.3,93], [40, 50.8, 80, 76],[21.3, 30.5, 42.8]])
df=pd.DataFrame(x)
print(df)
a. no output b. 0 [98.5, 98.3, 93] c. 2 [21.3, 30.5, 42.8] d. 0 [98.5, 98.3, 93]
1 [40, 50.8, 80,76]
2 [21.3, 30.5, 42.8]

Q47. Assertion (A): Hacking is the act of unauthorized access to a computer, computer
network or any digital system.
Reason (R): Cyber crime refers to the use of a computer to commit a crime.
a. Both Assertion (A) and reason (R) are true and reason (R) is not the correct
explanation Assertion (A).
b. Both Assertion (A) and reason (R) are true but reason (R) is the correct explanation of
Assertion (A).
c. Assertion (A) is true but reason (R) is false.
d. Assertion (A) is false but reason (R) is true.

Q48. Manoj downloaded software from internet (free of cost) and moreover the source code of
the software is also available which can be modified. What category of software is this?
a. Shareware b. Freeware c. Malware d. FOSS

Q49. Anupam found a crumpled paper under her desk. She picked it up and opened it. It
contained some text which was struck off thrice. But she could still figure out easily that
the struck off text was the email ID and password of Garvit , her classmate. What is
ethically correct for Rishika to do?
a. Use Garvit’s password to access his account
b. Inform Garvit so that he may change his password
c. Give the password of Garvit’s email ID to all other classmates
d. None of the above

Section - C
Section C, consists of 6 Question (50 to 55). Attempt any 5 questions.
Case Study
Consider the following DataFrame df:

Q50. In a DataFrame, Axis= 1 represents the elements.


a. Column b. row c. column index d. row index

Q51. Write the command to display the following output:


a. print(df.max) b. print(df.max()) c. print(df.max(axis=1)) d. print(df.max, axis=0)

Q52. What is the output of the following command?

a. 2000 b.1800 c. 3600 d.3000

Q53. Which of the following statement/s will give the exact number of values in each column
of the dataframe?
a. print(df.count()) b. print(df.count(-1)) c. print(df.count) d. print(df.count(axis=’index’))

Q54. Which of the following command will display the column labels of the DataFrame?
a. print(columns()) b. print(df.column()) c. print(df.column) d. print(df.columns)

Q55. To add a new column, the sales quarters for Oracle with the values 2200,
33000,45000,2300 to the DataFrame. Help her choose the command to do so:
a. df.column=[2200, 33000,45000,2300]
b. df [‘Oracle’]=[ 2200, 33000,45000,2300]
c. df.loc[‘Oracle’]= [2200, 33000,45000,2300]
d. Both (b) and (c) are correct

You might also like