12 IP HY BluePrint-Assignment 2024
12 IP HY BluePrint-Assignment 2024
MCQ
No Topic 2-Marks 3-Marks TOTAL
1-Mark
T. Marks 20 26 24 70
IP ASSIGNMENT FOR CLASS XII
General Instructions:
➢ This question paper contains two parts, A and B. Each part is compulsory.
➢ Both Part A and Part B have choices.
➢ Part A has two sections:
▪ Section-I is short answer questions, to be answered in one word or one line (Any 15 question).
▪ Section-II has two case study questions. Each case study has 5 case-based sub-parts. An examinee is to
attempt any 4 out of the 5 sub-parts.
➢ Part B is Descriptive Paper, has three sections:
▪ Section-I is short answer questions of 2 marks each in which two questions have internal options.
▪ Section-II is long answer questions of 3 marks each in which two questions have internal options.
▪ Section-III is very long answer questions of 5 marks each in which one question has internal options.
PART A – Section I
1. _________ method can be used to change the index of rows & columns of a series or dataframe [1]
(i) rename() (ii) reindex()
(iii) reframe() (iv) none of these
2. The command used to make the grid visible in the graph is ...................... . (1)
(i) plt.visible() (ii) plt.setgrid(true)
(iii) plt.grid(True) (iv) plt.grid(true)
3. Fill in the blanks with the appropriate SQL function which returns the following output. (1)
mysql> Select _____________ (3,3);
+----------------+
27
+----------------+
(i) Truncate (ii) Round
(iii) Mod (iv) Pow
4. DataFrame is ............. mutable as well as ............. mutable. (1)
5. Choose the correct way to create a Series using a dictionary: (1)
(i) S1= pd.Series(["One":1,"Two":2,"Three":3])
(ii) S1= pd.Series({"One":1,"Two":2,"Three":3})
(iii) S1=pd.Series(("One":1,"Two":2,"Three":3))
(iv) S1=pd.Series("One":1,"Two":2,"Three":3)
6. Which Python package is used for creating 2D graphics? (1)
7. .......................... helps in locating a particular website or a web page. (1)
8. The function used to get the original index values in a dataframe is .......................... . (1)
9. Consider a series object vls, created using following statement and write the output: (1)
vls= pd.Series([11, 23, 31, 61, 87, 93], index=[‘a’, ‘b’, ‘c’, ‘d’, ‘f’])
10. ............................. print(vls)is the process of storing your website on the web server to be accessed by
everyone on the web. (1)
11. What SQL statement do we use to find the total number of records present in the table Report? (1)
(i) Select * from Report; (ii) Select Count(*) from Report;
(iii) Select Sum() from Report; (iv) Select Total() from Report;
12. Which of the following is not a type of cybercrime? (1)
(i) Data theft (ii) Phishing
(iii) Damage to data (iv) Installing antivirus
13. Write a command to delete the column "SportsFee" from a DataFrame "FeeRecord". (1)
14. I can connect two dissimilar networks. (1)
I can perform necessary translation to provide communication. I
can be used to reduce network traffic. Who am I?
15. Identify the odd one: (1)
Microsoft Office, Adobe Photoshop, Libre Office, Coral Draw
16. Copying and pasting data from the internet or other digital resources is termed as ................. (1)
17. The term used for discarded or unwanted electrical or electronic devices such as CPUs, keyboard, TVs,
Mobile phones, LEDs, digital camera, etc., is called ..................... . (1)
18. The SQL command used to retrieve the records of absent students in Science (column) subject from
Student table is .......................... . (1)
(i) Select * from student where science = Null;
(ii) Select * from Student where Science='Null';
(iii) Select * from Student where Science Is Null;
(iv) Select Science =Null from Student;
19. What is the importance of Distinct keyword in MySQL? (1)
20. A .......................... is a device that enables a computer to connect to a network and communicate. (1)
21. Unsolicited commercial email is known as .......................... . (1)
(i) Malware (ii) Virus
(iii) Spyware (iv) Spam
Section II
Both the case study-based questions (22 & 23) are compulsory. Attempt any four sub-parts from each question.
Each sub-question carries 1 mark.
22. Consider the following DataFrame ‘df’ that stores Covid active cases in a society block-wise. Answer
any four questions from (i) to (v).
Bloc Total Case
k Members s
0 A 200 10
1 B 170 6
2 C 230 9
3 D 190 22
(i) Write the command to display cases in ascending order. (1)
(a) print(df.sort_values("cases"))
(b) print(df.sort_index("cases"))
(c) print(df.sort_values("cases"), ascending=False)
(d) print(df.sort_index("cases"), ascending=True)
(ii) The manager of a society wants to add a new column “Recover” with the following data [3,4,6,11]. Help
him find the correct command. (1)
i. df['Recover']=[3,4,6,11] ii. df[Recover]=[3,4,6,11]
iii. df.Recover=[3,4,6,11] iv. df['Recover']=3,4,6,11
Choose the correct option:
(a) both (i) and (ii) (b) only (ii)
(c) (i) and (iii) (d) (i), (ii) and (iv)
(iii) Consider the above values of 'Recover' column and write the output of the following code: (1)
>>> df = df.TotalCases = df.cases - df.Recover
>>> df
(a) 0 10
1 7
2 11
3 2
(b) 3 11
2 3
1 2
0 7
(c) 0 7
1 2
2 3
3 11
(d) 0 17
1 1
1 6
3 10
(iv) Write a command to set the index to block. (1)
(a) df.set_index('Block', inplace=True) (b) df.set_values ('Block', inplace=True)
(c) df.reset_index('Block', inplace=False)
(d) df.set_values 'Block', inplace=True
(v) Write a command to display the rows of the DataFrame. (1)
(a) df.values() (b) df.rows
(c) df.columns() (d) df.values
23. Consider the table Employee given below:
Table: EMPLOYEE
EmpId EmpName Salary Department Age Gender DateofJoinin
g
E1001 Rohit 25000 Admin 28 M 2019-03-02
E1002 Mohit 35000 Accounts 34 M 2016-04-23
E1003 Vishal 30000 Clerical 27 M 2018-05-12
E1004 Deepak 45000 IT 45 M 2019-09-10
E1005 Shreya 60000 Finance 55 F 2019-08-12
E1006 Poonam 38000 Accounts 35 F 2020-02-10
(i) Select the right command that will display the details of all the employees whose salary is in the
range of 30000 to 50000. (1)
i. Select * from Employee where Salary between 30000 or 50000;
ii. Select * from Employee where Salary between 30000 and 50000;
iii. Select * from Employee where Salary = 30000 and salary = 50000;
iv. Select * from Employee where Salary>=30000 and salary<=50000;
Choose the correct option:
(a) Both (ii) and (iii) (b) Both (ii) and (iv)
(c) Both (i) and (iii) (d) Only (iii)
(ii) Select the right command that will display the name of the youngest employee getting higher
salary than others. (1)
i. Select EmpName, Min(Age), Max(Salary) from Employee;
ii. Select EmpName, Max(Age), Min(Salary) from Employee;
iii. Select EmpName, Max(Age) from Employee group by Salary;
iv. Select Min(Age), Max(Salary) from Employee;
A.10
(iii) State the command that will give the output as: (1)
EmpName
Deepak
Shreya
Poonam
PART B – Section I
24. Create a Series that depicts Month as index and Sales as values from two different lists: (2)
Month=['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
Sales=[1000,1200,1100,800,1600,600]
(ii) mysql> Insert Into School Values<NULL,'Jai',14,'IP12',892822887>; Consider the structure of the
table school and the two commands given above. While inserting the Null value in AadharCardNo
field, it accepts but when inserting in RollNo field, it gives an error. What could be the possible
reason? Differentiate between the two of them.
OR
Differentiate between Char and Varchar data type with the help of an example.
OR
Define the following terms:
(i) Attribute (ii) Cardinality
(iii) Degree (iv) Tuple
30. How is Series data structure different from a Data Frame data structure? Explain with the help of example.
(2)
31. Expand the following terms related to Computer Networks: (2)
(i) NSFNET (ii) MAC
(iii) TCP/IP (iv) OSI
Section II
34. Write a Python code to create the following DataFrame Library using Python Pandas. Give index as
‘B1’,‘B2’,‘B3’,‘B4’. (3)
ItemNo ItemName Price
I99 Sugar 100
I10 Tea 150
I50 Coffee 200
I60 Green Tea 250
(i) Display Item Number and Name whose price is less than 150.
(ii) Display detail of different types of Tea available in Shop.
(iii) Display the DataFrame.
35. Prakash wants to prepare a report on IT Act that deals with cybercrime. Help him prepare a report that
includes Identity theft and Credit Card account theft. (3)
OR
List three emotional and physical symptoms of internet addiction.
36. Write a Python program to display a bar chart of the number of students in a school. Use different
colours for each bar. (3)
Sample data:
Class: I,II,III,IV,V,VI,VII,VIII,IX,X
Strength: 38,30,45,49,37,53,48,44,36,46
OR
Write a Python program to plot the given bar graph to depict the popularity of various programming
languages. Label the graph with x-axis, y-axis, y-ticks and title.
Data : Programming languages: Python, C++, Java, Perl, Scala, Lisp
Usage= 10,8,6,4,2,1
Section III
39. Write a program in Python Pandas to create the following DataFrame ‘Order’ for an online shopping
app: (5)
OrderId Ordername Price Delivery Date of Delivery Location
Charges
FK100 Purse 1800 50 2020-10-09 Delhi
FK101 Shoes 1100 50 2020-11-11 Ghaziabad
FK102 Watch 800 30 2020-04-12 Karol Bagh
FK103 Belt 500 30 2020-09-03 Gurugram
FK104 Shirt 2200 50 2020-11-10 Palam
(i) Display DataFrame ‘Order’.
(ii) Calculate the Total price of orders along with delivery charges and assign to a new column Total.
(iii) Display records of those orders which have delivery charges greater than 30.
40. Write the SQL commands which will perform the following operations: (5)
(i) To display total characters in a string field “FacultyName”.
(ii) To round the argument x that contains number 234.6789 to 3 decimal places.
(iii) To return the last 5 characters from a string field “LastName”.
(iv) To display Day name of your date of birth field.
(v) To display 2 characters starting from the 3rd position from the string field “Address”.
OR
Consider a table Teacher that contains the following data:
EmpNo FName LName Subject Qualification Salary Post
1 Sandeep Verma S.St. B.Ed 25409.789 TGT
2 Sonia Kumari Computer BCA 21200.456 TGT
3 Nirmal Sharma Hindi B.Ed 38274.657 PGT
4 Sanjeev Shastri Sanskrit B.Ed. 28782.228 TGT
5 Rakesh Sharma English B.Ed. 32892.487 PGT
Write SQL queries using SQL functions to perform the following operations:
(i) To display Teacher’s first name where ‘ee’ occurs in the first name.
(ii) To join First Name and Last name of the teachers with some space in between.
(iii) To display contents of “Qualification” field in small letters.
(iv) To display first 2 characters of the “Subject” field.
(v) To round off the salary to the nearest integer.
###