Informatics Practices XII (Q P)

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

Delhi Public School Jodhpur

Term II Examination
Session 2020-21
Subject: Informatics Practices[065]
Class XII
General Instructions:
Read the following instructions very carefully and follow them.
1. This question paper contains two Sections A (20 Marks) and B (30 marks). Each Section is
compulsory.
2. Please check that this question paper contains 32 questions on 4 printed pages.
3. Please write down the Serial number of the question before attempting it.
4. All questions are compulsory within each section

SECTION - A
Q.1. In DataFrame the dimension of data structure is. [1]
a. 1D
b. 2D
c. 3D
d. None of the above
Q.2. Which of the following command will display the column labels of the DataFrame? [1]
a. print(df.columns())
b. print(df.column())
c. print(df.column)
d. print(df.columns)
Q.3. Ms. Verma, the class teacher wants to add a new column, the scores of Grade with the values, ‘ A’, [ 1 ]
‘B’, ‘A’, ‘A’, ‘B’, ‘A’ ,to the DataFrame. Help her choose the command to do so:
a. df.column=[’A’,’B’,’A’,’A’,’B’,’A’]
b. df [‘Grade’]=[’A’,’B’,’A’,’A’,’B’,’A’]
c. df.loc[‘Grade’]= [’A’,’B’,’A’,’A’,’B’,’A’]
d. Both (b) and (c) are correct
Q.4. Identify the correct statement : [1]
a. The standard marker for missing data in Pandas is NaN.
b. Series act in a way similar to that of an array
c. Both (a) and (b)
d. None of the above
Q.5. Series ________ is immutable but _____mutable. [1]
a. Size,Value
b. Value,Size
c. Row,Column
d. None of the above
Q.6. Which of the following is not a text function. [1]
a. TRIM()
b. INSTR()
c. MID()
d. MOD()
Q.7. To get the day name from a date,________function is used. [1]
a. Day()
b. Dt_Name()
c. Dayname()
d. None of the above
Q.8. SELECT SUBSTR ('Sakilakumari', -5, 3); will display the output [1]
a. lik
b. uma
c. aku
d. none of the above
Q.9. To display the jobs where the number of employees is less than 3. [1]
a. SELECT JOB, COUNT (*) FROM EMP WHERE COUNT (*) < 3;
b. SELECT JOB, COUNT (*) FROM EMP WHERE COUNT (*) < 3 GROUP BY JOB;
c. SELECT JOB, COUNT (*) FROM EMP GROUP BY JOB WHERE COUNT (*) < 3;
d. SELECT JOB, COUNT (*) FROM EMP GROUP BY JOB HAVING COUNT (*) < 3;
Q.10. To display the name of employees who are getting more salary than the maximum salary of clerks. [1]
a. SELECT ENAME FROM EMP WHERE SAL > (SELECT MAX(SAL) FROM EMP WHERE
JOB=’CLERK’);
b. SELECT ENAME, MAX(SAL) FROM EMP WHERE JOB= ‘CLERK’;
c. SELECT ENAME FROM EMP WHERE SAL >MAX(SAL);
d. SELECT ENAME, SAL FROM EMP WHERE SAL>SELECT MAX(SAL) FROM EMP;
Q.11. The practice of taking someone else's work or ideas and passing them off as one's own is known as [1]
______________.
Q.12. I can keep you signed in. [1]
I can remember your site preferences.
I can give you locally relevant content.
Who am I?
Q.13. Which of the following is not an intellectual property? [1]
a. A poem written by a poet.
b. An original painting made by a painter.
c. Trademark of a Company.
d. A remixed song.
Q.14. _______are the records and traces individuals’ activities as they use the Internet. [1]
Q.15. Which of the following is a disadvantage of ‘Proprietary’ software? [1]
a. You need to be an expert to edit code.
b. You have to pay for this type of software.
c. It’s licensed
d. It is launched after proper testing
Q.16. For web pages where the information is changed frequently, for example, stock prices, weather [ 1 ]
information which out of the following options would you advise?
a) Static web page
b) Dynamic web page
Justify your answer.
Q.17. The first page on the website that allows you to navigate to other pages via menu system or links is [1]
known as:
a. Front page
b. Primary page
c. Home page
d. Main page
Q.18. ________ field of email compose box allows to send same message to multiple recipients without [1]
getting them know about other recipients.
Q.19. Which amongst the following is not an example of browser? [1]
a. Chrome
b. Firefox
c. Avast
d. Edge
Q.20. Which portion of the URL below records the directory or folder of the desired resource? [1]
http://www.somestore.com/firstfloor/shoes.htm
a. HTTP
b. firstfloor
c. www .somestore.com
d. Shops. Htm
SECTION B
Q.21. Consider a given Series , M1: [2]
Sales
Jan 89
Index Feb 90
March 99

Write a program in Python Pandas to create the series.


Q.22. Find the output of the following code: [2]
import pandas as pd
data = [{'a': 10, 'b': 20},{'a': 6, 'b': 32, 'c': 22}]
#with two column indices, values same as dictionary keys
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)
Q.23. Answers the following questions: [2]
a. Shobhit has written following code to display the last four rows for the dataframe Df ,he has
written the following code :
Df.Tail()
But last 5 rows are being displayed. Identify the errors and rewrite the correct code so that last
4 rows get displayed.
b. Why is the following code not renaming the index and columns even when code is executing
without any error.
DF1. rename(columns={'Deptno':'Department','Dname':'Sales'})
Q.24. What is reindexing in Python. Support your answer with suitable code. [2]
Q.25. Suppose a data frame contains information about student having columns rollno, name, class and [2]
section. Write the code for the following:
(i) To add one more column as fee.
(ii) To delete column fee of data frame.
Q.26. Priyanshi is using her internet connection to book a flight ticket. This is a classic example of leaving [2]
a trail of web activities carried by her. What do we call this type of activity? What is the risk involved
by such kind of activity?
Q.27. Harsh has recently started working in MySQL. Help him in understanding the difference between the [2]
following :
(i) Where and Having clause
(ii) Count(column_name) and Count(*)
Q.28. Ms. Khushi has many electronics gadgets which are not usable due to outdated hardware and software. [2]
Help her to find any three best ways to dispose the used electronic gadgets.
Q.29. What do you understand by cyberstalking? [1]
Q.30. Write the SQL function which will perform the following operations: [4]
a) To display the name of the year of the current date .
b) To remove spaces from the beginning of a string, “ Panorama ”.
c) Name a function of MySQL used to give the first occurrence of a string2 in string1.
d) To display the name of the day eg, Friday or Sunday from your date of birth, dob.
Q.31. A relation Vehicles is given below : [4]
Car_Id Model Company Price Qty
A01 BREEZA MARUTI 1100000 17
B02 VERNA HYUNDAI 1300000 12
C02 I20 HYUNDAI 1000000 8
B04 SCORPIO MAHINDRA 1400000 23
C05 THAR MAHINDRA 1300000 15
C08 AURA HYUNDAI 800000 6
C09 CIYAZ MARUTI 1500000 7
Write SQL commands to:
a. Display the average price of each company having total quantity more than 20.
b. Count the model of vehicles manufactured by each company.
c. Display the maximum price of each company .
d. Display name of that model whose price is lowest price.
Q.32. Write python statements to create a data frame using dictionary with name Staff for the following [ 5 ]
data.
EName Age Designation Salary Comm
Raj 20 Clerk 15000 12500
Vinay 35 Manager 80000 20000
Kapil 45 Accountant 75000 10000

Perform the following operations on the DataFrame:


a) Add Salary and Comm of an employee and assign to column “Total”
b) Display the Designation of Vinay in the DataFrame.
c) Update Kapil’s salary to 70000 and comm to 15000

You might also like