Question Bank Class XII IP 065 Short Question Answer
Question Bank Class XII IP 065 Short Question Answer
Session : 2023-24
Class –XII
Subject- Informatics Practices (065)
Q.1 Write a program to create a series object using a dictionary that stores the 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.
Answer.
Q.3. Samira wants to install python pandas on her laptop. She is not aware of the prerequisite for the
same and commands to install it. Help her to understand her requirements and complete her task.
Ans.: She needs to download and install python 3.5.3 and above version.
To install python pandas following command is used:
pip install pandas
To get the version information of pandas use this command in python:
pd.show_versions()
Consider pandas is imported as import pandas as pd
Q.4. Krish wants to store an individual score of players 34,56,78,23 with appropriate data labels.
Which Pandas data structure is used for this purpose? Write a short code to store the values with
data labels as names of players.
Ans.: Kirsh can use series data structure.
Code:
import pandas as pd
s=pd.Series([34,56,78,23],index=[‘Virat’,’Rohit’,’Surya’,’Rahul’])
Answer.
i. Stock['Special_Price']=[135,150,200,400]
ii. ii. Stock.loc['4']=['The Secret',800]
iii. iii. Stock=Stock.drop('Special_Price',axis=1)
Q.6. Write a Python code to create a DataFrame with appropriate column headings from the
list given below:
[[101,'Gurman',98],[102,'Rajveer',95],[103,'Samar' ,96],[104,'Yuvraj',88]]
Answer.
import pandas as pd
data=[[101,'Gurman',98],[102,'Rajveer',95],[103,'Samar' ,96],
[104,'Yuvraj',88]]
df=pd.DataFrame(data,columns=['Rno','Name', 'Marks'])
Answer.
i. The index labels of df will include Q1,Q2,Q3,Q4,A,B,C
ii. The column names of df will be: 1,2
Table 350
Chair 200
Sofa 800
Stool 150
i. Write the command which will display the name of the furniture having
rent>250.
ii. Write the command to name the series as Furniture.
Answer. i. print(S_amt[S_amt>250])
ii. S_amt.name= 'Furniture'
Q.10.
Answer.
i. classframe[‘Activity’]=[‘Swimming’,’Dancing’,’Cricket’,
‘Singing’]
ii. classframe.loc[‘St5’]=[1,’Mridula’, ‘X’, ‘F’, 9.8,
‘Science’]
Q.11. Consider two objects x and y. x is a list whereas y is a Series. Both have
values 20, 40,90, 110.
What will be the output of the following two statements considering that the
above objects have been created already
Answer.
a. will give the output as:
[20,40,90,110,20,40,90,110]
b. will give the output as
0 40
1 80
2 180
3 220
Justification: In the first statement x represents a list so when a list is multiplied
by a number, it is replicated that many number of times.
The second y represents a series. When a series is multiplied by a value, then each
element of the series is multiplied by that number.
Q.12. Consider the following graph . Write the code to plot it.
Answer.
import matplotlib.pyplot as plt
plt.plot([2,7],[1,6])
plt.show()
alternative answer
import matplotlib.pyplot as plt
a = [1,2,3,4,5,6]
b = [2,3,4,5,6,7]
plt.plot (a,b)
Q.13. Draw the following bar graph representing the number of students in each
class.
Answer. Differences between single row functions and multiple row functions.
(i) Single row functions work on one row only whereas multiple row functions
group rows
(ii) Single row functions return one output per row whereas multiple row functions
return only one output for a specified group of rows.
Q.2. What is the difference between the order by and group by clause when used
alongwith the select statement. Explain with an example.
Q.3. Consider the decimal number x with value 8459.2654. Write commands in SQL
to:
i. round it off to a whole number
ii. round it to 2 places before the decimal.
Q.4. Anjali writes the following commands with respect to a table employee
having 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.
Answer. This is because the column commission contains a NULL value and the
aggregate functions do not take into account NULL values. Thus Command1 returns
the total number of records in the table whereas Command2 returns the total
number of non NULL values in the column commission.
Answer.
a. select substr("Preoccupied", 4);
or
select substring("Preoccupied", 4);
or
select mid("Preoccupied",4);
or
select right(("Preoccupied"”, 8);
b. select substr("Preoccupied" ,6,3);
or
select substring("Preoccupied", 6,3);
or
select mid(("Preoccupied" ,6,3);
Answer.
a. select instr 'Preoccupied' , ‘ 'cup'));
b. select left 'Preoccupied',4);
Answer.
a. select Type, avg(Price) from Vehicle group by Type having
Qty>20;
b. select Company, count(distinct Type) from Vehicle group by
Company;
c. Select Type, sum(Price* Qty) from Vehicle group by Type;
Answer. Output:
i. 125
ii. 2
OR
i. power(): It returns the value of a number raised to the power of another number.
For example:
Select power(5,3);
Output: 125
ii. mod(): It returns the remainder of a number divided by another number.
For example:
Select mod(5,3);
Output: 2
Answer. Output:
i) 8.720
ii) 10
Answer. Having clause is used to further filter those groups of records which will be
generated through group by clause.
For example:
Select max(marks) from student group by classes having classes in (10,12);
Above given query will arrange records in groups according to the classes. Further filtering
on these groups will happen through having clause, which will finally display the highest
marks from classes 10 and 12.
Q.11. Mr. Som, a HR Manager in a multinational company “Star-X world” has created the
following table to store the records of employees:
Table: Emp
Eid EName Department DOB DOJ
Star1 Ivan Sales 1994-08-28 2020-02-14
Star2 Melinda IT 1997-10-15 2021-11-19
Star3 Raj Accounts 1998-10-02 2019-04-02
Star4 Michael Sales 2000-02-17 2020-05-01
Star5 Sajal IT 2001-12-05 2018-06-13
Star6 John Accounts 1995-01-03 2019-07-15
Star7 Julia Sales 1985-11-13 2020-08-19
Based on the table given above, help Mr. Som writing queries for the following task:
i) To display the name of eldest employee and his/her date of birth.
ii) To display the name of those employees whose joining month is May.
Answer.
i) 2001
ii) Melinda
OR
Queries:
i) select ENAME,min(year(DOB)) from emp;
ii) select ENAME from emp where month(DOJ)=5;
Answer.
Output:
i. 11
ii. cbse
iii. exams
Q.13. Ms.Saumya is working on a MySQL table named ‘Hotel’ having following structure:
Suggest suitable SQL function for the same. Also write the query to achieve the desired task.
Answer.
i. right()
select right(user_id,2) from hotel;
ii. lower()
select lower(name) from hotel;
iii. mid()/substr()/substring()
Select mid(city,3,3) from hotel;
Q.2. Aman, a freelance web site developer, has been assigned a task to design few web
pages for a book shop. Help Aman in deciding out of static web page and dynamic web
page, what kind of web pages should be designed by clearly differentiating between static
and dynamic web pages on at least two points.
Answer.
Differentiation between static and dynamic web pages:
Q.3. Priyanka, a beginner in IT field has just started learning web technologies. Help her in
understanding the difference between website and web pages with the help of a suitable
general example of each.
Answer.
The difference between a website and a web page is that a website is a collection of
different web pages containing information on a particular topic. A web page is an individual
page of a big website usually containing more specific information. If we compare a website
with a book, then a webpage can be compared with a single page of that book.
Q.4.
(i) Cookies
(ii )Name of any two popular web browsers:
OR
Any other correct name
Q.5. Navya has just created a website for her company and now need to host it. Briefly
discuss the role of a web server in hosting a website.
Answer. Web Page: A Web Page is a part of a website and is commonly written in HTML. It can
be accessed through a web browser.
Home Page: It is the first web page you see when you visit a website.
Q.8. Briefly explain the basic concepts of a web server and web hosting.
Answer. Web server: A web server is used to store and deliver the contents of a website to
clients such as a browser that request it. A web server can be software or hardware.
Web hosting: It is a service that allows to put a website or a web page onto the Internet, and
make it a part of the World Wide Web.
Q.9. 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.
Answer. URL: It stands for Uniform Resource Locator. It provides the location and
mechanism (protocol) to access the resources over the internet.
URL is sometimes also called a web address. It not only contains the domain name, but other
information as well that completes a web address.
Examples:
https://www.cbse.nic.in, https://www.mhrd.gov.in, http://www.ncert.nic.in,
http://www.airindia.in, etc.
Answer.
IP Address MAC Address
It is of 4 bytes It is of 6 bytes
Represented by decimal number Represented by hexadecimal number
It is logical address It is physical address
It is variable address It is fixed address
It is assigned only when a device is It is assigned by manufacturer of the
connected to network card irrespective of connectivity
Command to know the IP address is Command to know the IP address is
ipconfig
Answer. Ans.
(a) ARPANET stands for Advanced Research Projects Agency Network.
(b) ISP stands for Internet Service Provider
(c) URL stands for Uniform Resource Locator
Q.12. Sahil, a Class X student, has just started understanding the basics of Internet and web
technologies. He is a bit confused in between the terms “World Wide Web” and “Internet”. Help
him in understanding both the terms with the help of suitable examples of each.
Answer. World Wide Web is a set of programs, standards and protocols that allows the
multimedia and hypertext files to be created, displayed and linked on the Internet. e.g.
www.microsoft.com, www.amazon.com, etc.
Internet is a computer-based world wide communications network, which is composed of large
number of smaller interconnected networks. e.g. Web, E-mails, Social media, etc. While Internet
is a collection of computers or networking devices connected together; WWW is a collection of
documents, linked via special links called hyperlinks. WWW forms a large part of Internet but is
not the Internet.
Q.13. Define Voice over Internet Protocol (VoIP). Also, explain its advantages.
Answer. VoIP is an IP telephony term for a set of facilities used to manage the delivery of voice
information over Internet. It enables a user to make cheap telephone calls over a broadband
Internet connection, instead of using a regular telephone service. A major advantage of VoIP is
that avoids the tolls charged by ordinary telephone service. A user can make a call locally or in
other parts of US or Canada, or anywhere else in the world, eliminating long distance fees by
using a VoIP service. The concept of VoIP is used in wireless LAN networks and sometimes
referred to as WVoIP, VoFI, VoWi-Fi and Wi-Fi VoIP.
Advantages of VoIP
(i) The biggest single advantage of VoIP has over standard telephone systems is low cost.
(ii) Using services such as true VoIP, subscribers can call one another at no cost to other party.
(iii) Routing phone calls over existing data networks eliminate the need for separate voice and
data networks.
(iv) The ability to transmit more than one telephone call over a single broadband connection.
Societal Impacts
Q.1. List any two health hazards related to excessive use of Technology.
Q.2. Priyanka is using her internet connection to book a flight ticket. This is a
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?
Q.3. What do you mean by Identity theft? Explain with the help of an example.
Q.4. What do you understand by Net Ettiquetes? Explain any two such ettiquetes.
Q.6. Nadar has recently shifted to a new city and school. She does not know many 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.
i. What is this happening to Nadar?
ii. What immediate action should she take to handle it?
iii. Is there any law in India to handle such issues? Discuss briefly.
Answer.
i. Nadar has become a victim of cyber bullying and cyber stalking.
ii. She must immediately bring it into the notice of her parents and school authorities. And she
must report this cyber crime to local police with the help of her parents.
iii. Yes. The Information Technology Act, 2000 (also known as ITA-2000, or the IT Act) is the
primary law in India dealing with cybercrime and electronic commerce.
Q.7. What do you understand by plagiarism? Why is it a punishable offence? Mention any
two ways to avoid plagiarism.
Answer. Ans. Plagiarism is the act of using or stealing someone else’s intellectual work, ideas
etc. and passing it as your own work. In other words, plagiarism is a failure in giving credit to its
source.
Plagiarism is a fraud and violation of Intellectual Property Rights. Since IPR holds a legal entity
status, violating its owners right is a legally punishable offence.
Any two ways to avoid plagiarism:
Be original
Cite/acknowledge the source
Answer. Active Digital Footprints: Active digital footprints include data that we
intentionally submit online. This would include emails we write, or responses or posts we
make on different websites or mobile Apps, etc.
Passive Digital Footprints: The digital data trail we leave online unintentionally is called
passive digital footprints. This includes the data generated when we visit a website, use a
mobile App, browse Internet, etc.
Q.9. Richa, recently started using her social media account. Within a few days, 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.
i. Identify the type of cybercrime she is a victim of.
ii. Under which act, she can lodge a complaint to the relevant authorities?
iii. Suggest her any two precautionary measures which she should take in future while being
online to avoid any such situations.
Answer.
i. She is a victim of Cyber Bullying.
ii. Information Technology Act, 2000 (also known as IT Act).
iii. a. Need to be careful while befriending unknown people on the internet.
b. Never share personal credentials like username and password with others.
Q.10. Mention any three health hazards associated with inappropriate and excessive use of
gadgets.
Q.11. How does excessive use of technology impact the mental health of a user?
Answer. Excessive use of technology leads to isolation as people don't get time to physically
socialize. It sometimes also leads to anxiety and depression as by looking at picture perfect
social media profile of others, people often tend to think that their "connections" have
"perfect rosy lives" while they are not.
Excessive use of technology and Internet leads to addiction. People keep obsessively looking
through emails and messages. They start feeling stress if they don't get some likes or replies
on their posts etc. This problem is formally termed as Internet addiction disorder.
• A hacker is someone who gains unauthorized access to your network or computer or digital
files, with an intention to steal or manipulate data or information or to install malware.
Hackers exploit your computer/network security and employ techniques like, spoofing,
phishing, social engineering etc. to capture user's personal or financial details.
Q.13. What is Internet addiction? What are some symptoms of the Internet addiction?
Answer. Internet Addiction: - When a person can't find a balance between their time online
and their time offline, it considerably affects their mental health, this condition is
called Internet addiction or Internet Addiction Disorder (IAD).
• Mental and emotional symptoms: - Anger, depression, relief, mood swings, anxiety, fear,
irritability, sadness, loneliness, boredom, restlessness, procrastination.
• A Physical symptoms: - An upset stomach, eating irregularities, (such as skipping meals),
severe headaches, backaches, dry eyes, ignoring personal hygiene, and sleep disturbance.