0% found this document useful (0 votes)
143 views12 pages

Ip 2019

The document provides instructions for a test paper containing 5 questions divided into 4 sections (A, B, C, D). Section A contains 2 questions on data handling and data frames. Section B contains questions on basic software engineering. Section C contains questions on data management. Section D contains questions on society, law and ethics. Candidates are instructed to write their roll number and code on the answer book and attempt all questions by writing the question number before each answer.

Uploaded by

Nasla Abdulsalam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views12 pages

Ip 2019

The document provides instructions for a test paper containing 5 questions divided into 4 sections (A, B, C, D). Section A contains 2 questions on data handling and data frames. Section B contains questions on basic software engineering. Section C contains questions on data management. Section D contains questions on society, law and ethics. Candidates are instructed to write their roll number and code on the answer book and attempt all questions by writing the question number before each answer.

Uploaded by

Nasla Abdulsalam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Code No.

90/C
Candidates must write the Code on the
Roll No.
title page of the answer-book.

 Please check that this question paper contains 12 printed pages.


 Code number given on the right hand side of the question paper should be
written on the title page of the answer-book by the candidate.
 Please check that this question paper contains 5 questions.
 Please write down the Serial Number of the question in the answer-book before
attempting it.
 15 minute time has been allotted to read this question paper. The question
paper will be distributed at 10.15 a.m. From 10.15 a.m. to 10.30 a.m., the
students will read the question paper only and will not write any answer on the
answer-book during this period.

INFORMATICS PRACTICES (NEW)


Time allowed : 3 hours Maximum Marks : 70

Instructions :
• All questions are compulsory (within questions there may be choices).
• The question paper is divided into four sections — A, B, C and D.
• Section A comprises of questions 1 and 2.
(i) Question 1 comprises Data Handling-2 (Series, Numpy).
(ii) Question 2 comprises of questions from Data Handling-2 (Data
Frames and its operations).
• Section B comprises of questions from Basic Software Engineering.
• Section C comprises of questions from Data Management-2.
• Section D comprises of questions from Society, Law and Ethics-2.

.90/D 1 P.T.O.
SECTION A
Answer the following questions :
1. (a) Find the output of the following program : 1
import numpy as np
Profits=np.array([1520, 1245, 1345, 1525, 2110, 1020,
1725])
print(Profits[2:5])
(b) Fill in the blank with appropriate numpy method to change the
contents of the given 1 dimensional array Val1D into a
2 dimensional array Val2D with 3 rows and 2 columns per row : 1
import numpy as np
Val1D=np.array([15,25,35,45,55,65])
Val2D = __________________________
(c) Fill in the blank with the correct statement to plot a bar graph using
a matplotlib method, so that Company ABC can see the graphical
presentation of its Profit figures for the 2nd quarter of the financial
year 2019 (i.e. August, September, October, November). 1
import matplotlib.pyplot as mtp
Months = ['AUG', 'SEP', 'OCT', 'NOV'] #X Axis
Profits = [125, 220, 230, 175] #Y Axis
________________________________
mtp.show()
OR
A pie chart is to be drawn (using pyplot) to represent Population of
States. Fill in the blank with correct statement using a matplotlib
method to draw the pie chart with labels for the pie slices as the
names of the States and the size of each pie slice representing the
corresponding Population of the States (in crores), as per the
following table : 1
States Population
Rajasthan 6.8
Karnataka 6.1
Tamilnadu 7.2
Goa 1.5

.90/D 2
import matplotlib.pyplot as plt
States = ['Rajasthan','Karnataka','Tamilnadu','Goa']
Population = [6.8,6.1,7.2,1.5]
_____________________________
plt.show()

(d) Write the output of the following Python code : 2

import numpy as np
Score1=(np.array([90,92,94,96,95])
Score2=(np.array([95,90,98,96,92])
S1=(np.where(Scorel>Score2))
S2=(np.where(Score2>Score1))
print(Score1[S1], Score2[S2])

(e) The table below shows the Marks of two students for the four unit
tests for academic session 2019-2020. Fill in the blanks to draw a
line graph with Test Names on the X axis and Marks on the Y axis. 2
Marks
Tests
Rohit Suman
Unit1 85 97
Unit2 88 99
Unit3 89 90
Unit4 87 92

import matplotlib.pyplot as plt


Tests = ___________________ #Assign Test Names
Rohit = ___________________ #Assign Marks of Rohit
Suman = ___________________ #Assign Marks of Suman
plt.plot(Tests, Rohit, Suman)
__________ #Label Y axis as Marks
__________ #Add legends "Rohit", "Suman" for the lines
plt.show()

.90/D 3 P.T.O.
(f) Write single line Pandas statements for each of the following.
(Assuming necessary modules have been imported) : 2
(i) Declare a Pandas series named Packets having dataset as :
[125, 92, 104, 92, 85, 116, 87, 90]
(ii) Display the median of the elements present in the dataset of
Packets using the Pandas method for it.
(g) Write Numpy single line statement for each of the following from (i)
to (iii). 3
(i) To create a 3  2 array named ARR2D with the following
values. (Assuming necessary modules have been imported as
np) :
ARR2D
10 20
30 40
50 60

(ii) Assign the contents of the above array ARR2D to a new 1D


array named ARR1D.

(iii) Display content of array ARR1D as follows :


[10, 20, 30, 40, 50, 60]
OR
Write Numpy single line statement for each of the following from (i)
to (iii). 3
(i) To create a 4  3 array named ARR with the following values.
(Assuming necessary modules have been imported as np) :
ARR
10 20 30
40 50 60
70 80 90
100 110 120

.90/D 4
(ii) Topple the contents of the array ARR upside down so that its
contents become :
ARR
100 110 120
70 80 90
40 50 60
10 20 30
(iii) Display the changed content of the arry ARR in the following
format :
[[100 110 120]
[70 80 90]
[40 50 60]
[10 20 30]]

2. (a) Write the correct option from (i) to (iv) for the method used in
Pandas to calculate the correlation of values stored in a dataframe. 1
(i) cor()
(ii) correlate()
(iii) corr()
(iv) correlation()

(b) Write the correct output on execution of the following Pandas code : 1
import pandas as pd
df=pd.DataFrame([("Om",93),("Jay",91)],columns=['Name',
'Mark'])
print(df.sort_values('Name', ascending=True))

(c) Write the correct output on execution of the following Pandas code : 1
import pandas as pd
df1= pd.DataFrame(["First","Second"],columns=['Col'])
df2= pd.DataFrame(["Third","Fourth"],columns=['Col'])
df = pd.concat([df2, df1], ignore_index=True)
print(df)
.90/D 5 P.T.O.
(d) Write the correct output on execution of the following Pandas code : 1
import pandas as pd
df = pd.DataFrame({"A":[1,3,2], "B":[5,1,4], "C":[3,4,7],
"D":[4,6,5], "E":[2,5,3]})
print(df.quantile([0.5], axis = 1) )

(e) Write the correct output on execution of the following Pandas code : 2
import pandas as pd
df = pd.DataFrame({'Name': ['Raj', 'Rita', 'Priya'],
'Type': ['Teacher', 'Student', 'Student'],
'Code': ['T01', 'S101', 'S102']})
print(df.pivot('Code','Type','Name'))

(f) Write the correct output on execution of the following Pandas code : 2
import pandas as pd
df = pd.DataFrame({"A": ["P01", "P02", "P03"],
"B": ["Pen", "Pencil", "Eraser"]})
df=df.rename(columns={"A": "PID", "B": "PNAME"})
df=df.rename(index={0: 'A', 1: 'B', 2: 'C'})
print(df)
OR
Write the use of the rename(mapper=<dict-like>, axis=1)
method for a Pandas Dataframe. Can the mapper and columns
parameter be used together in a rename() method ? 2

(g) Consider a dataframe STOCK created with the following information.


Write single line Pandas statements for each of (i), (ii) and (iii).
(Assuming necessary modules have been imported as df) : 3
ITEMS ID QUANTITY
0 PEN 1001 500
1 PENCIL 1004 300
2 ERASER 1007 280

.90/D 6
(i) To display the total number of all ITEMS in the STOCK
(ii) To display the total QUANTITY of all ITEMS in the STOCK
(iii) To display the Average QUANTITY of all ITEMS in the STOCK
OR
Consider a dataframe Travel created with the following
information. Write single line Pandas statements for (i), (ii) and (iii) :
T_Id Type Amount
0 T_01 TO 550
1 T_02 FROM 300
2 T_03 TO 280
3 T_02 FROM 250
4 T_03 FROM 410
(i) To display the maximum value of the column Amount
(ii) To display the sum of Amounts for each Type separately (i.e.
sum of TOs and sum of FROMs)
(iii) To display the mean for the column Amount 3

(h) Consider a set of information for an Exam conducted for students


with following details : 3

Names Marks Trials Passed

Sanya 95 2 yes

Krish 70 3 no

Rishav 96.5 1 yes

Deepak 75 2 no

Kriti 92 1 yes

Write a Pandas code to create a Dataframe named df with the above


information with column names as ‘‘Names’’, ‘‘Marks’’, ‘‘Trials’’ and
‘‘Passed’’ and their values as given in the table. The code should
then display the total number of rows and Total number of columns
in the Dataframe separately as follows :

.90/D 7 P.T.O.
Number of Rows : 5
Number of columns : 4

NOTE : The code must use Dataframe methods to display the Total
number of rows and Total number of columns in the dataframe.
(i) For the above created Dataframe df in Q.2(h) write single line
statements for each of the following parts (a) to (d), which use
Pandas method : 4
a. To display the 'Names' and 'Marks' columns from the
DataFrame.
b. To change the 'Marks' in the 4th row (i.e. for index 3) to 91.5
c. To display the rows where number of 'Trials' in the
examination is less than 2 and 'Marks' is greater
than 95
d. To sort the DataFrame in descending order of 'Marks'

SECTION B

3. (a) List any two advantages of Iterative Model in Software


development. 1
(b) List any two advantages of Component Based Model in Software
development. 1
(c) What is pair programming in Agil Method of Software
development ? 1
(d) List any one advantage and one disadvantage of a Waterfall Model
of Software Development. 2
OR
List any one advantage and one disadvantage of an Evolutionary
model of Software Development. 2
(e) What are the phases of an Agile Method in Software Development ?
Write any one advantage and one disadvantage of an Agile Method. 3

OR

Write any three benefits of an Incremental model over Waterfall


model. 3
.90/D 8
(f) Match the following Software development models in first column
with their respective suitability in the second column : 3
Spiral Software development approach based on iterative
development.
Agile Take feedback on an initial implementation, and
evolve through several versions until an acceptable
system has been developed.
Incremental Each loop represents a phase.

(g) (i) List any two properties of an actor in a Use Case Diagram. 4
(ii) Draw the diagrammatic notations to represent an Actor and a
Use Case in Use Case Diagrams.

OR
(i) List any two properties of a Use Case in a Use Case Diagram. 4
(ii) What is an Association Link in a Use Case Diagram ? Draw a
diagrammatic notation to represent an Association Link
between a Student and the act of Borrowing Books.

SECTION C

4. (a) Which SQL command is used to modify the existing structure of a


table ? 1
(b) Write whether the following statement is True or False for the GET
method in Django : 1
‘‘GET requests are never cached’’

OR
Write whether the following statement is True or False for the
POST method in Django : 1
‘‘POST requests should always be used for sensitive data’’
(c) Which of the following are correct aggregate functions in SQL : 1
(i) AVERAGE()
(ii) MAX()
(iii) COUNT()
(iv) TOTAL()

.90/D 9 P.T.O.
(d) Which of the following are not the correct names of Python files
created by django-admin inside the folder
"MyProject/MyProject" when we start a DJango project with a
command 1
"django-admin startproject MyProject"
(i) urls.py
(ii) admin.py
(iii) MyProject.py
(iv) Settings.py

(e) Write the names of any two DML commands of SQL. 1

(f) Explain each of the following with illustrations using a table : 3


1. Candidate Key
2. Primary Key
3. Foreign Key

(g) Observe the following tables TRANSACTIONS and CUSTOMERS


carefully and answer the questions that follow : 3
TABLE : TRANSACTIONS TABLE : CUSTOMERS

TNO TYPE AMOUNT CNO CNO CNAME

T1 CREDIT 1000 C3 C1 ZEESHAN

T2 DEBIT 1500 C1 C2 AMAN

C3 JASPREET

(i) What is the Degree of the table TRANSACTIONS ? What is


the cardinality of the table CUSTOMERS ?

(ii) Identify the primary key and candidate keys from the table
TRANSACTIONS.

.90/D 10
(h) Write SQL queries for (i) to (iii) and the outputs for (iv) and (v),
which are based on the following table PARTICIPANTS 4

Table : PARTICIPANTS
PNO EVENT SNAME CLASS DOB
P1 DEBATE SANYAM 12 2001-12-25
P2 DEBATE SHRUTI 10 2003-11-10
P3 DEBATE MEHER 12 2001-11-10
P4 QUIZ SAKSHI 11 2002-10-12
P5 QUIZ RITESH 12 2001-10-12
P6 QUIZ RAHUL 10 2003-10-12
P7 CROSSWORD AMEER 11 2002-05-09
P8 CROSSWORD MINAKSHI 12 2001-05-09

(i) To display details of all PARTICIPANTS of CLASS 10 and 12


(ii) To display the SNAME and CLASS of all PARTICIPANTS in
ascending order of their SNAME.
(iii) To display the number of PARTICIPANTS along with their
respective CLASS, of every CLASS.
(iv) SELECT DISTINCT EVENT FROM PARTICIPANTS;
(v) SELECT MAX(DOB), PNO FROM PARTICIPANTS GROUP BY
PNO HAVING COUNT(*)>1;

OR
Write Python code for the following : 4
(a) To create a MySQL connection named db for localhost, with
username = "teacher" and password = "myclass"
(b) To create a database cursor named as dbcrsr.
(c) To open a database named "CLASS" using the above declared
database cursor dbcrsr.
(d) To add a new record into the table "STUDENT" in the above
connected database, "CLASS" with details for the attributes
(SNo, SName, Marks) as ("S102", "Tanya", 92.5)

.90/D 11 P.T.O.
SECTION D
5. (a) A software company purchases new computers every year and
discards the old ones into the local dumping yard. Write the name of
the most appropriate category of waste that the organisation is
creating every year, out of the following options : 1
(i) Business Waste
(ii) Commercial Waste
(iii) Solid Waste
(iv) E-Waste

(b) Write names of any two common types of Intellectual Property


Rights which are protected by the law. 1

(c) A research student is expected to write a thesis on a topic. The


student browses Internet for the topic and luckily finds it on the
Internet. He copies and submits the entire thesis as his own
research work. Which of the following activities appropriately
categorises the act of the writer ? 1
(i) Spamming
(ii) Phishing
(iii) Plagiarism
(iv) Trojan
(d) What is Open Source Software ? Write the names of any two
software which can be categorized as Open Source. 2
(e) Suggest techniques which can be adopted to impart Computer
Education for : 2
(i) Visually impaired students (someone who cannot see).
(ii) Mobility challenged students (someone who cannot write).
(f) Write any three benefits of crowdsourcing. 3

OR
Write any three features of smart mobs. 3

.90/D 12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy