0% found this document useful (0 votes)
99 views70 pages

Asm 11152

Uploaded by

UNKNOWN YT
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)
99 views70 pages

Asm 11152

Uploaded by

UNKNOWN YT
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/ 70

SAMPLE QUESTION PAPER

(THEORY) CLASS XII SESSION:


2024-25 INFORMATICS PRACTICES
(065)

Time allowed: 3 Hours Maximum Marks:70

General Instructions:
• Please check this question paper contains 37 questions.
• All questions are compulsory. However, internal choices have been provided in
some questions. Attempt only one of the choices in such questions
• The paper is divided into 5 Sections- A, B, C, D and E.
• Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
• Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
• Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
• Section D consists of 2 case study type questions (33 to 34). Each question
carries 4 Marks.
• Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
• In case of MCQ, text of the correct answer should also be written.

Q No. Section-A (21 x 1 = 21 Marks) Marks


1 State whether the following statement is True or False:
1
Slicing can be used to extract a specific portion from a Pandas Series.
2 The purpose of WHERE clause in a SQL statement is to:
• Create a table
• Filter rows based on a specific condition 1
• Specify the columns to be displayed
• Sort the result based on a column

3 Identify the networking device responsible for routing data packets based on
their destination addresses.
• Modem
1
• Hub
• Repeater
• Router

4 Identify the SQL command used to delete a relation (table) from a relational
database.
• DROP TABLE
1
• REMOVE TABLE
• DELETE TABLE
• ERASE TABLE

5 e-waste refers to:


• Software that has become obsolete
• Data that has been deleted from a storage device 1
• Viruses that infect computers
• Electronic devices that are no longer in use

6 Which of the following Python statements can be used to select a column


column_name from a DataFrame df ?
• df.getcolumn('column_name')
1
• df['column_name']
• df.select('column_name')
• df(column_name)
7 By default, the plot() function of Matplotlib draws a plot.
• histogram
• column 1
• bar
• line

8 State whether the following statement is True or False:


In SQL, the HAVING clause is used to apply filter on groups formed by the 1
GROUP BY clause.

9 Which of the following Python statements is used to import data from a CSV file
into a Pandas DataFrame (Note: pd is an alias for pandas)?
• pd.open_csv('filename.csv')
1
• pd.read_csv('filename.csv')
• pd.load_csv('filename.csv')
• pd.import_csv('filename.csv')

10 What is plagiarism? 1

(A) Using copyrighted material without giving proper acknowledgement to the


source
(B) Downloading illegal software.
(C) Spreading misinformation online.
(D) Hacking into computer systems.

11 Fill in the Blank


The COUNT(*) function provides the total number of within a
relation (table) in a relational database.
(A) Columns 1
(B) Unique values
(C) Not-null values
(D) Rows
12 In which of the network topologies do all devices connect to a central point, such
as a switch or hub?
(A) Star
1
(B) Bus
(C) Tree
(D) Mesh

13 In a Pandas DataFrame, if the tail() function is used without specifying the


optional argument indicating the number of rows to display, what is the default
number of rows displayed, considering the DataFrame has 10 entries?
(A) 0 1
(B) 1
(C) 4
(D) 5

14 Identify the type of cybercrime that involves sending fraudulent emails to


deceive individuals into revealing sensitive information.
(A) Hacking
1
(B) Phishing
(C) Cyberbullying
(D) Cyberstalking

15 While creating a Series using a dictionary, the keys of the dictionary become:
1
(A) Values of the Series

• Indices of the Series


• Data type of the Series
• Name of the Series
16 Match the following SQL functions/clauses with their descriptions:

• P-2, Q-4, R-3, S-1


• P-2, Q-4, R-1, S-3
• P-4, Q-3, R-2, S-1
• P-4, Q-2, R-1, S-3

17 Fill in the Blank


Boolean indexing in Pandas DataFrame can be used for .
• Creating a new DataFrame
1
• Sorting data based on index labels
• Joining data using labels
• Filtering data based on condition

18 Which Matplotlib plot is best suited to represent changes in data over time?
• Bar plot
• Histogram 1
• Line plot
• Histogram & Bar plot

19 Which type of network covers a small geographical area like a single office,
building, or school campus?
• PAN
1
• MAN
• LAN
• WAN

Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose
the correct option as:
• Both Assertion (A) and Reason (R) are true, and Reason (R) is the
correct explanation of Assertion (A)
• Both Assertion (A) and Reason (R) are true, but Reason (R) is not
the correct explanation of Assertion (A)
• Assertion (A) is True, but Reason (R) is False
• Assertion (A) is False, but Reason (R) is True

20 Assertion (A): We can add a new column in an existing DataFrame.


1
Reason (R): DataFrames are size mutable.

21 Assertion (A): In SQL, INSERT INTO is a Data Definition Language (DDL)


Command.
1
Reason (R): DDL commands are used to create, modify, or remove database
structures, such as tables.

Q No. Section-B (7 x 2 = 14 Marks) Marks

22 (A) What is a Series in Python Pandas? Also, give a suitable example to


support your answer.
OR
(B) What does the term 'library' signify in Python? Mention one use for each of 2
the following libraries:
• Pandas
• Matplotlib

23 What are intellectual property rights (IPR), and why are they important in the
2
digital world?

24 Consider the string: "Database Management System". Write suitable SQL


queries for the following:
2
• To extract and display "Manage" from the string.
• Display the position of the first occurrence of "base" in the given
string.
25 (A) What is Internet and how does it differ from World Wide Web (WWW)?
OR
2
(B) Explain the concept of browser cookies and mention one advantage of
using them.

26 Define the term Primary Key in a database. Explain how it is different from a
2
Candidate Key.

27 Mention two health concerns associated with excessive use of Digital Devices. 2

28 (A) Sneha is writing a Python program to create a DataFrame using a list of


dictionaries. However, her code contains some mistakes. Identify the
errors, rewrite the correct code, and underline the corrections made.
import Pandas as pd
D1 = {'Name': 'Rakshit', 'Age': 25}
D2 = {'Name': 'Paul', 'Age': 30}
D3 = {'Name': 'Ayesha", 'Age': 28} data
= [D1,D2,D3)
df = pd.Dataframe(data)
print(df)
OR
(B)
2
Complete the given Python code to get the required output (ignore the
dtype attribute) as
Output:
Tamil Nadu Chennai
Uttar Pradesh
Lucknow Manipur
Imphal

Code:
import as pd
data = ['Chennai',' ','Imphal']
indx = ['Tamil Nadu','Uttar Pradesh','Manipur'] s
= pd.Series( , indx)
print( )
Q No Section-C (4 x 3 = 12 Marks) Marks
29 Ayesha's family is replacing their old computer with a new one. They decide to
throw the old computer in a nearby empty field/plot.
• Explain any one potential environmental hazard associated with
improper e-waste disposal. 3
• Suggest one responsible way to Ayesha's family for proper disposal
of their old computer.
• Describe the importance of recycling in e-waste management.

30 (A) Write a Python program to create the following DataFrame using a list of
dictionaries.

3
OR
(B) Write a Python Program to create a Pandas Series as shown below using

a dictionary. Note that the left column indicates the indices and the right
column displays the data.

31 • Write an SQL statement to create a table named STUDENTS, with the


following specifications:

2+1=3

• Write SQL Query to insert the following data in the Students


Table 1, Supriya, Singh, 2010-08-18, 75.5
32 (A) Consider the following tables:
Table 1:
EMPLOYEE which stores Employee ID (EMP_ID), Employee Name
(EMP_NAME), Employee City (EMP_CITY)
Table 2:
PAYROLL which stores Employee ID (EMP_ID), Department 3
(DEPARTMENT), Designation (DESIGNATION), and Salary (SALARY) for
various employees.
Note: Attribute names are written within brackets.
Table: EMPLOYEE
Table: PAYROLL

Write appropriate SQL queries for the following:


• Display department-wise average Salary.
• List all designations in the decreasing order of Salary.
• Display employee name along with their
corresponding departments.
OR
Consider the following tables:
(B)
Table 1:
ATHLETE, which stores AthleteID, Name, Country. The table displays
basic information of the athletes
Table 2:
MEDALS, which stores AthleteID, Sport, and Medals. The table
displays the number of medals won by each athlete in their respective
sports.
Table: ATHLETE

Table: MEDALS
Write appropriate SQL queries for the following:

• Display the sports-wise total number of medals won.


• Display the names of all the Indian athletes in uppercase.
• Display the athlete name along with their corresponding sports

Q No. Section-D (2 x 4 = 8 Marks) Marks


33 During a practical exam, a student Ankita has to fill in the blanks in a Python
program that generates a bar chart. This bar chart represents the number of
books read by four students in one month.

Help Ankita to complete the code.

import as plt #Statement-1


students = ['Karan', 'Lina', 'Raj', 'Simran'] books_read
= [12, 9, 5, 3]
plt.bar( students, , label='Books Read') #Statement-2
plt.xlabel('Student Name')
plt. ('Books Read') #Statement-3
plt.legend()
plt.title(' ') #Statement-4
plt.show()

• Write the suitable code for the import statement in the blank space in
the line marked as Statement-1.
• Refer to the graph shown above and fill in the blank in Statement-2
with suitable Python code.
• Fill in the blank in Statement-3 with the name of the function to set
the label on the y-axis.
• Refer the graph shown above and fill the blank in Statement-4 with
suitable Chart Title.
34 (A) Rahul, who works as a database designer, has developed a database for
a bookshop. This database includes a table BOOK whose column
(attribute) names are mentioned below:

BCODE: Shows the unique code for each book.


TITLE: Indicates the book’s title.
AUTHOR: Specifies the author’s name.
PRICE: Lists the cost of the book.
Table: BOOK

• Write SQL query to display book titles in lowercase.


• Write SQL query to display the highest price among the books.
• Write SQL query to display the number of characters in each
book title.
• Write SQL query to display the Book Code and Price sorted by
Price in descending order.
OR
(B)
Dr. Kavita has created a database for a hospital's pharmacy. The
database includes a table named MEDICINE whose column (attribute)
names are mentioned below:
MID: Shows the unique code for each medicine.
MED_NAME: Specifies the medicine name
SUPP_CITY: Specifies the city where the supplier is located.
STOCK: Indicates the quantity of medicine available.
DEL_DATE: Specifies the date when the medicine was delivered.
Table: MEDICINE

Write the output of the following SQL Queries.


• Select LENGTH(MED_NAME) from MEDICINE where STOCK
> 100;
• Select MED_NAME from MEDICINE where month(DEL_DATE)
= 4;
• Select MED_NAME from MEDICINE where STOCK between
120 and 200;
• Select max(DEL_DATE) from MEDICINE;

Q No. Section-E (3 x 5 = 15 Marks) Marks

35 ABC Pvt. Ltd., a multinational technology company, is looking to establish its


Indian Head Office in Bengaluru, and a regional office branch in Lucknow. The
Bengaluru head office will be organized into four departments: HR, FINANCE,
5
TECHNICAL, AND SUPPORT. As a network engineer, you have to propose
solutions for various queries listed from I to V.
The shortest distances between the departments/offices are as follows:
HR TO FINANCE 65 M
HR TO TECHNICAL 80 M
HR TO SUPPORT 70 M
FINANCE TO TECHNICAL 60 M
FINANCE TO SUPPORT 75 M
TECHNICAL TO SUPPORT 50 M
BENGALURU OFFICE TO LUCKNOW 1900 KM

The number of computers in each department/office is as follows:


HR 175
FINANCE 35
TECHNICAL 50
SUPPORT 15
LUCKNOW OFFICE 40

• Suggest the most suitable department in the Bengaluru


Office Setup, to install the server. Also, give a reason to
justify your suggested location.
• Draw a suitable cable layout of wired network connectivity
between the departments in the Bengaluru Office.
• Which networking device would you suggest the company to
purchase to interconnect all the computers within a
department in Bengaluru Office?
• The company is considering establishing a network
connection between its Bengaluru Head Office and Lucknow
regional office. Which

type of network—LAN, MAN, or WAN—will be created? Justify your


answer.
V. The company plans to develop an interactive website that will enable its
employees to monitor their performance after login. Would you
recommend a static or dynamic website, and why?
36 Consider the DataFrame df shown below.

Write Python statements for the DataFrame df to: 5

• Print the first two rows of the DataFrame df.


• Display titles of all the movies.
• Remove the column rating.
• Display the data of the 'Title' column from indexes 2 to 4
(both included)
• Rename the column name 'Title' to 'Name'.

37 (A) Write suitable SQL query for the following:


• To display the average score from the test_results column
(attribute) in the Exams table
• To display the last three characters of the
registration_number column (attribute) in the Vehicles
table. (Note: The registration numbers are stored in the format
DL-01-AV-1234)
• To display the data from the column (attribute) username in the 5
Users table, after eliminating any leading and trailing spaces.
• To display the maximum value in the salary column
(attribute) of the Employees table.
• To determine the count of rows in the Suppliers table.
(B)
OR
Write suitable SQL query for the following:
• Round the value of pi (3.14159) to two decimal places.
• Calculate the remainder when 125 is divided by 8.
• Display the number of characters in the word 'NewDelhi'.
• Display the first 5 characters from the word 'Informatics
Practices'.
• Display details from 'email' column (attribute), in the
'Students' table, after removing any leading and trailing
spaces.
SAMPLE QUESTION PAPER
CLASS XII
SESSION: 2024-25
INFORMATICS PRACTICES (065)
TIME: 03 HOURS

M.M.: 70
General Instructions:
• This question paper contains five sections, Section A to E.
• All questions are compulsory.
• Section A has 18 questions carrying 01 mark each.
• Section B has 07 Very Short Answer type questions carrying 02 marks each.
• Section C has 05 Short Answer type questions carrying 03 marks each.
• Section D has 02 questions carrying 04 marks each.
• Section E has 03 questions carrying 05 marks each.
• All programming questions are to be answered using Python Language only.
SECTION A

1. A is a device that connects the organisation’s network with the 1


outside world of the Internet.
• Hub
• Modem
• Gateway
• Repeater
2. When e-waste such as electronic circuit boards are burnt for disposal, the 1
elements contained in them create a harmful chemical called which
causes skin diseases, allergies and an increased risk of lung cancer.
• Hydrogen
• Beryllium
• Chlorine
• Oxygen

3. Copyright, Patent and Trademark comes under: 1


• Intellectual Property Right
• Individual Property Right
• Industrial Property Right
• None of the above

4. Predict the output of the following query: 1


SELECT MOD (9,0);
• 0
• NULL
• NaN
• 9

5. Which of the following SQL functions does not belong to the Math functions 1
category?
• POWER()
• ROUND()
• LENGTH()
• MOD()

6. is not a FOSS tool. 1


• Libre Office
• Mozilla Firefox
• Google Chrome
• Python
7. CSV stands for: 1
• Column Separated Value
• Class Separated Value
• Comma Separated Value
• None of the above

8. Raj, a Database Administrator, needs to display the average pay of workers 1


from those departments which have more than five employees. He is
experiencing a problem while running the following query:

SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5 GROUP BY


DEPT;

Which of the following is a correct query to perform the given task?

• SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5


GROUP BY DEPT;
• SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) >
5 GROUP BY DEPT;
• SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT
WHERE COUNT(*) > 5;
• SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT
HAVING COUNT(*) > 5;
9. Predict the output of the following query: 1
SELECT LCASE (MONTHNAME ('2023-03-05'));
• May
• March
• may
• march

10. Which of the following command will show the last 3 rows from a Pandas 1
Series named NP?
• NP.Tail( )
• NP.tail(3)
• NP.TAIL(3)
• All of the above
11. With reference to SQL, identify the invalid data type. 1
• Date
• Integer
• Year
• Month

12. In Python Pandas, while performing mathematical operations on series, index 1


matching is implemented and all missing values are filled in with by default.
• Null
• Blank
• NaN
• Zero

13. By restricting the server and encrypting the data, a software company's 1
server is unethically accessed in order to obtain sensitive information. The
attacker blackmails the company to pay money for getting access to the
data, and threatens to publish sensitive information unless price is paid.
This kind of attack is known as:
• Phishing
• Identity Theft
• Plagiarism
• Ransomware

14. In SQL, the equivalent of UCASE() is: 1


• UPPERCASE ()
• CAPITALCASE()
• UPPER()
• TITLE ()

15. Collection of hyper linked documents available on the internet is known as 1


.
• Website
• Webpage
• Web Server
• Web Hosting
16. is a non-profit organization that aims to build a publicly 1
accessible global platform where a range of creative and academic work is
shared freely.
• Creative Cost
• Critical Commons
• Creative Commons
• Creative Common

17. Assertion (A):- MODEM stands for modulator-demodulator. 1


Reasoning (R): - It is a computer hardware device that converts data from a
digital format to analog and vice versa.
• Both A and R are true and R is the correct explanation for A
• Both A and R are true and R is not the correct explanation for A
• A is True but R is False
• A is false but R is True

18. Assertion (A):- To use the Pandas library in a Python program, one must 1
import it.
Reasoning (R): - The only alias name that can be used with the Pandas library
is pd.
• Both A and R are true and R is the correct explanation for A
• Both A and R are true and R is not the correct explanation for A
• A is True but R is False
• A is false but R is True

SECTION B

19. Briefly explain the basic concepts of a web server and web hosting. 2
OR
Rati is doing a course in networking. She is unable to understand the concept of
URL. Help her by explaining it with the help of suitable example.
20. The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
Import pandas as pd
df ={"Technology":["Programming","Robotics","3D
Printing"],"Time(in months)":[4,4,3]}
df= Pd.dataframe(df)
Print(df)
21. Consider the given SQL string: 2
“12#All the Best!”
Write suitable SQL queries for the following:
• Returns the position of the first occurrence of the substring “the” in
the given string.
• To extract last five characters from the string.

22. Predict the output of the given Python code: 2


import pandas as pd
list1=[-10,-20,-30]
ser = pd.Series(list1*2)
print(ser)
23. Differentiate between the active digital footprint and passive digital footprints. 2

24. Complete the given Python code to get the required output as: Rajasthan 2
import as pd
di = {'Corbett': 'Uttarakhand', 'Sariska':
'Rajasthan', 'Kanha': 'Madhya Pradesh’,
'Gir':'Gujarat'}
NP = . Series( )
print(NP[ ])
25. What are aggregate functions in SQL? Name any two. 2

SECTION C
26. Based on the SQL table CAR_SALES, write suitable queries for the 3
following:
+ + + + + +
| NUMBER | SEGMENT | FUEL | QT1 | QT2 |
+ + + + + +
| 1 | Compact HatchBack | Petrol | 56000 | 70000 |
| 2 | Compact HatchBack | Diesel | 34000 | 40000 |
| 3 | MUV | Petrol | 33000 | 35000 |
| 4 | MUV | Diesel | 14000 | 15000 |
| 5 | SUV | Petrol | 27000 | 54000 |
| 6 | SUV | Diesel | 18000 | 30000 |
| 7 | Sedan | Petrol | 8000 | 10000 |
| 8 | Sedan | Diesel | 1000 | 5000 |
+ + + + + +
• Display fuel wise average sales in the first quarter.
• Display segment wise highest sales in the second quarter.
• Display the records in the descending order of sales in the second
quarter.
OR
Predict the output of the following queries based on the table CAR_SALES
given above:
• SELECT LEFT(SEGMENT,2) FROM CAR_SALES WHERE FUEL=
"PETROL";
• SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE
SEGMENT= "SUV";
• SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE
FUEL= "DIESEL";

27. Create a DataFrame in Python from the given list: 3


[[‘Divya’,’HR’,95000],[‘Mamta’,’Marketing’,97000],[‘Payal’,’IT’,980000],
[‘Deepak’,’Sales’,79000]]
Also give appropriate column headings as shown below:
28. Write MySQL statements for the following: 3
• To create a database named FOOD.
• To create a table named Nutrients based on the following specification:

29. Richa, recently started using her social media account. Within a few days, 3
she befriends many people she knows and some that she does not know.
After some time, she starts getting negative comments on her posts. She also
finds that her pictures are being shared online without her permission.
Based on the given information, answer the questions given below.
• Identify the type of cybercrime she is a victim of.
• Under which act, she can lodge a complaint to the relevant authorities?
• Suggest her any two precautionary measures which she should take in
future while being online to avoid any such situations.
OR
Mention any three health hazards associated with inappropriate and excessive
use of gadgets.
30. Consider the given DataFrame ‘Genre’: 3
Type Code
• Fiction F
• Non Fiction NF
• Drama D
• Poetry P

Write suitable Python statements for the following:


• Add a column called Num_Copies with the following data:
[300,290,450,760].
• Add a new genre of type ‘Folk Tale' having code as “FT” and 600
number of copies.
• Rename the column ‘Code’ to ‘Book_Code’.

SECTION D

31. Preeti manages database in a blockchain start-up. For business purposes, she 4
created a table named BLOCKCHAIN. Assist her by writing the following
queries:
TABLE: BLOCKCHAIN

• Write a query to display the year of oldest transaction.


• Write a query to display the month of most recent transaction.
• Write a query to display all the transactions done in the month of May.
• Write a query to count total number of transactions in the year 2022.
32. Ekam, a Data Analyst with a multinational brand has designed the DataFrame 4
df that contains the four quarter’s sales data of different stores as shown below:
Store Qtr1 Qtr2 Qtr3 Qtr4
0 Store1 300 240 450 230
1 Store2 350 340 403 210
2 Store3 250 180 145 160
Answer the following questions:
• Predict the output of the following python statement:
• print(df.size)
• print(df[1:3])
• Delete the last row from the DataFrame.
• Write Python statement to add a new column Total_Sales which is the
addition of all the 4 quarter sales.
OR
(Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named data.csv
stored at D: drive.

SECTION E

33. Write suitable SQL queries for the following: 5


• To calculate the exponent for 3 raised to the power of 4.
• To display current date and time.
• To round off the value -34.4567 to 2 decimal place.
• To remove all the probable leading and trailing spaces from the
column userid of the table named user.
• To display the length of the string ‘FIFA World Cup’.
OR
Kabir has created following table named exam:
+ + + + +
| RegNo | Name | Subject | Marks |
+ + + + +
| 1 | Sanya | Computer Science | 98 |
| 2 | Sanchay | IP | 100 |
| 3 | Vinesh | CS | 90 |
| 4 | Sneha | IP | 99 |
| 5 | Akshita | IP | 100 |
+ + + + +
Help him in writing SQL queries to the perform the following task:
• Insert a new record in the table having following values:
[6,'Khushi','CS',85]
• To change the value “IP” to “Informatics Practices” in subject
column.
• To remove the records of those students whose marks are less than
30 .
• To add a new column Grade of suitable datatype.
• To display records of “Informatics Practices” subject.
34. XYZ Media house campus is in Delhi and has 4 blocks named Z1, Z2, Z3 and 5
Z4. The tables given below show the distance between different blocks and the
number of computers in each block.
The company is planning to form a network by joining these blocks.
• Out of the four blocks on campus, suggest the location of the server that
will provide the best connectivity. Explain your response.
• For very fast and efficient connections between various blocks within
the campus, suggest a suitable topology and draw the same.
• Suggest the placement of the following devices with justification
• Repeater
• Hub/Switch
• VoIP technology is to be used which allows one to make voice calls
using a broadband internet connection. Expand the term VoIP.
• The XYZ Media House intends to link its Mumbai and Delhi centers.
Out of LAN, MAN, or WAN, what kind of network will be created?
Justify your answer.
SAMPLE QUESTION PAPER
CLASS XII
SESSION: 2024-25
INFORMATICS PRACTICES
(065)
TIME: 3 HOURS M.M.70

PART A
1. Television cable network is an example of: 1
• LAN
• WAN
• MAN
• Internet
2. Which of the following is not a type of cyber crime? 1
• Data theft
• Installing antivirus for protection
• Forgery
• Cyber bullying
3. What is an example of e-waste? 1
• A ripened mango
• Unused old shoes
• Unused old computers
• Empty cola cans
4. Which type of values will not be considered by SQL while executing the 1
following statement?

SELECT COUNT(column name) FROM inventory;

• Numeric value
• text value
• Null value
• Date value

5. If column “Fees” contains the data set (5000,8000,7500,5000,8000), what will 1


be the output after the execution of the given query?

SELECT SUM (DISTINCT Fees) FROM student;

• 20500
• 10000
• 20000
• 33500
6. ‘O’ in FOSS stands for: 1
• Outsource
• Open
• Original
• Outstanding

7. Which SQL statement do we use to find out the total number of records present 1
in the table ORDERS?

• SELECT * FROM ORDERS;


• SELECT COUNT (*) FROM ORDERS;
• SELECT FIND (*) FROM ORDERS;
• SELECT SUM () FROM ORDERS;
8. Which one of the following is not an aggregate function? 1
• ROUND()
• SUM()
• COUNT()
• AVG()
9. Which one of the following functions is used to find the largest value from the 1
given data in MySQL?
• MAX( )
• MAXIMUM( )
• BIG( )
• LARGE( )
10. To display last five rows of a series object ‘S’, you may write: 1
• S.Head()
• S.Tail(5)
• S.Head(5)
• S.tail()
11. Which of the following statement will import pandas library? 1
• Import pandas as pd
• import Pandas as py
• import pandas as pd
• import panda as pd

12. Which of the following can be used to specify the data while creating a 1
DataFrame?
• Series
• List of Dictionaries
• Structured ndarray
• All of these

13. Which amongst the following is not an example of a browser? 1


• Chrome
• Firefox
• Avast
• Edge
14. In SQL, which function is used to display current date and time? 1
• Date ()
• Time ()
• Current ()
• Now ()
15. Legal term to describe the rights of a creator of original creative or artistic work 1
is:
• Copyright
• Copyleft
• GPL
• FOSS

16. is the trail of data we leave behind when we visit any website (or 1
use any online application or portal) to fill-in data or perform any transaction.
• Offline phishing
• Offline footprint
• Digital footprint
• Digital phishing
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
• Both A and R are true and R is the correct explanation for A
• Both A and R are true and R is not the correct explanation for A
• A is True but R is False
• A is false but R is True
17. Assertion (A): - Internet cookies are text files that contain small pieces of data, 1
like a username, password and user’s preferences while surfing the internet.

Reasoning (R):- To make browsing the HYPERLINK


"https://www.online-sciences.com/technology/what-are-the-advantages-and-disa
dvantages-of-using-the-internet/" HYPERLINK
"https://www.online-sciences.com/technology/what-are-the-advantages-and-disa
dvantages-of-using-the-internet/"Internet faster & easier, its required to
store certain information on the server’s computer.
18. Assertion (A):- DataFrame has both a row and column index. 1

Reasoning (R): - A DataFrame is a two-dimensional labelled data structure like


a table of MySQL.

PART B
19. Explain the terms Web page and Home Page. 2

OR
Mention any four networking goals.

20. Rashmi, a database administrator needs to display house wise total number of 2
records of ‘Red’ and ‘Yellow’ house. She is encountering an error while
executing the following query:

SELECT HOUSE, COUNT (*) FROM STUDENT GROUP BY HOUSE


WHERE HOUSE=’RED’ OR HOUSE= ‘YELLOW’;

Help her in identifying the reason of the error and write the correct query by
suggesting the possible correction (s).
21. What is the purpose of Order By clause in SQL? Explain with the help of 2
suitable example.

22. Write a program to create a series object using a dictionary that stores the 2
number of students in each house of class 12D of your school.

Note: Assume four house names are Beas, Chenab, Ravi and Satluj having
18, 2, 20, 18 students respectively and pandas library has been imported as
pd.
23. List any four benefits of e-waste management. 2
OR
Mention any four net etiquettes.

24. What will be the output of the following code: 2


>>>import pandas as pd
>>>A=pd.Series(data=[35,45,55,40])
>>>print(A>45)

25. Carefully observe the following code: 2

import pandas as pd
Year1={'Q1':5000,'Q2':8000,'Q3':12000,'Q4': 18000}
Year2={'A' :13000,'B':14000,'C':12000}
totSales={1:Year1,2:Year2}
df=pd.DataFrame(totSales)
print(df)

Answer the following:

• List the index of the DataFrame df


• List the column names of DataFrame df.

SECTION C
26. Write outputs for SQL queries (i) to (iii) which are based on the given table 3
PURCHASE:

TABLE: PURCHASE

• SELECT LENGTH(CNAME) FROM PURCHASE WHERE


QUANTITY>100;
• SELECT CNAME FROM PURCHASE WHERE
MONTH(DOP)=3;
• SELECT MOD (QUANTITY, DAY(DOP)) FROM PURCHASE
WHERE CITY= ‘CHANDIGARH’;
27. Write a Python code to create a DataFrame with appropriate column headings 3
from the list given below:

[[101,'Gurman',98],[102,'Rajveer',95],[103,'Samar' ,96],[104,'Yuvraj',88]]

28. Consider the given DataFrame ‘Stock’: 3

Name Price
• Nancy Drew 150
• Hardy boys 180
• Diary of a wimpy kid 225
• Harry Potter 500

Write suitable Python statements for the following:


• Add a column called Special_Price with the following
data: [135,150,200,440].
• Add a new book named ‘The Secret' having price 800.
• Remove the column Special_Price.
29. Nadar has recently shifted to a new city and school. She does not know many 3
people in her new city and school. But all of a sudden, someone is posting
negative, demeaning comments on her social networking profile etc.

She is also getting repeated mails from unknown people. Every time she goes
online, she finds someone chasing her online.

• What is this happening to Nadar?


• What immediate action should she take to handle it?
• Is there any law in India to handle such issues? Discuss briefly.

OR
What do you understand by plagiarism? Why is it a punishable offence? Mention
any two ways to avoid plagiarism.
30. Based on table STUDENT given here, write suitable SQL queries for the 3
following:

• Display gender wise highest marks.


• Display city wise lowest marks.
• Display total number of male and female students.
OR
Discuss the significance of Group by clause in detail with the help of suitable
example.
SECTION D
31. Write suitable SQL query for the following: 5
• Display 7 characters extracted from 7th left character onwards from the
string ‘INDIA SHINING’.
• Display the position of occurrence of string ‘COME’ in the string
‘WELCOME WORLD’.
• Round off the value 23.78 to one decimal place.
• Display the remainder of 100 divided by 9.
• Remove all the expected leading and trailing spaces from a column
userid of the table ‘USERS’.
OR
Explain the following SQL functions using suitable examples.
• UCASE()
• TRIM()
• MID()
• DAYNAME()
• POWER()
32. Prime Computer services Ltd. is an international educational organization. It is 5
planning to set up its India campus at Mumbai with its head office in Delhi. The
Mumbai office campus has four main buildings-ADMIN, ACCOUNTS,
EXAMINATION and RESULT.
You as a network expert have to suggest the best network related solutions for their
problems raised in (i) to (v), keeping in mind the distances between the buildings and other
given parameters.

DELHI HEAD OFFICE MUMBAI CAMPUS

EXAMINATION ACCOUNTS

ADMIN RESULT
Shortest distances between various buildings:

Number of computers installed at various buildings are as follows:

• Suggest the most appropriate location of the server inside the MUMBAI
campus (out of the four buildings) to get the best connectivity for maximum
number of computers. Justify your answer.
• Suggest and draw cable layout to efficiently connect various buildings within
the MUMBAI campus for a wired connectivity.
• Which networking device will you suggest to be procured by the company to
interconnect all the computers of various buildings of MUMBAI campus?
• Company is planning to get its website designed which will allow students to
see their results after registering themselves on its server. Out of the static or
dynamic, which type of website will you suggest?
• Which of the following will you suggest to establish the online face to face
communication between the people in the ADMIN office of Mumbai campus
and Delhi head office?
• Cable TV
• Email
• Video conferencing
• Text chat
33. Write Python code to plot a bar chart for India’s medal tally as shown below: 5

Also give suitable python statement to save this chart.


OR
Write a python program to plot a line chart based on the given data to depict the
changing weekly average temperature in Delhi for four weeks.

Week=[1,2,3,4]
Avg_week_temp=[40,42,38,44]

SECTION E
34. Shreya, a database administrator has designed a database for a clothing shop. 1+1+2
Help her by writing answers of the following questions based on the given
table: TABLE: CLOTH

• Write a query to display cloth names in lower case.


• Write a query to display the lowest price of the cloths.
• Write a query to count total number of cloths purchased of medium
size.

OR (Option for part iii only)

Write a query to count year wise total number of cloths purchased.


35. Mr. Som, a data analyst has designed the DataFrame df that contains data about
Computer Olympiad with ‘CO1’, ‘CO2’, ‘CO3’, ‘CO4’, ‘CO5’ as indexes
shown below. Answer the following questions:

1+1+2

• Predict the output of the following python statement:


• df.shape
• df[2:4]
• Write Python statement to display the data of Topper column of indexes
CO2 to CO4.
OR (Option for part iii only)
Write Python statement to compute and display the difference of data of
Tot_students column and First_Runnerup column of the above given
DataFrame.
SAMPLE QUESTION PAPER
Class XII
SESSION: 2024-25

INFORMATICS PRACTICES (065)

Max Marks: 70 Time: 3 hrs

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 2 sections:
• Section – I is short answer questions, to be answered in one word or one line.
• Section – II has two case studies questions. Each case study has 4
case-based sub- parts. An examinee is to attempt any 4 out of the 5
subparts.
• Part - B is Descriptive Paper.
• Part- B 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 question has internal option.

Part - A
Section - I
Attempt any 15 questions from questions 1 to 21
1 State whether True or False : 1

• A copyright is automatically granted to authors or creators of content.

• In FOSS source code is usually hidden from the users.

2 Fill in the blanks : 1


The command used to give a heading to a graph is
• plt.show()
• plt.plot()
• plt.xlabel()
• plt.title()

3. Write the output of the following SQL command. 1


select round(49.88);
• 49.88
• 49.8
• 49.0
• 50
4 Given a Pandas series called Sequences, the command which will display the 1
first 4 rows is .
• print(Sequences.head(4))
• print(Sequences.Head(4))
• print(Sequences.heads(4)
• print(Sequences.Heads(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


6 1
Using Python Matplotlib can be used to count how many values fall
into each interval
• line plot
• bar graph
• histogram

7 To prevent unauthorized access to and / or from the network, a system known 1


as , can be implemented by hardware and / or software.

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

9 Which of the following is not a network topology : 1


Star, Mesh , Tree, Bug , Bus

10 For web pages where the information is changed frequently, for example, 1
stock prices, weather information which out of the following options would
you advise ?

• Static web page


• Dynamic web
page Justify your
answer.
11 The avg() function in MySql is an example of . 1
• Math function
• Text function
• Date Function
• Aggregate Function
12 The practice of taking someone else's work or ideas and passing them off as 1
one's own is known as

13 In Pandas the function used to check for null values in a DataFrame is 1


14 I can keep you signed in. 1
I can remember your site preferences.
I can give you locally relevant content.
Who am I ?
15 Which amongst the following is not an example of browser ? 1
• Chrome
• Firefox
• Avast
• Edge

16 A mail or message sent to a large number of people indiscriminately without 1


their consent is called

17 According to a survey, one of the major asian country generates 1


approximately about 2 million tonnes of electronic waste per year. Only 1.5 %
of the total e-waste gets recycled. Suggest a method to manage e-waste .

18 The command can be used to makes changes in the rows of a 1


table in SQL.

19 Write the SQL command that will display the current time and date 1

20 network device is known as an intelligent hub . 1

21. Receiving irreleavnt and unwanted emails repeatedly is an example of 1


.

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 and answer any four questions from (i)-
(v)

rollno name UT1 UT2 UT3 UT4


• Prerna Singh 24 24 20 22
• Manish Arora 18 17 19 22
• Tanish Goel 20 22 18 24
• Falguni Jain 22 20 24 20
• Kanika Bhatnagar 15 20 18 22
• Ramandeep Kaur 20 15 22 24
(i) Write down the command that will give the following output. 1

• print(df.max)
• print(df.max())
• print(df.max(axis=1))
• print(df.max, axis=1)

(ii) The teacher needs to know the marks scored by the student with roll number 1
4. Help her to identify the correct set of statement/s from the given options :

a. df1=df[df[‘rollno’]==4]
print(df1)

• df1=df[rollno==4]
print(df1)
• df1=df[df.rollno=4] print(df1)
• df1=df[df.rollno==4]
print(df1)
(iii) Which of the following statement/s will give the exact number of values in each column
dataframe?

• print(df.count())
• print(df.count(0))
• print(df.count)
• print(df.count(axis=’index’))

Choose the correct option:


• both (i) and (ii)
• only (ii)
• (i), (ii) and (iii)
• (i), (ii) and (iv)
(iv) Which of the following command will display the column labels of the DataFrame?

• print(df.columns())
• print(df.column())
• print(df.column)
• print(df.columns)

(v) Ms. Sharma, the class teacher wants to add a new column, the scores of Grade with the
‘ A’, ‘B’, ‘A’, ‘A’, ‘B’, ‘A’ ,to the DataFrame. Help her choose the command to do so:

• df.column=[’A’,’B’,’A’,’A’,’B’,’A’]
• df [‘Grade’]=[’A’,’B’,’A’,’A’,’B’,’A’]
• df.loc[‘Grade’]= [’A’,’B’,’A’,’A’,’B’,’A’]
• Both (b) and (c) are correct

23 Consider the table STUDENT given below:

RollNo Name Class DOB Gender City Marks

1 Anand XI 6/6/97 M Agra 430


2 Chetan XII 7/5/94 M Mumbai 460
3 Geet XI 6/5/97 F Agra 470
4 Preeti XII 8/8/95 F Mumbai 492
5 Saniyal XII 8/10/95 M Delhi 360

6 Maakhiy XI 12/12/9 F Dubai 256


4
7 Neha X 8/12/95 F Moscow 324
8 Nishant X 12/6/95 M Moscow 429
(i) State the command that will give the output as :
Name Anand Chetan
Geet Preeti

• select name from student where class=’XI’ and


class=’XII’;
• select name from student where not class=’XI’ and class=’XII’;
• select name from student where city=”Agra” OR
city=”Mumbai”;
• select name from student where city IN(“Agra”, “Mumbai”);
Choose the correct option:
• Both (i) and (ii).
• Both (iii) and (iv).
• Any of the options (i), (ii) and (iv)
• Only (iii)

(ii) What will be the output of the following command?


Select * from student where gender =”F” order by marks;

a.

b.

c.
d.

(iii) Prachi has given the following command to obtain the highest marks Select 1
max(marks) from student where group by class;

but she is not getting the desired result. Help her by writing the correct command.

• Select max(marks) from student where group by class;


• Select class, max(marks) from student group by marks;
• Select class, max(marks) group by class from student;
• Select class, max(marks) from student group by class;

(iv) State the command to display the average marks scored by students of each gender 1
who are in class XI?

i. Select gender, avg(marks) from student where class= “XI”


group by gender;

ii Select gender, avg(marks) from student group by gender


where class=”XI”;

• Select gender, avg(marks) group by gender from student


having class=”XI”;

• Select gender, avg(marks) from student group by gender


having class = “XI”;
Choose the correct option:
• Both (ii) and (iii)
• Both (ii) and (iv)
• Both (i) and (iii)
• Only (iii)
(v) Help Ritesh to write the command to display the name of the youngest 1
student?

• select name,min(DOB) from student ;


• select name,max(DOB) from student ;
• select name,min(DOB) from student group by name ;
• select name,maximum(DOB) from student;

Part - B

Section – I
24 Consider a given Series , M1: 2

index

Write a program in Python Pandas to create the series.

25 State any two differences between single row functions and multiple row 2
functions.

OR
What is the difference between the order by and group by clause when used
alongwith the select statement. Explain with an example.

26 Consider the decimal number x with value 8459.2654. Write commands in SQL 2
to:
• round it off to a whole number
• round it to 2 places before the decimal.
27 Consider the following Series object, S_amt 2

• Write the command which will display the name of the furniture
having rent>250.
• Write the command to name the series as Furniture.

28 Anjali writes the following commands with respect to a table employee having 2
fields, empno, name, department, commission.
Command1 : Select count(*) from employee;

Command2: Select count(commission) from employee;

She gets the output as 4 for the first command but gets an output 3 for the
second command. Explain the output with justification.

29 Consider the following SQL string: “Preoccupied” 2

Write commands to display:

• “occupied”
• “cup”

OR

Considering the same string “Preoccupied”


Write SQL commands to display:

• the position of the substring ‘cup’ in the string “Preoccupied”


• the first 4 letters of the string
30 Consider the following DataFrame, classframe 2

Write commands to :
• Add a new column ‘Activity’ to the Dataframe
• Add a new row with values ( 5 , Mridula ,X, F , 9.8, Science)

31 Expand the following terms related to Computer Networks: 2


• SMTP
• POP
• FTP
• VoIP

32 List any two health hazards related to excessive use of Technology. 2

33 Priyanka is using her internet connection to book a flight ticket. This is a 2


classic example of leaving 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?

Section -II
34 Cconsider two objects x and y. x is a list whereas y is a Series. Both have 3
values 20, 40,90, 110.
What will be the output of the following two statements considering that the
above objects have been created already

a. print (x*2) b. print(y*2)

Justify your answer.


35 What do you mean by Identity theft? Explain with the help of an example. 3

OR

What do you understand by Net Ettiquetes? Explain any two such ettiquetes.

36 Consider the following graph . Write the code to plot it. 3

OR

Draw the following bar graph representing the number of students in each
class.
37 A relation Vehicles is given below : 3

Write SQLcommands to:


• Display the average price of each type of vehicle having quantity more
than 20.
• Count the type of vehicles manufactured by each company.
• Display the total price of all the types of vehicles.

Section -III
38 Write a program in Python Pandas to create the following DataFrame batsman 5
from a Dictionary:

Perform the following operations on the DataFrame :


• Add both the scores of a batsman and assign to column “Total”
• Display the highest score in both Score1 and Score2 of the DataFrame.

3)Display the DataFrame


39 Write the SQL functions which will perform the following operations: 5
• To display the name of the month of the current date .
• To remove spaces from the beginning and end of a string, “ Panorama “.
• To display the name of the day eg, Friday or Sunday from your date of birth, dob.
• To display the starting position of your first name(fname) from your whole
name (name).
• To compute the remainder of division between two numbers, n1 and n2

OR
Consider a table SALESMAN with the following data:
SNO SNAME SALARY BONUS DATE OF JOIN

A01 Beena Mehta 30000 45.23 29-10-2019


A02 K. L. Sahay 50000 25.34 13-03-2018
B03 Nisha Thakkar 30000 35.00 18-03-2017
B04 Leela Yadav 80000 NULL 31-12-2018
C05 Gautam Gola 20000 NULL 23-01-1989
C06 Trapti Garg 70000 12.37 15-06-1987
D07 Neena Sharma 50000 27.89 18-03-1999
Write SQL queries using SQL functions to perform the following operations:
• Display salesman name and bonus after rounding off to zero decimal places.
• Display the position of occurrence of the string “ta” in salesman names.
• Display the four characters from salesman name starting from
second character.
• Display the month name for the date of join of salesman
• Display the name of the weekday for the date of join of salesman
40. A company in Mega Enterprises has 4 wings of buildings as shown in the 5
diagram :

W1 W2

W3 W4
Center to center distances between
various Buildings: W3 to W1 - 50m
W1
to
W2
-
60
m
W2
to
W4
-
25
m
W4
to
W3
-
17
0m
W3
to
W2
-
12
5m
W1 to w4 - 90m
Number of computers in each of the wing:
W1 - 150
W2 - 15
W3 - 15
W4 - 25
Computers in each wing are networked but wings are not
networked The company has now decided to connect the wings
also.
• Suggest a most suitable cable layout for the above connections.
• Suggest the most appropriate
topology of the connection between the
wings.
• The company wants internet
accessibility in all the wings. Suggest a
suitable technology .
• Suggest the placement of the
following devices with justification if the
company wants minimized network traffic
• Repeater
• Hub / switch
• The company is planning to link its head office situated in
New Delhi with the offices in hilly areas. Suggest a way to
connect it economically.
SAMPLE QUESTION PAPER
Class XII
INFORMATICS PRACTICES (065)
SAMPLE QUESTION PAPER

Time allowed: 3 Hours Max. Marks: 70

Section-A

1. (a) Which of the following are open standards? 1


.OGG .DOC .BMP .ODF

(b) Ms. Ivana, a leading marketing professional working in a multinational company, is 1


most of the time on move to cater her profession demands. Although she carries her
laptop with her all the time but many a times she require to take some data from her
office PC. She has to make several requesting phone calls to her colleague Ms. Barbara
to send her required documents from her office PC. Suggest her any one popular
software name so that she can herself remotely access her office PC anytime from
anywhere.
(c) Write the URL of any one e-Governance website. 1

• International Tour and Travels company has set up its new branch office in Jaipur 1
where different buildings are spanned over in the radius of 900 meter in Jaipur. Name
the network formed in the following situations :
• The branch office is connected with the regional office in New Delhi.
• All the buildings of branch office are connected to each other.

(e) Deepti is confused between the terms ASCII and Unicode. Help her by differentiating 2
between ASCII and Unicode.

(f) Many of the programming brains has shifted their focus from Proprietary software to 4
Free and Open software. Mention any two freedom offered by Free software.
Going with the flow, Sandhya has downloaded a software from the internet which can
be freely distributed and used by anyone but the source code is not available. Is it
Freeware or free software? Justify your answer as well.
Similarly Premjith wants to install a software on his system that can help him to create,
edit and save office documents but he does not want to purchase the software. Suggest
him a good software for the same.

2. • Ruby, a class XI student has just started learning java programming. Help her in the 4
following:
• Explain her the concept of variable and data type by suitable example.
• Help her in understanding the difference between assignment
operator and comparison operator with the help of appropriate example.
(b) Will the output from the following two code be any different? 2
First Code:
int x=2,y=40;
while(y<=x) {
jTextField1.setText(""+x);
x=x+8;
}

Second Code :
int x=2,y=40;
do {
jTextField1.setText(""+x);
x=x+8;
} while(y<=x);

Give reasons for your answer.

OR
(b) Predict the output of the following
code: int n=4,f=0,i;
for(i=1;i<=n;i++)
{
f=f*i;
}
jTextField1.setText(""+f);
jTextField2.setText(""+i);
• Dev, a website designer with “Creative Designers Pvt. Ltd.” has written the following 4
code. Observe the code given below and answer the following questions:

<company>
<employee eid=1>
<name>Albert</name>
<dept deptid=“d1”>Computer</dept>
</employee>
<employee eid=2>
<name>Manisha</name>
<dept deptid=“d2”>Accounts</dept>
</employee>
</company>
• Are these tags part of HTML code or
XML code? ii. Identify the root element.
iii. Mention any two child elements.
iv. Mention any two attributes
OR
(c) Mention any two main differences between HTML and XML. Also mention any two
main features of XML for which it’s used extensively now a days.

3. (a) What is the purpose of SQL? 1

• Mr. Manav, a database administrator in “Global Educational and Training Institute” has 4
created following table named “Training” for the upcoming training schedule:

Training

Help him in writing SQL query for the following purpose:


• To count how many female candidates will be attending the training.
• To display list of free trainings.
• To display all the cities where Cyber Security training is scheduled along with
its fee.
• To add a column feedback with suitable data type.
• Observe the table named “Training” given above carefully and predict the output of the 4
following queries:
• select city from training where topic = 'Cyber Security';
• select count(Training_Id) from training where email_id like '%gmail% ';
• select AVG (Fee) from training where Topic = 'Cyber Security';
• select name from training where INSTR (Email_Id, '@’)=0;

(d) What is the degree and cardinality of the above given table named ‘Training’. 1

4. (a) Shiva has placed two radio button on a payment form designed in NetBeans to accept 1
mode of payment one out of cash or card. To his surprise, during runtime, a customer is
able to select both the options for a single transaction. What went wrong?

OR
(a) Mention any one advantage of jCheckBox control over jRadioButton control.
(b) Prachi is working with following swing controls: 1

jButton, jLabel, jTextField, jCheckBox.


Suggest her any two basic methods commonly available with all the four controls
mentioned above.
OR
(b) How jLabel is different from jTextField control at run time?

(c) What will be an output of the following code if value of variable application is 1? 1
Switch (application)
{
case 0 : jTextField1.setText("RDBMS");
case 1 : jTextField1.setText("BROWSER");
case 2 : jTextField1.setText("OS"); break;
case 3 : jTextField1.setText("PHOTO EDITOR"); break;
default : jTextField1.setText("Application Software"); break;
}
OR
(c) Re-write the above given code through if-else statements.

(d) Anju, a beginner in java programming has written following code with some mistakes: 4
int k=0;
string s="Save
Earth"; int l=s.length;
for(int i=0;k<l;i++)
{
jTextArea1.append(s+\n);
k++;
};
Help her in identifying and correcting the errors.
Convert the correct code into do while looping statement.
OR
• Observe the given
code: int ctr=10;
while(ctr>5)
{
ctr=ctr-2;
}
Attempt the following questions based on the above given code:
• How many times the above given loop will run and what will be the value of
ctr, immediately after exiting from the loop.
• Out of entry controlled or exit controlled loop, above given loop will come
under which category and why?
• Study the following code and answer the questions that 2
follow: String str="Green World, Clean World";
int
len=str.length(),remain;
remain=100-len;
jTextField2.setText(str.toUpperCase());
jTextField3.setText(Integer.toString(remain)+" more charachters can be entered");

• Predict the output displayed in text fields named jTextField2 and jTextField3 after
running the above code.
• Identify and name any two method of String class used in the above code.
OR

(e) Explain the purpose of pow() method with the help of suitable java code. Also mention
that pow() method belongs to which class?
• Mr. Suman, a programmer in New Era Programming World has designed a registration 6
page for a hobby club as shown below:

Fee for different hobbies are as follows:


Hobby Fee
Dancing 1000
Drawing 1500
Music 2000
Singing 2500
Help him in writing the code to do the following:
• As per the hobby chosen in the hobby combo box, fee should be displayed in the
respective text field named t1 as per the criteria given above after clicking on
“Check Fee” button.
• If a candidate belongs to “Jr. Category” then a discount of 10% should be given
in displayed in the text field.
• After clicking on the “Net Fee” button, Net Fee should be calculated and
displayed in the respective text field as per the given formula:
Net Fee = Fee – Discount
• Write suitable java code to close the application.
• Write java statement to add a new hobby “Reading” in the combo box at run
time.
OR
(f) Write java statement to make the Net Fee text field named txtNetFee un-editable at run
time.

5. (a) Write any one similarity and one difference between primary key and unique Constraint 2

(b) Ms. Pari, a beginner in SQL is not able to understand the meaning of “Cancelling a 2
Transaction”. Help her in understanding the same. Also mention suitable command for it

(c) Consider the following tables Library given below: 4


Library

• Suggest the suitable data type for Issue_Date column.


• Suggest the suitable SQL command to change the size of column name
from 30 character to 50 characters.
• Mention the significance of Bid column in table Library.
• Suggest the suitable command to display a list of the books in a sequence so
that first all the book’s name should be displayed which has not been returned and after
that all the book’s name which has been returned should be displayed.

• Rishi, a class XII student has given following commands for the given purposes: 2
• To add a new column “Rating” :
update table library add column rating varchar(20);
• To give an increase of 50 Rs. to all the books:
alter library set price=price+50;
Check if above given SQL commands will be able to achieve desired task or not. Justify
your answer. Suggest the correction (s) if required.

6. (a) Write SQL query to create a table “BOOKS” with the following structure: 2

Table: BOOKS

OR
(a) Help Ramesh in identifying any two columns for a table named student along with their
suitable data type

(b) In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown
below.
Customer

Transaction

Consider these tables while attempting the questions given below:

(i) Identify the candidate keys of Customer table. 1


OR
(i) Briefly explain the concept of Candidate keys.

(ii) Which column can be considered as foreign key column in Transaction table? 1
OR
(ii) Identify Primary Key column of Transaction table.

• With reference to the above given tables, attempt the questions given below: 9

• Write a query to display customer’s name who has withdrawn the money.
OR
• Write a query to display customer’s name along with their transaction details.

(ii) Write a query to display customer’s name who have not done any transaction yet.
OR
(ii) How many rows and column will be there in the Cartesian product of the above
given tables. Also mention the degree and cardinality of the Cartesian product of
the above given tables.
(iii) Select Acc_No, sum(Amount) from Customer c, Transaction t where
c.Acc_No=t.Acc_No group by c.Acc_No having Transaction_Type="Credit";
OR
(iii) Discuss the significance of having clause with group by statement with suitable
example

7. (a) It’s an era of online financial transactions. Help Julie in identifying any two challenges 2
which a common man may face for the same.

(b) Mention any one major environmental benefits of ICT to Ms. Megha so that she can 1
utilize it in her future “Save Earth” campaign

(c) Ms. Achla, works as a Programmer in a survey firm named “National Survey 2
Foundation”. In her current project, she is supposed to design a survey page for an
online educational training program. Help her in choosing the most appropriate controls
for the specified task from Textfield, Label, RadioButton, CheckBox, ListBox,
ComboBox, Button and write in the third column:

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