Вы находитесь на странице: 1из 8

SET-B

KENDRIYA VIDYALAYA SANGATHAN (AGRA REGION)


XII- PRE BOARD EXAMINATION 2019-20

INFORMATICS PRACTICES (Marking Scheme)

Section A
1 a) Find the output of the following program. (1 mark
for correct
import numpy as np
answer)
roll_number = np.arange(1,10,1)
print(roll_number[::-2])

Answer: [9 7 5 3 1]
b) Sumit wants to create a numpy array having 2 rows and 4 columns (1 mark
for
filled with all 1s. Fill in the blanks with appropriate data to create
correctly
the required array: filling the
blanks)
import numpy as np
np.ones ([2,4])
c) Statement 1 : pl.plot(roll_no, marks) (1 mark
for
Statement 1 : pl.xlabel(“Roll Number”)
correctly
Or filling the
blanks)
Statement 1 : pl.barh(class, student_count)
Statement 1 : pl.xlabel(“Classes”)
( ½ mark for each correct statement)
d) [1 2] [ 3 100] [12 4 1 3] (2 marks
for correct
output)
e) . import matplotlib.pyplot as pl (2 marks
for correct
import numpy as np
code)
x=np.array([1,2,3,4])
y=[]
z=[]
for i in x:
y.append(i**3)
z.append(i*3)
pl.bar(x,y, color='r', width=0.3)
pl.bar(x+0.3,z, color='b', width=0.3)

Page 1 of 8
pl.show()
f) import pandas as pd (2 mark
for correct
import numpy as np
code)
data = {'a' : 0., 'e' : 1., 'i' : 2.,’o’:3.,’u’:4.}
s = pd.Series(data)
print (s)
g) . Create an 4x4 array and perform the following operations using 3 (1 mark
python operations: for each
i. Divide all the elements with 10 part)
ii. Calculate square of each element of an array
iii. Perform addition of an array with itself
Answer:
import numpy as np
import math
a= np.array([[1,2,3,4],[2,3,4,5],[1,2,1,2], [3,3,4,5]])
print(a)
i. print(a/10)
ii. print(a**2)
iii. print(a+a)
OR
Create an 3x2 array and perform the following operations using
python operations:
i. Calculate remainder of all elements when divided
by 4
ii. Multiplication of all the elements with 8
iii. Adding 17 to array
Answer:
import numpy as np
import math
a= np.array([[10,12],[2,13],[9,21]])
i. print(a%4)
ii. print(a*8)
iii. print(a+17)
(1 mark for each part)
2 a) iv. applymap() (1 mark
for
choosing
correct
option)
b) <DF>.T (1 mark
for correct
Or
answer)
del <Df object>[<column name>]
c) Name Age (1 mark
Friend1 Shraddha 28 for correct
Friend2 Monica 34 output)
Page 2 of 8
Relative1 Yogita 29
d) 0 (1 mark
0 300.0 for correct
1 400.0 output)
2 500.0
e) Quartiles Q1, Q2 and Q3 are three points that divide a distribution (2 marks
into 4 parts. The 4-quantiles are called quartiles. With a quantile, for correct
the values of the distribution do not need to be multiple of 0.25 answer)
while quartiles are multiple of 0.25.
f) import pandas as pd (2 marks
d={‘Name”:[‘MANOJ’,’SANJAY’,’VIKASH’,’VIVEK’, for correct
‘SAHIL’], ‘Age’: [30 , 34, 42, 45, 53], ’Designation’ :[ ‘PGT’, answer)
’TGT’,’PRT’,’PGT’,’PGT’]}
df=pd.DataFrame(d)

Or
i. df.loc[:,['Name', 'Designation']]
ii. df['Age'].mean()
g) .(i) wdf.sum(axis=1) 3(1 mark

(ii) wdf.loc [6 : , ].mean() for each


correct
(iii) wdf.loc [:7, ‘maxTemp’:’Rainfall’]. mean()
answer)
OR

i. Write the code to create df1 and df2 dataframes.


import pandas as pd
import math as mt
d1= {'marks1':[30,40,15,40], 'marks2':[20,45,30,70]}
d2= {'marks1':[10,20,25,50], 'marks2':[15,25,30,30]}
d1= pd.DataFrame(d1)
d2= pd.DataFrame(d2)
print(d1)
print(d2)
ii. Write the command to add df1 and df2.
df1+df2
iii. Write a command to find the average of marks1 column of
df2 dataframe.
df2['marks1'].mean()
h) Ans. English Chemistry Maths Physics 3 marks
Student1 NaN 78 78 45
Student2 NaN 70 67 56 for correct
Student3 NaN 90 87 65 answer

Page 3 of 8
i) Ans. I. 4(1 mark
0 1 2 for each
0 1 2 3
1 4 5 6 correct
answer)
0 1 2
0 3 2 5
1 5 7 8

0 1 2
0 5 5 5
1 4 4 4
II.
Output for dfr1+dfr2:
0 1 2
0 4 4 8
1 9 12 14
Output for dfr1.add(dfr2):
0 1 2
0 4 4 8
1 9 12 14
III.
Output for dfr2-dfr1:
0 1 2
0 2 0 2
1 1 2 2
Output for dfr2.rsub(dfr2):
0 1 2
0 -2 0 -2
1 -1 -2 -2

IV.
iteritems() − to iterate over the (key,value) pairs
iterrows() − iterate over the rows as (index,series) pairs
itertuples() − iterate over the rows as
named tuples
Section B
3 a) i. Waterfall (1 mark
for correct
answer)
b) . ii. Scalability (1 mark
for correct
answer)
c) Commit refers to updating the file in local repository on a (1 mark
distributed version control system. for correct
Push refers to updating the file in remote repository on a answer)
distributed version control system.

Page 4 of 8
d) Scrum is an agile process framework for managing complex 2
knowledge work, with an initial emphasis on software
development, although it has been used in other fields and is
slowly starting to be explored for other complex work, research
and advanced technologies It is designed for teams of ten or fewer
members, who break their work into goals that can be completed
within timeboxed iterations, called sprints, no longer than one
month and most commonly two weeks, then track progress and re-
plan in 15-minute time boxed stand-up meetings, called daily
scrums.
OR
Sprint is one timeboxed iteration of a continuous development

cycle. Within a Sprint, planned amount of work has to be

completed by the team and made ready for review. The term is

mainly used in Scrum Agile methodology but somewhat basic

idea of Kanban continuous delivery is also essence of Sprint

Scrum.

Sprint literal meaning is a short race at full speed. Accordingly,

teams usually define a short duration of a Sprint up to 2-4 weeks.

Team collaboratively sets their target with Product Owner

as “Sprint Goal” and plan their work in “Sprint backlog”. As soon

race starts after planning session, team work together to complete

planned work effectively and make it ready for review by the end

of that period.

e) A software process (also known as software methodology) is a set 3 marks


of related activities that leads to the production of the software. for correct
These activities may involve the development of the software answer
from the scratch, or, modifying an existing system.
Any software process must include the following four activities:
1. Software specification (or requirements engineering): Define

Page 5 of 8
the main functionalities of the software and the constrains around
them.
2. Software design and implementation: The software is to be
designed and programmed.
3. Software verification and validation: The software must
conforms to it’s specification and meets the customer needs.
4. Software evolution (software maintenance): The software is
being modified to meet customer and market requirements
changes.
f) The goal of a customer in relation to our money vending machine 3 marks
(ATM) is to withdraw money. So, we are adding Withdrawal use- for correct
case. Withdrawing money from the vending machine might
answer
involve a bank for the transactions to be made. So, we are also
adding another actor – Bank. Both actors participating in the use-

case should be connected to the use-case by association. Money


vending machine provides Withdrawal use-case for the customer
and Bank actors.

g) All agile methods have to conform to a set of rules called Agile 4 marks
Manifesto. The main four guidelines: for correct
1. Individuals and interactions-In agile development, self- answer
organization and motivation are important, as are
interactions like co-location and pair programming.
2. Working software-Working software is more effective than
presenting documents to clients in meetings.
3. Customer collaboration-Continuous Customer
involvement is very important because requirements
cannot be fully collected at the beginning of the software
development cycle.
4. Responding to change-Agile development is focused on
quick responses to change and continuous development.
Or
Page 6 of 8
Draw a Business use-case diagram for Restaurant Management
system.
Ans Draw a Business use-case diagram for Restaurant Management
system.

Section C
4 a) python manage.py startapp abc (1 mark
for correct
answer)
b) an alternate key (1 mark
OR for correct
UPDATE command is used to change or modify data in existing answer)
table
c) A connection in MySQL is the session between an application and (1 mark
database system. for correct
answer)
d) iv SELECT * FROM Persons (1 mark
for correct
answer)
e) iii. Structured Query Language (1 mark
for correct
answer)
f) (i) CHAR datatype specifies a fixed length character string. On 3(1 mark
the other hand, VARCHAR datatype specifies a variable for each
length character string. correct
(ii) COUNT (*) returns the number of rows in a table, including difference
NULL values and duplicates. On the other hand COUNT )
(column_name) returns number of non-null values.
(iii) DELETE command is used to delete rows from the table
whereas DROP command is used to drop the table from the
database.
g) (i) Degree=7 and Cardinality=3 3(1 mark
(ii) ALTER TABLE CLUB ADD Address Varchar(30); for correct

Page 7 of 8
(iii) UPDATE CLUB SET PAY=PAY+PAY*.05 WHERE answer)
SEX=’F’;
h) (i) SELECT GNAME FROM GARMENT WHERE 4(1 mark
SIZE=’L’; for each
(ii) SELECT GCODE, GNAME FROM GARMENT correct
WHERE GNAME LIKE ‘Ladies%’; query and
(iii) SELECT GNAME,GCODE, PRICE FROM ½ mark
GARMENT WHERE PRICE BETWEEN 1100 AND for each
1600; correct
(iv) 4 output)
Section D
5 a) ‘Plagiarism’ is stealing someone else’s intellectual work and (1 mark
representing it as your own work without citing the source of for correct
information. answer)
b) The Information Technology Amendment Act,2008 (1 mark
for correct
answer)
c) A Smart mob is an organized group of people who have gathered (1 mark
through the use of social media to protest for a publicized social or for correct
political cause. answer)
d) She should check whether it is a valid bank site or not by checking 2 marks
the in the url https. It is always better to type the url and then login for correct
to the site. She should not click on the link provided in the email. answer
e) Fraud committed using the Internet is called Online fraud. 2 marks
Example: Stealing information, fraudulent payments, non-deliverd for correct
goods, non-existent companies etc. answer
f) Filtering and matching of the content being displayed and 3 marks
delivered on the internet, as per the reader’s personal interests, for correct
views and liking, is known as ‘Internet as Echo Chamber’. answer
OR
To ensure secure data transmission, majorly following techniques
are applied:
1. SSL secure data transmission.
2. Data Encryption.
3. Using Safe protocols.

Page 8 of 8

Вам также может понравиться