0% found this document useful (0 votes)
37 views11 pages

6205solved Ip CL Xii 2020

This document contains a solved question paper for Class 12 on the subject of Informatics Practices. The question paper contains two parts - Part A with two sections, and Part B with one section. Part A includes multiple choice and short answer questions testing concepts related to Python, Pandas, SQL, and general computer science topics. Part B includes two multi-part questions requiring explanations of differences between data structures and the meaning of data aggregation in Pandas.

Uploaded by

Jom Jerry
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)
37 views11 pages

6205solved Ip CL Xii 2020

This document contains a solved question paper for Class 12 on the subject of Informatics Practices. The question paper contains two parts - Part A with two sections, and Part B with one section. Part A includes multiple choice and short answer questions testing concepts related to Python, Pandas, SQL, and general computer science topics. Part B includes two multi-part questions requiring explanations of differences between data structures and the meaning of data aggregation in Pandas.

Uploaded by

Jom Jerry
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/ 11

SOLVED QUESTION PAPER

CLASS – XII
SUBJECT: INFORMATICS PRACTICES (065)

PART A
SECTION – I
1 State whether True or False
Attempt : questions from questions 1 to 21
any 15

(i) Online personal acoount, personal websites are examples of Digital 1


property. __True___
(ii) In OSS source code is not usually hidden from the users. __True__
2 Fill in the blanks : 1
The command used to draw line graph is
a. plt.show() b. plt.plot()
c. plt.line() d. plt.title()
3 Write the output of the following SQL command. 1
select round(298.88,-1);
a. 200 b. 290 c. 300 d. 298.9
4 Given a Pandas series called Sequences, the command which will 1
display the first 4 rows is .
a. print(Sequences.head(4)) b. print(s.iloc[:3])
c. Both a and b d. print(sequences.head(4))

5 Given the following Series S1 and S2: 1

S1 S2
A 10 A 80

B 40 B 20

C 34 C 74

D 60 D 90
Write the command to find the sum of series S1 and S2
print(S1+S2)
6 Using Python Matplotlib can be used to count how many 1
values fall into each interval
a. line plot b. bar graph c. histogram

Page 1 of 11
7 To prevent unauthorized access to and / or from the network, a system 1
known as Firewall , can be implemented by hardware and / or
software.

8 In a DataFrame, Axis= 0 represents the Rows elements. 1


9 Which of the following is not a network protocol: 1
TCP/IP, FTP , HTTP, UTP

10 For web pages where the information is changed frequently, for 1


example, stock prices, weather information which out of the
following options would you advise ?

a) Static web page b) Dynamic web page


Justify your answer. Displayed info changes as per backend
11 In Pandas the function used to check missing values in a DataFrame is __ 1
df.isnull().any() OR df.isnull().values.any()
________
12 The practice of taking someone else's work or ideas and passing them of as 1
one's own is known as Plagirism
13 The Length() function in MySql is an example of . 1
a. Math function b. Text function c. Date Function d. Aggregate Function
14 I can keep you signed in. 1
I can remember your site preferences.
I can give you locally relevant content.
Who am I ? Cookies
15 Which amongst the following is/are not an example(s) of web browser? 1
a. Chrome
b. QuickHeal
c. Avast
d. Edge
16 A mail or message sent to a large number of people indiscriminately 1
without their consent is called _Spam__
17 Intellectual property rights protect the use of information and ideas 1
that are of:
(a) Ethical Value (b) Moral Value (c) Social Value (d) Commercial Value
18 The _DDL_ category of commands can not be rollbacked in SQL. 1

19 Write the SQL command that will display the current system date 1
CURDATE()
20 SWITCH network device is known as an intelligent hub. 1

21 Receiving unwanted emails from unknown sources repeatedly is an 1


example of ___SPAMMING________
.

Page 2 of 11
PART A SECTION – II
22 (i) Explain dataframe. Can it be considered as 1D Array or 2D Array? 1
Dataframe is a 2-Dimensional Array with heterogeneous data usually represented in a
tabular format. It can be considered as 2D Array.
(ii) Explain Matplotlib. 1
Matplotlib is a Python 2D plotting library which produces publication quality
figures/charts in a variety of hard copy formats and interactive environments
across platforms
(iii) Give the output for following statement: 1
a = pd.DataFrame([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'],columns=['one'])
one
a 1.0
b 1.0
c 1.0
d NaN
(iv) Give the output for following statement: 1
import pandas as pd
data = [1,2,3,4,5]
df = pd.DataFrame(data)
print(df)
0
0 1
1 2
2 3
3 4
4 5
(v) Consider given data: 1
Marks
Term1 45
Term2 65
Term3 24
Term4 89
Write a program in Python Pandas to create the series named as M1.
Import pandas as pd
Marks=[45,65,24,89]
M1=pd.Series(Marks, index=["Term1", "Term2","Term3","Term4"])
print(" Marks")
print(M1)

Page 3 of 11
23 Write SQL commands and output for the following on table SPORTS:
StudentNo Class Name Game1 Grade1 Game2 Grade2
10 7 Sameer Cricket B Swimming A
11 8 Sujit Tennis A Skating C
12 7 Kamal Swimming B Football B
13 7 Veena Tennis C Tennis A
14 9 Archana Basketball A Cricket A
15 10 Arpit Cricket A Athletics C
(i) Display the names of the students who have grade ‘A’ in either Game1 1
or Game2 or both.
(ii) Display the games taken by the students whose name starts with ‘A’. 1
Give the output of the following SQL Statements
(iii) SELECT DISTINCT Class FROM SPORTS; 1
(iv) SELECT MAX(Class) FROM SPORTS; 1
(v) SELECT COUNT(*) FROM SPORTS GROUP BY Game1; 1
(i) Select name from SPORTS where Grade1=’A’ OR Grade2=’A’;
(ii) Select Game1,Game2 from SPORTS where Name LIKE ‘A%’;
(iii) 7 8 9 10
(iii) 10 (v) 2 2 1 1
PART – B
SECTION – I
24 Write two points of difference between series data structure and 2
DataFrame data structure?
A series is a one-dimensional object that can hold homogeneous data of
any type such as integers, floats and strings.It has only one axis.
Data mutable but size immutable
A dataframe is a two-dimensional object that can hold hetrogeneous data
types. Individual columns of a dataframe can act as a separate series
object.. Data and size mutable
25 What is meant by data aggregation in Pandas? 2
Aggregation is the process of turning the values of a dataset (or a subset of
it) into one single value or, we can say, data aggregation is a multi-value
function which requires multiple values and returns a
single value as a result. There are a number of aggregations possible in
Pandas like count(), sum(), min(),max(), median(), quartile() etc.

26 Giving suitable example differentiate between reindex() and rename()? 2


reindex() to change sequence of index whereas; rename() to change
names/ labels of indexes in a series and dataframe.

df.reindex([2,1, 0,4,3])
df.reindex(columns=['name','runsscored','age'])

df1.rename(index={0:'zero',1:'one'})
df1.rename(columns={“Marks1”:'A',”Marks2”:'B'})

Page 4 of 11
27 Write the name of any four types of plots and four methods offered by 2
matplotlib.pyplot
Matplotlib offers several types of plots:- Line Graph, Bar graph Histogram,
Scatter Plot, Area Plot Pie Chart
Various methods used with pyplot:- plot() show() title() xlabel() ylabel()
explode() bar() hist() box plot() scatter()
28 Giving suitable example of each explain following methods: 2
read_csv() (ii) to_csv()
To read from CSV file and create dataframe and write dataframe in CSV file
respectively. df= pd.read_csv(“ABC.CSV”)
df.to_csv(“TRY.CSV”)

29 Write the output of the following code: 2

import pandas as pd
data = {'Day':[1,2,3,4,5,6],
"Visitors":[1000,700,6000,1000,400,350],
'Bounce_Rate':[25,30,23,27,23,34]}
df = pd.DataFrame(data)
print (df.T)
df.at[7,"Visitors"]=1500
df.iat[3,2]=37
print(df)
print (df.ndim)
print (df.shape)
OR
Give the output for the following code.

import pandas as pd
data = [{'a': 1, 'b': 2},{'a': 5, 'b': 10, 'c': 20}]
#With two column indices, values same as dictionary key
df1 = pd.DataFrame(data, index=['first', 'second'],columns=['a', 'b'])
#With two column indices with one index with other name
df2 = pd.DataFrame(data, index=['first', 'second'], columns=['a', 'b1'])
print(df1)
print(df2)

Page 5 of 11
0 1 2 3 4 5
Day 1 2 3 4 5 6
Visitors 1000 700 6000 1000 400 350
Bounce_Rate 25 30 23 27 23 34

Day Visitors Bounce_Rate


0 1.0 1000.0 25.0
1 2.0 700.0 30.0
2 3.0 6000.0 23.0
3 4.0 1000.0 37.0
4 5.0 400.0 23.0
5 6.0 350.0 34.0
7 NaN 1500.0 NaN

2
(7, 3)
OR
a b
first 1 2
second 5 10
a b1
first 1 NaN
second 5 NaN
30 Write the code in pandas to create the following dataframes : 3
df1 df2
mark1 mark2 mark1 mark2
0 10 1 50 0 30 20
1 40 451 1 20 25
2 15 302 2 20 30
3 40 703 3 50 30
Also write the commands to do the following operations on the dataframes
given above :
(ii) To subtract df2 from df1
(ii) To change index label of df1 from 0 to zero and from 1 to one
print(df1-df2)
df1.rename(index={0:'zero',1:'one'})
31 The function returns its argument with a modified shape, 2
whereas the method modifies the array itself.
(i) reshape,resize
(ii) resize,reshape
(iii) reshape2,resize
(iv) all of the Mentioned
reshape,resize

Page 6 of 11
32 Write a Python program to display a bar chart of the popularity of 2
programming Languages
Data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
import matplotlib.pyplot as plt
proglang = ['Java', 'Python', 'PHP', 'JavaScript', 'C#', 'C++']
popularity = [22.2, 17.6, 8.8, 8, 7.7, 6.7]
plt.bar( proglang, popularity, color='blue')
plt.xlabel("Languages")
plt.ylabel("Popularity")
plt.title("Popularity of Programming Language\nWorldwide, Oct 2017
compared to a year ago")
# Turn on the grid
plt.minorticks_on()
plt.grid(which='major', linestyle='-', linewidth='0.5', color='red')
# Customize the minor grid
plt.grid(which='minor', linestyle=':', linewidth='0.5', color='black')
plt.show()

PART B
SECTION – II
33 Giving suitable example of each explain the use of following functions in 4
MySQL :
(i) MOD() (ii) INSTR() (vii) DATE() (viii) SIGN()
To find remainder MOD(7,2) will give output 1
To find location INSTR(“CORPORATE FLOOR”,”OR”) 2
To extract date part DATE(“2020-12-15 11:15:16”) 2020-12-15
To check a number is negative positive or zero SIGN(-45) -1

34 Which SQL keyword is used to give column alias. 1


Keyword AS is used to give column alias. Example-
SELECT SAL*12 AS “ANNUAL SALARY” FROM EMP;

35 Find the odd one out and justify: 1


(i) DROP (ii) TRUNCATE (iii) ALTER (iv) DELETE
Delete. DML whereas; other belongs to DDL category.
36 Giving suitable example of each write the difference between Single-Row 2
Functions and Multiple-Row Functions in SQL.

Page 7 of 11
Single row functions perform on individual rows or records and returns the
answer either as integer or string. For example, ucase(),mid(), length()
and trim() etc. On the other hand, multiple row functions perform on a
range of values and always return the result as a numeric value or
number. For example, Aggregate functions like sum(), count(), max(),
min() & avg() etc.
37 Compare Having clause and Order by clause? 1
Having clause is used with group by clause in MySQL. It is
used to provide condition based on grouped data. On the other hand, order
by clause is an independent clause used to arrange records of a table in
either ascending or descending order on the basis of one or more columns.

38 .What is difference between SYSDATE() and NOW() functions in MySQL. 1


SYSDATE() returns time of its own execution whereas; NOW() returns
constant time ie time of command’s execution.

39 Reena created a table named student, she wants to see those students whose name 1
ending with ‘p’ She wrote a query-
SELECT * FROM student WHERE name=”p%”;
Help Reena to run the query by removing the errors from the query and rewriting it.
Select * from student where name like “%p”;

40 Sanjeev is not able to reduce the salary of employee. Which constraint has he used 1
while creating table?
Check constraint CHECK SAL>50000
PART B
SECTION – III

Page 8 of 11
41 (i) Mention any one point of similarity between shareware and freeware 1
software.
Similarity- Source code is not available in both.

OR
Define the term network topology?
Pattern of interconnecting nodes in a network. Eg. STAR, RING,BUS
topology
(ii) 2
Expand the terms: (i) SMTP (ii) DNS
(i) Simple Mail Transfer Protocol (ii) Domain Name System/Service

(iii)
The IIBM has to set up its new branch at Manipur for its office and web based 2
activities. It has four wings of buildings having number of computers shown in
the table:
Number of Computers in various blocks:
Wing X 50
Wing Z 130
Wing Y 40
Wing U 15
(i) Suggest the most suitable place (i.e. Wing) to house the server of this
organization with a suitable justification.
(ii) Suggest the placement (i.e. Wing) of the Hub/Switch with justification.
(i) Wing Z because maximum number of computers
(ii) Hub/Switch should be placed in Each Wing to connect computers in
that wing
42(i) Leaking your company data to the outside network without prior permission 1
of senior authority is a crime true or false.
(i) True
(ii) False
(ii) What types of data are stolen by cyber-criminals in most of the cases? 1
(i) Data that will pay once sold
(ii) Data that has no value
(iii) Data like username and passwords only
(iv) Data that is old
(iii) Write the appropriate usage of social networks. 1
OR
What are the different way in which authentication of a person can be
performed?.

Page 9 of 11
A social networking service (also known as social networking site, or SNS
or social media) is an online platform which people use to build social
networks or social relationships with other people who share similar
personal or career interests, activities, backgrounds or real- life
connections
OR
Password, User ID, Biometric etc.
(iv) Reena has recently shifted to a new city and new college. She does not 2
know many people in her new city and college. But all of a sudden,
someone starts posting negative, demeaning comments on her social
networking profile, college site’s forum, etc. She is also getting repeated
mails from unknown people. Every time she goes online, she finds
someone chasing her online.
(i) What is happening to Reena?
(ii) What action should she take to stop them?
OR
Write any two relevant methods of e-waste management?
(i) Reena has become a victim of cyber bullying and cyber stalking.
(ii) She must immediately bring it to the notice of her parents and college
authorities and report this cyber crime to local police with the help of her
parents.

OR
Recycle, Resale, Use environment friendly devices etc.
43 Write commands in SQL for (i) to (iii) and output for (iv) and (v). 5
Table : Store
+---------+----------------+----------------+--------+---------+------------+---------+---------
| StoreId | Name | Location | City | NoOfEmp |DateOpen |SalesAmt
+---------+----------------+----------------+--------+---------+------------+----------+------+
| S101 | Planet Fashion | Bandra | Mumbai | 7 | 2015-10-16 | 40000
| S102 | Vogue | Karol Bagh | Delhi | 8 | 2015-07-14 |12000
| S103 | Trends | Powai | Mumbai | 10 | 2015-06-24 |30000
| S104 | SuperFashion | Thane | Mumbai | 11 | 2015-02-06 | 45000
| S105 | Annabelle | South Extn. | Delhi | 8 | 2015-04-09 |60000
| S106 | Rage | Defence Colony | Delhi | 5 | 2015-03-01 |20000
+---------+----------------+----------------+--------+---------+------------+----------+-----+
(i) To display names of stores along with SalesAmount of those stores that
have ‘u’ as second charater and ‘fashion’ anywhere in their store names.
(ii) To display Stores names, Location and DateOfOpen of stores that
were opened before 1st March, 2015.
(iii) To display the City and the number of stores located in that City, only if
number of stores is more than 2.
(iv) Select Min(DateOpen) from Store;
(v) Select Count(Distinct City) As “City Count” From Store;

Page 10 of 11
(i) Select Name,SaleAmt from Store where Name like “_u%Fashion%”;

Select Name,SaleAmt from Store where Name like “_u” and name like
“% Fashion%”;

(ii) Select Name,Location,DateOpen from Store where DateOpen<


“2015-03-01”;
(iii) Select City, Count(StoreId) from Store group by City Having
Coutnt(StoreId)>2;
(iv) 2015-02-06
(v) City Count
2

Page 11 of 11

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