Escolar Documentos
Profissional Documentos
Cultura Documentos
Informatics
Practices–XI
Inner Title
Dear Reader
Happy learning!
CHANGE IN SYLLABUS OF CLASS 11 INFORMATICS PRACTICES IN A NUTSHELL
Earlier (2019-20 Syllabus) Now (2020-21 Syllabus)
• Total Units: 5 • Total Units: 5
• Unit III : Data Handling • Unit III : Data Handling using NumPy
• Unit V : Society, Law and Ethics – Cyber Safety • Unit V : Introduction to Emerging Trends
Basic concept of Data representation: Data deletion, its recovery and related security The complete topic has been
Binary, ASCII, Unicode concerns. freshly added.
Software: Purpose and types – system and
The complete topic has been
Concept of Compiler & Interpreter application software, generic and specific purpose
freshly added.
software.
30 Marks 25 Marks 5 Marks reduced
Introduction to Python
Programming: Familiarization with
the basics of Python programming:
a simple “hello world” program,
Process of writing a program,
Introduction to Python: Basics of Python
running it and print statements;
programming, Python interpreter - interactive
simple data types: integer, float,
and script mode, the structure of a program,
string. Introduce the notion of The topics of mutable and
II: Introduction to Python indentation, identifiers, keywords, constants,
variable and methods to manipulate immutable data types,
variables, types of operators, precedence of
it (concept of L-value and R-value data type conversion and
operators, data types, mutable and immutable
even if not taught explicitly). Tokens debugging have been added.
data types, statements, expressions, evaluation
– keywords, identifiers, Literals,
and comments, input and output statements,
Delimiters. Knowledge of data type
data type conversion, debugging.
and operators: accepting input from
the console, assignment statement,
expressions, operators (assignment,
arithmetic, relational and logical) and
their precedence.
Conditional statements: if, if-else,
if-elif-else; simple programs: e.g.,
absolute value, sort 3 numbers, while loop, flow charts
Control Statements: if-else, for loop
divisibility. Notion of iterative sub-topics have been removed
computation and control flow: for
range(), len()), while, flow charts.
Lists: list operations – creating, initializing,
List and dictionary: finding the traversing and manipulating lists, list methods and
maximum, minimum, mean; linear built-in functions.
search on a list of numbers, and Dictionary: concept of key-value pair, creating, No change
counting the frequency of elements in initializing, traversing, updating and deleting
a list using a dictionary. elements, dictionary methods and built-in
functions.
Text handling: compare, concat and
The entire chapter has been
substring operations (without using Strings removed
removed
string module).
Introduction to Python modules:
importing math (sqrt, ceil, floor, pow,
The entire chapter has been
fabs), random (random, randint, Python modules
removed
randrange), statistics (mean, median)
modules.
10 Marks 15 Marks Increase of 5 Marks
Data and its purpose, importance of data,
structured and unstructured data, data processing
cycle, basic Statistical methods for understanding
data – mean, median, mode, standard deviation
Numpy 1D array, 2D array and variance. The concept of Statistical
Arrays: slices, joins and subsets. methods has been added.
Introduction to NumPy library, NumPy arrays
III: Data Handling using NumPy and their advantage, creation of NumPy arrays;
indexing, slicing and iteration; concatenating and
splitting array;
Arithmetic operations on One-dimensional and
Arithmetic operations on 2D arrays. No change
Two-dimensional arrays.
Calculating max, min, count, sum, mean, median,
No Aggregate Functions mode, standard deviation, variance on NumPy Newly added
arrays.
15 Marks 20 Marks
Increase of 5 Marks
(As per 2019–20 Syllabus) (As per 2020–21 Syllabus)
• Relational databases: Concept of Database Concepts: Introduction to database No change
a database, relations, attributes concepts and its need, Database Management
and tuples, keys – candidate System.
key, primary key, alternate
Relational data model: Concept of domain,
key, foreign key; Degree and
tuple, relation, candidate key, primary key,
cardinality of a table.
alternate key, foreign key.
• Use SQL – DDL/DML commands
Advantages of using Structured Query Language,
to CREATE TABLE, INSERT INTO,
IV: Database Concepts and Data Definition Language, Data Query Language
UPDATE TABLE , DELETE FROM,
Structured Query and Data Manipulation Language, Introduction No change
Language ALTER TABLE, MODIFY TABLE,
to MySQL, Creating a database using MySQL,
DROP TABLE, keys and foreign
Data Types
keys;
To view content of a table: Data Definition: CREATE TABLE, DROP TABLE,
SELECT-FROM WHERE-ORDER BY ALTER TABLE. Order by, between, IN, LIKE
along with BETWEEN, IN, LIKE, clauses have been
Data Query: SELECT, FROM, WHERE. removed.
(Queries only on single table)
Data Manipulation: INSERT, UPDATE, DELETE
The entire topic has been
• Aggregate functions – MIN, No aggregate functions removed.
MAX, AVG, COUNT, SUM
1.2
MARK I COMPUTER
• Howard Aiken of Harvard University in USA joined
hands with IBM.
• He developed a computer named Mark I in 1943.
• It could perform mathematical operations very fast.
• It could perform one operation per second.
ENIAC
• The first electronic computer, ENIAC was developed
in 1946 by a team led by Professor Eckert and
Mauchly at the University of Pennsylvania in USA.
• Electronic Numerical Integrator and Computer
(ENIAC) was very huge and very fast.
• It could solve 5000 operations per second.
periodically. In large organizations, computers with larger and faster storage, called data
servers, are deployed to store vast amount of data. Such dedicated computers help in
processing data efficiently. However, the cost (both hardware and software) of setting up a
data server as well as its maintenance is high, especially for small organizations and start-ups.
1.4
space marked as deleted have not been overwritten by some other data. Data recovery is a
process of retrieving deleted, corrupted and lost data from secondary storage devices.
Data Security Concerns
There are usually two security concerns associated with data. One is its deletion by some
unauthorized person or software. These concerns can be avoided by limiting access to
the computer system and using passwords for user accounts and files wherever possible.
There is also an option of encrypting files to protect them from unwanted modification.
The other concern is related to unwanted recovery of data by an unauthorized user/software.
Many times, we discard our old, broken or malfunctioning storage devices without taking
care to delete data. We assume that the contents of deleted files are permanently removed.
However, if these storage devices fall into the hands of mischief-mongers, they can easily
recover data from such devices; this poses a serious threat to data confidentiality. This
concern can be mitigated by using proper tools to delete or shred data before disposing
of any old or faulty storage device.
1.12 SOFTWARE
In our day-to-day life, when we go to the market to buy any electronic gadget like an LED/
LCD or a DVD player, we are actually purchasing hardware. But this hardware is of no use if we
don’t have a DVD or CD to play. Thus, the content of the DVD, which is referred to as software,
is essential to make this hardware device useful. Similarly, in case of a computer system also, all
the peripherals like keyboard, printer, mouse, speakers and the hardware like CPU, RAM, HDD
(Hard-disk drive), etc., are useless if there is no software to work upon this hardware.
Hardware needs to be operated by a set of instructions. These sets of instructions are referred
to as software. It is that component of a computer system which we cannot touch or view
physically. It comprises instructions and data to be processed using computer hardware. This
computer software and hardware together complete any task.
The software comprises the set of instructions which, on execution, deliver the desired outcome.
In other words, each software is written for some computational purpose. Some examples of
software include operating systems like Ubuntu or Windows 7/10, word processing tools like
LibreOffice Writer or Microsoft Word, video players like VLC Player, photo editors like Paint
and LibreOffice Draw. A document or image stored on the hard disk or pen drive is referred to
CTM: The physical or tangible components of a computer system are termed as Hardware.
Software is not only the basic requirement of a computer system but also makes a computer
more powerful and useful. Software can be divided into different types depending upon their
uses and application.
CTM: Software is the collection of computer programs, procedures and documentation that performs
different tasks in a computer system.
1.5
The sole purpose of software is to make computer hardware useful and operational. A software
knows how to make different hardware components of a computer work and communicate
with each other as well as with the end-user. We cannot talk to or instruct the hardware of a
computer directly. Hence, software acts as an interface between human users and the hardware.
Depending on the mode of interaction with hardware and functions to be performed, software
can be broadly classified into three categories, viz. (i) System software (ii) Utility Software and
(iii) Application software. The categorization of software is shown in Fig. 1.18.
Software
CTM: System software refers to the programs that make the computer operational. It operates, controls
the components and monitors the basic activities of the computer.
1.6
(A) BIOS
The basic input/output system (BIOS) is also commonly known
as the System BIOS. The BIOS is boot firmware, a small program
that controls various electronic devices attached to the main
computer system. It is designed to be the first set of instructions
run by a computer when powered on. The initial function of the
BIOS is to initialize system devices such as the RAM, hard disk,
CD/DVD drive, video display card and other hardware. Fig. 1.19: BIOS Chip
The BIOS sets the machine hardware into a known state to help the operating system to
configure the hardware components. This process is known as booting or booting up.
System
Application Software
Software (Operating
System)
User
Computer Hardware
Fig. 1.20: Operating System as an Interface
1.8
Presentation Tools: A presentation tool is a general purpose application software
that lets us create presentations on any topic. We can not only create a presentation
and add slides to it but also use different types of backgrounds, fonts, animations,
audio, video, etc. We can add clipart and other graphics into our document. Even
audio-video files can be added to the presentations. Popular examples of presentation
tools software are Impress (open office) and Microsoft PowerPoint.
Spreadsheet Packages: Spreadsheet is a general purpose application software that
allows us to create and store data in tabular form. Both text and numerical values
can be entered in those tables, known as spreadsheets. We can not only create a
document and add data to it but also create different types of charts and graphs
based upon the numerical data stored in that page. All common mathematical
and statistical formulae can be used on the numeric data. Popular examples of
spreadsheet software are Calc (Open Office) and Microsoft Excel.
Database Management System: Database Management System is a general purpose
application software that lets us create computer programs that control the creation,
maintenance and use of database for an organization and its end users. We can not
only store data but can also manage data in a database. We can also import and
export data to many formats including Excel, Outlook, ASCII, dBase, FoxPro, Oracle,
SQL Server, ODBC, etc. Popular examples of Database Management System are Base
(Open Office) and Microsoft Access.
Integrated Development Environment (IDE): To create large application programs,
a developer needs to use the requisite tools. The developer needs an environment
(the programming environment) where they can use the tools to create programs
for applications. Various application software provide a programming environment
to develop applications. Such a programming environment is commonly known as
IDE. Thus, an IDE consists of various development tools required for creating or
designing applications. NetBeans IDE is the most popular example of IDE.
(B) Specific Purpose Application Software–Customized Application Software
Customized Software are those which are tailor-made as per the user’s requirement. Such
type of software are customer-specific. They are made keeping in mind the individual
needs of the user and so are also referred to as Domain Specific Tools. Such software
cannot be installed or used by any other user/customer since the requirements may differ.
MEMORY BYTES
A buffer is a data area shared by hardware devices or program processes that operate at different speeds or
with different sets of priorities.
Software is a set of instructions written to achieve the desired task and are mainly categorized as system
software, programming tools and application software.
Hardware of a computer cannot function on its own. It needs software to be operational or functional.
Operating system is an interface between the user and the computer and supervises the working of a computer
system, i.e., it monitors and controls the hardware and software of the computer system.
SOLVED QUESTIONS
22. Name the part of computer which is responsible for processing. [HOTS]
Ans. The CPU is responsible for processing.
23. Name the primary memory which is volatile.
Ans. RAM (Random Access Memory).
24. Write down the various capabilities of a computer.
Ans. The various capabilities of a computer are speed, reliability, diligence, versatility and large memory.
25. What is booting?
Ans. Booting is the process of starting your computer and loading the operating system.
26. Distinguish between Primary memory and Secondary memory.
Ans.
Primary Memory Secondary Memory
1.11
29. Define microprocessors.
Ans. Microprocessor is the other name of CPU. It is a large-scale integrated circuit which contains thousands
of transistors. Microprocessors allow computers to think faster.
30. Why are language processors used? List their types.
Ans. Programs written in a high-level language are required to be converted into a machine language. This task
is accomplished by the language processor. The types of language processors are as follows:
(a) Assembler (b) Interpreter
(c) Compiler
31. Explain briefly the functions of operating system.
Ans. The main functions of OS are:
(a) Memory management (b) Processor management
(c) Device management (d) Information management
32. What types of operations are provided by an operating system?
Ans. The operations provided by an operating system are:
• Provide an interface to allow the user to communicate with the computer.
• Control the various system hardware and software resources, e.g., Keyboard, Visual Display Unit
(VDU), Printer, etc., using special programs called Device Drivers.
• Manage the user’s files, keeping track of their positions on the disk, updating them after user makes
changes to them, etc.
• Provide system facilities, e.g., compilers to translate from high-level programming languages used
by the user to the internal machine language the computer uses.
33. What is an operating system (OS)?
Ans. An operating system (OS) is a group of computer programs that coordinates all the activities among
computer hardware devices. It is the first program loaded into the computer by a boot program and
remains in the memory at all times. OS is the interface between the user and the hardware of the
computer. It makes the computer functional and is responsible for running all the other software.
34. What is the difference between data and information?
Ans. The difference between data and information is as follows:
Supplement – Informatics Practices with Python–XI
Data is defined as raw facts and figures such as “Tejas”, “MBA”, “2013”, “ABC”. This data does not have
any meaning when presented as such. However, this data can be organized or processed to transform
it into useful information.
Information is defined as a collection of data which is organized in a particular manner to generate some
meaning. For example, “Tejas passed MBA in 2013 from ABC” is the information that we have obtained
after processing the data given above.
UNSOLVED QUESTIONS
54. What is an operating system?
55. Explain the types of operating systems with examples.
56. “Hardware is of no use without software and software cannot be used without hardware.” Explain.
57. What is an operating system? Write names of any two popular operating systems.
58. Convert the following into bytes:
(a) 2 MB (b) 3.7 GB (c) 1.2 TB
59. What are the security threats involved when we throw away electronic gadgets that are non-functional?
60. Write down the type of memory needed to do the following:
• To store data permanently,
• To execute a program,
• To store instructions which cannot be overwritten.
1.12
Python Programming
3 Fundamentals
(Additions)
3.2
Explicit Conversion
Explicit conversion, also called type casting, happens when data type conversion takes place
deliberately, i.e., the programmer forces it in the program. The general form of an explicit
data type conversion is:
(new_data_type) (expression)
With explicit type conversion, there is a risk of data loss since we are forcing an expression
to be of a specific type.
For example, converting a floating value of x = 50.75 into an integer type, i.e., int(x), will
discard the fractional part .75 and shall return the value as 50.
>>> x = 50.75
>>> print(int(x))
50
Following are some of the functions in Python that are used for explicitly converting an
expression or a variable into a different type:
Implicit Conversion
Implicit conversion, also known as coercion, happens when data type conversion is done
automatically by Python and is not instructed by the programmer.
In the above example, an integer value stored in variable num1 is added to a float value stored in
variable num2, and the result gets automatically converted into a float value stored in variable
sum1 without explicitly telling the system. This is an example of implicit data conversion.
The reason for the float value not converted into an integer instead is due to type promotion
that allows performing operations (whenever possible) by converting data into a wider-sized
data type without any loss of information.
3.3
Example 6: Write a Python code to calculate simple interest and amount payable by inputting
the value of principal amount and rate from the user for a time period of 5 years.
(Formula used: Simple Interest = Principal * Rate * Time/100)
3.15 DEBUGGING
Apart from computer programs that we code, an exception or error or unusual condition can
occur even in our daily life. Consider a real-life scenario—you leave your house for office
by driving a car. On the way, the tyre gets punctured and you are forced to stop the car and
replace the tyre. So, in this scenario, the punctured tyre is the exception which has occurred
Supplement – Informatics Practices with Python–XI
unexpectedly. In such situations, we are required to carry along a spare tyre so that we can
change the punctured tyre then and there only and can continue with our journey, which is
described as exception handling.
Likewise, when we are browsing a webpage and that webpage is unreachable because there is
no network connection or that there is no microphone available to create an audio recording—
these are examples of exceptions or errors.
Sometimes an application can recover from an error and still provide normal, expected
behaviour, sometimes errors get reported to the user, sometimes they get logged to a file, etc.
It depends on the specific error and the application. Same is applicable in the field of computer
programming also.
Most application codes written for developing applications have errors in them. When your
application suddenly freezes for no apparent reason, that is usually because of an error. But
we all understand that programs have to deal with errors.
3.4
The process of finding errors in a program is termed as Debugging.
Due to errors, a program may not execute or may generate wrong output. So it becomes
necessary to find out and remove the errors for the successful execution of a program. Errors
in Python are classified mainly into three types:
(a) Syntax Error
(b) Runtime Error
(c) Logical Error
The above statement is an example of syntax error as it violates the language protocol by not
giving parentheses with the print() function. So, the corrected statement should be:
>>> print('Hello world')
Hello world
However, some syntactical errors are quite hard to find. Python is case-sensitive, so you may
use the wrong case for a variable and find out that the variable isn’t quite working as you
thought it would.
For example,
3.5
In the above example, we have typed Print() statement instead of print(), which is syntactically
wrong and needs to be corrected. So the correct statement shall be:
>>> print(4+5)
9
Most syntactical errors occur at the time of program execution and the interpreter points them
out for you. Fixing the error is made easy because the interpreter generally tells you what to
fix and with considerable accuracy.
CTM: Syntax errors are errors that occur due to incorrect format of a Python statement. They occur
while the statement is being translated to machine language and before being executed.
A few more examples of syntax errors are shown below in Fig. 3.21.
Supplement – Informatics Practices with Python–XI
Let us understand the reason behind the occurrence of each error given in the above example.
Statement 1 generates syntax error because of improper closing bracket (square bracket
instead of parenthesis).
Statement 2 generates syntax error because of missing parenthesis after ‘if’ keyword.
Statement 3 generates syntax error because of missing parenthesis with print() method.
Statement 4 generates syntax error because of use of semicolon instead of comma in a list
declaration.
Statement 5 generates syntax error because of improper indentation.
3.6
For example,
The above statement is syntactically correct but won’t yield any output. Instead, it shall
generate an error as division of any number by 0 will result in an error upon execution and
illegal program termination. Some examples of Python runtime errors are:
• division by zero,
• performing an operation on incompatible types,
• using an identifier which has not been defined,
• accessing a list element, dictionary value or object attribute which doesn’t exist,
• trying to access a file which doesn’t exist.
CTM: Errors are exceptional, unusual and unexpected situations and they are never part of the normal
flow of a program.
In Python, such unusual situations are termed as Exceptions. Exceptions are usually runtime
errors.
3.7
The example above should calculate the average of the two numbers the user enters. But
because of the order of operations in arithmetic (division is evaluated before addition), the
program will not give the right answer; this is known as logical error.
MEMORY BYTES
The process of identifying and removing errors from a computer program is called debugging.
Trying to use a variable that has not been assigned a value gives an error.
Runtime errors occur during the execution of a program.
Irregular unexpected situations occurring during runtime are called exceptions.
3.8
SOLVED QUESTIONS
18. What type of error will be produced when you type:
Result = “Python” + 10
Name the error and error message.
Ans. The error is: TypeError
The error message is: Can’t convert ‘int’ object to str implicitly
19. What type of error will be produced when you type:
while True print(“Hello world”)
Ans. The error is: SyntaxError: invalid syntax
20. Identify the error in the following Python statement:
>>> print("My name is", first_name)
Write the corrected statement also.
Ans. The above statement is trying to print the value of an undefined variable first_name. The correction is
made by defining the variable name before using it, i.e.,
>>> first_name = 'Rinku'
>>> print("My name is", first_name)
UNSOLVED QUESTIONS
36. Name three runtime errors that occur during Python program execution.
37. What is the difference between an error and exception?
38. Explain the difference between syntax error and runtime error with examples.
39. Which data type will be used to represent the following data values and why?
(a) Number of months in a year (b) Resident of Delhi or not
(c) Mobile number (d) Pocket money
(e) Volume of a sphere (f) Perimeter of a square
(g) Name of the student (h) Address of the student
3.9
Emerging Trends
12 (Earlier Cyber Safety)
12.1 INTRODUCTION
The 21st century has been defined by application of and advancement in information technology.
Information technology today has become an integral part of our daily life. It has served as a
big change agent in different aspects of business and society. It has proven a game changer in
resolving economic and social issues. Advancements in and application of information technology
are ever changing.
A number of technologies are introduced almost every day. While some of these do not succeed
and fade away over time, some prosper and persist gaining attention of the users. There is hardly
any field of human life that is not affected by information technology. Various technological trends
like cloud computing, mobile computing, social media, ubiquitous computing, etc., are growing
rapidly. Cloud computing enables us to share hardware and software resources as a service over
the internet with any user over the globe on pay-per-use basis. Mobile computing helps us to
access and process data on handheld mobile devices like smartphones, iPads, etc. Social media
like Facebook, Twitter, WhatsApp, YouTube, LinkedIn help people interact with each other around
the world. Social media is also contributing to make this world a better place to live in by raising
social issues. Internet of Things (IoT), a network of a large number of objects, computing devices
embedded with microchips, sensors, actuators is making this world a smart place to inhabit.
Emerging trends are state-of-the-art technologies which gain popularity and set a new trend
among users. In this chapter, we will learn about some emerging trends like cloud computing,
mobile computing, social media and Internet of Things (IoT), which are evolving very fast, and
also discuss their role and future impact on digital economy and interaction in digital societies.
• Vision Systems
Supplement – Informatics Practices with Python–XI
Classification
Thus, we may say that Artificial Intelligence is a field of science and technology based on
disciplines such as Computer Science, Biology, Psychology, Linguistics, Mathematics and
Engineering.
12.2
Traditional Programming
Machine Learning
Data
Computer Program
Output
The process of learning begins with observation of data, such as examples, direct experience,
or instructions, in order to look for patterns in data and make better decisions in future based
on examples that we provide. The primary aim is to allow computers learn automatically
without human intervention or assistance and act accordingly.
It consists of several algorithms that fetch data to learn on their own and make certain
predictions. These algorithms, called models, are first trained and tested using a training and
testing data, respectively. After successive trainings, once these models are able to give results to
an acceptable level of accuracy, they are used to make predictions about new and unknown data.
Emerging Trends
Machine translation is an emerging field where machines are able to translate text from one
language to another with a fair amount of correctness. Another emerging application area is
automated customer service where computer software can interact with customers to resolve
their queries or complaints.
Thus, the field of NLP involves making computers perform useful tasks with the natural
languages that humans use. The input and output of an NLP system can be:
Supplement – Informatics Practices with Python–XI
• Speech
• Written text
12.4
Virtual Reality (VR)
Virtual Reality (VR) is the use of computer technology to
create a virtual simulator, away from real environment.
Unlike traditional user interfaces, VR puts the user
inside an experience. Instead of viewing a screen in front
of them, users are immersed and able to interact with
3D worlds. By simulating as many senses as possible,
such as vision, hearing, touch, even smell, the computer
is transformed into a gatekeeper to this artificial world. Fig. 12.6: VR Headset
Everything that we experience in our reality is perceived through our senses. From this came
the idea that if we can present our senses with made-up or non-real information, our perception
of reality would also alter in response to that.
At present, it is achieved with the help of VR headsets. In order to make the experience of VR
more realistic, it promotes other sensory information like sound, smell, motion, temperature,
etc. It is a comparatively new field and has found its applications in gaming (Fig. 12.6), military
training, medical procedures, entertainment, social science and psychology, engineering and
other areas where simulation is needed for a better understanding and learning.
12.2.4 Robotics
Emerging Trends
Drones are being used in many fields, such as journalism, filming and aerial photography,
shipping or delivery at short distances, disaster management, search and rescue operations,
health care, geographic mapping and structural safety inspections, agriculture, wildlife
monitoring or poaching, besides law enforcement and border patrolling.
Supplement – Informatics Practices with Python–XI
iPhone
(b) Velocity
Velocity essentially refers to the speed at which data is being created in real-time. In a
broader prospect, it comprises the rate of change, linking of incoming datasets at varying
speeds and activity bursts.
Velocity
The speed at which data is emanating and changes
are coourring between diverse datasets
Value Volume
The value that can be derived The sheer volume of data being
from accerssing and analysing generated every second
big data
5 Vs of
Big Data
Veracity Variety
The descrepancies found in data A combination of data types that
are being dumped into the system
Emerging Trends
(c) Variety
Variety of big data refers to structured, unstructured and semi-structured data that is
gathered from multiple sources. While in the past, data could only be collected from
spreadsheets and databases, today data comes in an array of forms such as emails, PDFs,
photos, videos, audios, SM posts, so on and so forth. Variety is one of the important
characteristics of big data.
12.7
(d) Veracity
Big data can be sometimes inconsistent, biased and noisy, or there can be abnormality in
the data or issues with the data collection methods. Veracity refers to the trustworthiness
of the data because processing such incorrect data can give wrong results or mislead
interpretations.
(e) Value
Big data is not only just a big pile of data but it also possesses hidden patterns and useful
knowledge which can be of high business value. But as big data processing involves
investment of resources, we should make a preliminary enquiry to see the potential of
the big data in terms of value recovery else our efforts could be in vain.
The connected “smart home” is a good example Fig. 12.11: Smart Homes—an IoT
of IOT in action. Internet-enabled thermostats,
doorbells, smoke detectors and security alarms create a connected hub where data is shared
between physical devices and users can remotely control the “things” in that hub (i.e., adjusting
temperature settings, unlocking doors, etc.) via a mobile app or a website.
12.4.2 Sensors
Sensors are sophisticated devices that are frequently used to detect and respond to electrical
or optical signals. A sensor converts the physical parameter (e.g., temperature, blood pressure,
humidity, speed, etc.) into a signal which can be measured electrically.
12.8
One of the major implementations of sensors that we observe is when you hold your mobile
vertically or horizontally. The display also changes to vertical or horizontal with respect to the
way we hold our mobile. This is possible with the help of two sensors, namely accelerometer
and gyroscope (gyro). The accelerometer sensor in the mobile phones detects the orientation
of the phone. The gyroscope sensor tracks rotation or twist of your hand and adds to the
information supplied by the accelerometer.
Sensors are very commonly used for monitoring and observing elements in real-world
applications. The evolution of smart electronic sensors is contributing in a big way to the
evolution of IoT which will lead to creation of new sensor-based, intelligent systems.
Environment
Society Health care Electricity
Security
Retail
Water
Education Banking
Emerging Trends
A smart city makes use of computer and communication technology along with IoT, WoT to
manage and distribute resources efficiently. The smart buildings shown in Fig. 12.12 use sensors
to detect earthquakes and then warn nearby buildings so that they can prepare themselves
accordingly. A smart bridge uses wireless sensors to detect any loose bolt, cable or crack. It
alerts concerned authorities through SMS. A smart tunnel also uses wireless sensors to detect
any leakage or congestion in the tunnel. This information can then be sent as wireless signals
across the network of sensor nodes to a centralized computer system for further analysis.
12.9
Every sphere of life in a city like transportation systems, power plants, water supply networks,
waste management, law enforcement, information systems, schools, libraries, hospitals and
other community services works in unison to optimize the efficiency of city operations and
services.
Servers
Application
Laptops Desktops
Monitoring Collaboration
Content Finance
Communication
Platform
Identity
Queue
Object Storage Runtime Database
Infrastructure
Supplement – Informatics Practices with Python–XI
Tablets Network
Block Storage
Phones Tablets
CLOUD COMPUTING
12.10
PaaS (Platform as a Service)—An integrated platform for the development, deployment,
testing and support of web applications. It is presented as a service on the basis of the
concept of cloud hosting.
SaaS (Software as a Service)—The business model of software licence which involves
development and support of the software vendor. Customers also have the opportunity of
paid use of it, usually through the internet.
Paas Application
Developers
laaS
Network
Architects
Fig. 12.14: Implementation of Cloud Computing
DaaS (Desktop as a Service)—Another business model licence, this software, first
introduced in the early 2000s, is a slightly improved model of SaaS. It mostly involves use
of multiple services at the same time necessary to complete a work.
In addition to the above, within the concept of cloud hosting technology, there are also
common notion Data as a Service and Everything as a Service, respectively. Both concepts
show that through the World Wide Web using Cloud Hosting, any requirement can be met
in the processing of information. This is the main advantage of cloud computing hosting
in the IT-based business solutions.
CTM: Cloud computing refers to having access to all your applications and data from any network
device.
12.11
Working
A Grid Computing network mainly consists of the following three types of machines:
1. Control Node: A computer, usually a server or a group of servers, which administers the
whole network and keeps the account of the resources in the network pool.
2. Provider: The computer which contributes its resources to the network resource pool.
3. User: The computer that uses the resources on the network.
Grid can be of two types—(i) Data grid, used to manage large and distributed data having the
required multi-user access, and (ii) CPU or Processor grid, where processing is moved from
one PC to another as needed or a large task is divided into subtasks and allotted to various
nodes for parallel processing.
Grid Computing is different from IaaS cloud service. In case of IaaS, there is a service provider
who rents the required infrastructure to the users, whereas in grid computing, multiple
computing nodes join together to solve a common computational problem. To set up a grid
by connecting numerous nodes in terms of data as well as CPU, a middleware is required to
implement the distributed processor architecture. The Globus toolkit (http://toolkit.globus.org/
toolkit) is one such software toolkit used for building grids and it is open source. It includes
software for security, resource management, data management, communication, fault detection,
etc.
A simple analogy for understanding blockchain technology is a Google Doc. When we create
a document and share it with a group of people, the document is distributed instead of being
copied or transferred. This creates a decentralized distribution chain that gives everyone access
to the document at the same time. No one is locked out awaiting changes from another party,
while all modifications to the doc are being recorded in real time, making changes completely
transparent.
We can define blockchain as a system that allows a group of connected computers to maintain
a single updated and secure ledger. Each computer or node that participates in the blockchain
receives a full copy of the database. It maintains an ‘append only’ open ledger which is updated
only after all the nodes within the network authenticate the transaction. Safety and security of
the transactions is ensured because all members in the network keep a copy of the blockchain
and so it is not possible for a single member of the network to make changes or alter data.
12.12
The most popular application of blockchain technology is in digital currency. However, due to
its decentralized nature with openness and security, blockchains are being seen as one of the
ways to ensure transparency, accountability and efficiency in business as well as in governance
systems. For example, in health care, better data sharing between health care providers would
result in high probability of accurate diagnosis, more effective treatment and the overall
increased ability of health care organizations to deliver cost-effective care.
4 5 6
Apart from the above implementation areas, the blockchain technology can be used in diverse
sectors such as banking, media, telecom, travel and hospitality and other areas.
MEMORY BYTES
Emerging trends are the state-of-the-art technologies which gain popularity and set a new trend among users.
Artificial Intelligence endeavours to simulate the natural intelligence of human beings into machines, thus
making them intelligent.
Machine learning comprises algorithms that use data to learn on their own and make predictions.
Natural Language Processing (NLP) facilitates communication with intelligent systems using a natural language.
Virtual reality allows a user to look at, explore and interact with virtual surroundings, just like one can do in the
real world.
Cloud computing, often referred to as “the cloud”, is the delivery of on-demand computing resources over the
internet on a pay-for-use basis.
Emerging Trends
The superimposition of computer-generated perceptual information over the existing physical surroundings is
called augmented reality.
Robotics can be defined as a science, primarily associated with the design, fabrication, theory and application of
robots.
Big data holds rich information and knowledge which can be of high business value. Five characteristics of Big
data are: Volume, Velocity, Variety, Veracity and Value.
Data analytics is the process of examining datasets in order to draw conclusions about the information they
contain.
Internet of Things (IoT) is a network of devices that have an embedded hardware and software to communicate
(connect and exchange data) with other devices on the same network.
12.13
A sensor is a device that takes input from the physical environment and uses built-in computing resources to
perform predefined functions upon detection of specific input and then processes data before passing it on.
Blockchain technology uses a shared database of chaired blocks where copies of database exist on multiple
computers.
world.
(d) Cloud-based storage makes use of local computer storage for saving files and information.
(e) Drone is an example of Augmented Reality.
(f) CCTV cameras installed at offices, houses, business establishments are a result of Internet of Things
(IoT) implementation.
(g) Smart cities are not sustainable and liveable.
(h) A grid is a computer network of geographically dispersed and heterogeneous computational
resources.
Answers: (a) False (b) True (c) True (d) False (e) False (f) True
(g) False (h) True
3. Multiple Choice Questions (MCQs)
(a) IoT stands for ........................ .
(i) Industry of Things (ii) Internet of Things
(iii) Intelligence of Things (iv) Internal Internet of Things
(b) Which one of these is not an area of AI?
(i) Computer vision/Image recognition (ii) Voice recognition
(iii) Web design (iv) Robotics
(c) “Virtual reality” is described as:
(i) Where parts of a person’s body are used for identification purposes. They are unique.
(ii) A software environment that recreates a real-world or imaginary scenario like a game.
(iii) The use of computers to encrypt data so that messages can be sent with complete privacy.
(iv) Where images are made to appear three-dimensional and have ‘depth’.
12.14
(d) Where is artificial intelligence used?
(i) Training soldiers in combat using battlefield simulations
(ii) In self-driving cars that do not require a driver
(iii) To allow access to buildings
(iv) To create prototypes of cars or any object
(e) Where is virtual reality used?
(i) Training soldiers in combat using battlefield simulations
(ii) In three-dimensional (3D) films
(iii) To allow access to buildings
(iv) To create prototypes of cars or any object
(f) Where is computer-assisted translation used in everyday life?
(i) Training TV hosts (ii) Spell-checkers used in word processing software
(iii) Dictation tests (iv) Recording weather conditions
(g) Which of the following is a positive impact of artificial intelligence in driverless cars?
(i) An immersive video experience for the viewer using special glasses.
(ii) Data is completely secure and cannot be tampered with.
(iii) This method ensures that only authorized people can enter restricted buildings or rooms.
(iv) Safer transport as there would be fewer road accidents.
(h) What hardware is typically used for virtual reality?
(i) A powerful computer, headset with screen to see, headphones to hear and sometimes gloves.
(ii) Keyboard, mouse, printer and plotter.
(iii) Smartphone, mic and tablet.
(iv) Plotters, mouse, speakers and tablet.
Answers: (a) (ii) (b) (iii) (c) (ii) (d) (ii) (e) (i) (f) (ii)
(g) (iv) (h) (i)
SOLVED QUESTIONS
1. Define knowledge base.
Ans. A knowledge base is a store of information consisting of facts, assumptions and rules which an AI system
can use for decision-making.
2. How does NLP help differently-abled persons?
Ans. NLP is the machine’s ability to process what was said, structure the information received, determine the
necessary response and respond in a language that we understand. It also has a key feature of word
embedding to help the differently-abled to work with ease.
3. Describe the benefits of cloud computing.
Ans. The benefits of cloud computing are:
(a) Easy to maintain. (b) Increased security at a much lesser cost.
(c) On-demand self-service by consumers. (d) Rapid scaling of capacity.
(e) Resource pooling of physical and virtual resources.
Emerging Trends
UNSOLVED QUESTIONS
1. Explain the significance of Artificial Intelligence in today’s world.
2. What do you understand by Internet of Things? List some of its potential applications.
Supplement – Informatics Practices with Python–XI
12.16
Case-based/Source-based
Integrated Questions
2. Gurukul Vidyapeeth is a reputed institution in the field of academics and extra-curricular activities.
Every year, with the commencement of the new session, it hikes fee by 10% for all the students which
was manually done till date and required enormous efforts on the part of the office staff. To solve this
problem, develop a Python program that calculates this 10% fee hike every year automatically after
obtaining the basic fee amount from the user and displays it to the parents of the students enrolled with
the institute.
Ans.
C.2
CHAPTER: LISTS IN PYTHON
1. A bank is a financial institution involved in borrowing and lending of money. With advancement in
technology, online banking, also known as internet banking, allows customers of a bank to conduct a
range of financial transactions through the bank’s website anytime, anywhere.
Two basic operations performed in an account are Deposit and Withdrawal. Write a menu-driven program
that accepts either of the two choices of Deposit and Withdrawal, then accepts an amount, performs
the transaction and accordingly displays the balance.
The program should display the following options:
Open a savings bank account
Add a customer
Deposit money
Display sorted records
Close/delete account
Ans.
C.3
Supplement – Informatics Practices with Python–XI
2. Vidyarthi Gurukul conducts physical training camps for the physical well-being of its students. This camp
is held for one week on the outskirts of the city. The entire group of students are represented as a
list. The list stores the roll numbers of the participants for camp activities. As part of this training,
the entire stream of students is divided into two halves. While the first group of students goes for
physical training, the second group goes for aerobic classes and in the later half, both these groups are
swapped.
Write a Python program that maintains and displays details about the swapping of activity classes and
awards them stars on completion of each activity.
Ans.
C.4
CHAPTER: DICTIONARY
1. Pure Basket is a department store with a wide range of merchandise including groceries, fruits,
vegetables and household accessories. It aims to develop a complete software for Billing, Inventory and
Accounts management and to provide consumers a user-friendly interface to view item codes and prices
of various items.
Write a program in Python that repeatedly asks the user to enter product names and prices. Store all of
them in a dictionary whose keys are product names and values are prices. Also write a code to search
an item from the dictionary.
Ans.
C.5
CHAPTER: STRUCTURED QUERY LANGUAGE (SQL)
1. Kunal has entered the following SQL command in the table ‘STUDENT’ that has TotalMarks as one of
the columns:
Select * from Student;
The output displayed is 20.
Then Kunal enters the following command:
SELECT * FROM STUDENT WHERE TotalMarks < 100;
The output displayed is 15.
Kunal then enters the following command:
SELECT * FROM STUDENT WHERE TotalMarks >= 100;
He predicts the output of the above query as 5. Do you agree with Kunal? Give reasons for your answer.
Ans. The output for the two SELECT statements is different since statement–1 shall return all the records and
columns of the table student.
Whereas in statement–2, output is to be obtained on the basis of column ‘Marks’ which may include NULL
values and is, hence, ignored by MySQL compiler and, as a result, less number of records are displayed.
2. Your school management has decided to organize cricket matches between students of Classes XI and
XII. All the students are divided into four teams—Team Rockstars, Team BigGamers, Team Magnet and
Supplement – Informatics Practices with Python–XI
Team Current. During the summer vacations, various matches are to be held between these teams. Help
your sports teacher do the following:
(a) Create a database “Sports”.
(b) Create a table “TEAM” with the following considerations:
(i) It should have a column TeamID for storing an integer value between 1 and 9, which refers to
unique identification of a team.
(ii) Each TeamID should have its associated name (TeamName), which should be a string of length
not less than 10 characters.
(iii) Give the statement to make TeamID as the primary key.
(c) Show the structure of the table TEAM using SQL command.
(d) As per the preferences of the students, four teams were formed as given below.
Insert these four rows in TEAM table:
Row 1: (1, Team Rockstars)
Row 2: (2, Team BigGamers)
Row 3: (3, Team Magnet)
Row 4: (4, Team Current)
Ans. (a) create database sports;
(b) create table TEAM(TeamID int(9) primary key, TeamName varchar(10));
(c) desc TEAM;
(d) insert into TEAM values(1,“Team Rockstars”); #Row 1
insert into TEAM values(2,“Team BigGamers”); #Row 2
insert into TEAM values(3,“Team Magnet”); #Row 3
C.6 insert into TEAM values(4,“Team Current”); #Row 4