Informatics Practices
Informatics Practices
Class XII
INFORMATICS PRACTICES (SUBJECT CODE – 065)
2ND PRE-BOARD EXAMINATION (2020-21)
General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
Page-1
Q1 State whether True or False : 1
a. thick
b. thickness
c. width
d. barwidth
Q3 With WQL, how can you return the number of non null records in the Project 1
field of “Students” table ?
a. SELECT COUNT(Project) FROM Students
b. SELECT COLUMNS(Project) FROM Students
c. SELECT COLUMNS(*) FROM Students
d. SELECT COUNT(*) FROM Students
Q4 To display the 3rd , 4th, and 5th columns from the 6th to 9th rows of 1
dataframe DF, you can write ______.
a. DF.loc[6:9, 3:5]
b. DF.iloc[6:10, 3:6]
c. DF.loc[6:10, 3:5]
d. DF.iloc[6:9, 3:5]
b. shape
c. values
d. ndim
Q6. The plot which tells the trend between two graphed variables is the _______ 1
graph/chart.
a. line plot
b. bar graph
c. histogram
Page-2
Q7 A network having a span of city, is called as _________ 1
Q8 In a DataFrame, Axis= 1 represents the elements. 1
Q9 The____is a network device that connects dissimilar network. 1
Q10 In URL, http://www.python.com/er/main.html, which component identifies 1
the protocol or types of the server.
Both the case study based questions (22 & 23 ) are compulsory. Attempt
any four sub parts from each question. Each sub question carries 1 mark .
Page-3
Q22 Consider the following DataFrame df and answer any four questions from
(i)- (v)
I. print(df['Population'])
II. print(df('Population'))
III. print(df.Population)
IV. print(df.(Population))
Choose the correct option :
(a) Only I
(b) Only II and III
(c) Only I and III
None of above
(ii) Now suppose that you want to display which state has more than 350 schools 1
what command you will write for this purpose :
a. print(df[df['School']>350])
b. print(df[df['School']==350])
c. print(df[df[School]>=350])
d. None of these
(iii) Which of the following commands will display the elements of dataframe in 1
array format?
a. print(df.size)
b. print(df.shape)
c. print(df.shape())
d. print(df.values)
(iv) Which command is used to check whether the dataframe is empty or not? 1
a. Isnan()
b. empty
c. Isnull()
d. None of above
(v) Which of the following terms is not true with reference to DataFrame? 1
Page-4
(a) It has two axes
(b) Columns can have data of same types
(c) DataFrame is mutable.
(d) All of above is true
(a)
(b)
(c)
(d)
(a) SELECT NAME, DOJ FROM WORKER WHERE GENDER="F" ORDER BY DOJ;
(b) SELECT NAME, DOJ FROM WORKER WHERE GENDER="F" ORDER BY NAME DESC;
(c) SELECT NAME, DOJ FROM WORKER WHERE GENDER="F" ORDER BY NAME;
(d) SELECT NAME, DOJ FROM WORKER WHERE GENDER="F" ;
Page-5
(iii) Ragav wants to know number of male and female employee in table worker what the 1
command he will write :
(a) SELECT GENDER, COUNT(*) GROUP BY GENDER FROM WORKER;
(b) SELECT COUNT(*) FROM WORKER WHERE GENDER = “M” OR GENDER=”F”;
(c) SELECT COUNT(*) FROM WORKER WHERE GENDER = “M” AND GENDER=”F”;
(d) SELECT GENDER, COUNT(*) FROM WORKER GROUP BY GENDER;
(iv) Sangita want to display the month in field DOJ which command she will use for this : 1
(a) SELECT DAYOFMONTH(DOJ) FROM WORKER;
(b) SELECT MONTH(DOJ) FROM WORKER;
(c) SELECT DATE(DOJ) FROM WORKER;
(d) ALL OF ABOVE.
Q24 Total number of medals to be won is 250 in the inter school games held 2
every alternate year. Write code to create a Series object that stores these
medals for games to be held in the decade 2020-2029.
Q25 State any two differences between single row functions and multiple 2
row functions.
OR
What is the difference between the order by and group by clause when
used along with the select statement. Explain with an example.
Q26 Consider the decimal number x with value 8459.2654. Write commands in 2
SQL to:
i. round it off to a whole number
ii. round it to 2 places before the decimal.
Q27 Consider the following Series object mark 2
Amit 345
Harsh 200
Rajnish 350
Manish 400
Aman 450
Dolly 250
Suman 370
(a) Display the marks of Amit.
(b) Display the marks of those student whose score less than 200.
Page-6
Q28 What are the aggregate function? Explain with suitable example? 2
Q29 Write SQL commands to display: 2
Or
Considering the string “Preoccupied”
Write SQL commands to display:
Section-II
Q34 Consider the following Series object school 3
Lucknow 350
Delhi 230
Mumbai 350
Punjab 400
Bihar 322
Write the command for following :
(a) Change the value of state Punjab by 450.
(b) Display the data of state Bihar, Mumbai.
(c) Display which state has maximum number of school.
Q35 What do you mean by Identity theft? Explain with the help of an example. 3
OR
What do you understand by Net Etiquettes? Explain any two such etiquettes.
Q36 Create multiple line charts on common plot where three data ranges are 3
plotted on same char. The data ranges to be plotted are
data=[[5, 25, 45, 20], [8,13,29,27], [9,29, 27,39]]
Page-7
Note the following point when writing the code :
(a) Three line should be of three different color .
(b) Display the legend
Or
Create horizontal bar graph with following data
obj = ['python', 'c++', 'java', 'Perl', 'lisp']
performance=[10, 8, 6, 2, 1]
Note the following point when writing the code :
(a) Title of graph is “Programming language”
(b) The color of bar graph is red.
for its office and web based activities. It has four buildings as shown in the
diagram below :
Page-9
Alpha Gamma
Beta
Lambda
X----------------------X
Page-10