Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Artificial Intelligence Class 10

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 278

KENDRIYA VIDYALAYA SANGATHAN

Artificial Intelligence (417)

CLASS X

STUDENT SUPPORT MATERIAL

2024-2025

II
Sno CONTENTS
1 Syllabus

PART – A (Employability Skills)

2 Communication Skill

3 Self-Management Skill

4 ICT Skill

5 Entrepreneurial Skill

6 Green Skill

PART – B (Subject Specific Skills)

7 Introduction to Artificial Intelligence (AI)

8 AI Project Cycle
9 Natural Language Processing
10 Evaluation

PART - C (Practical Work)

11 Advance Python

12 Data Sciences

13 Computer Vision

14 Practical Programs

15 Sample Question Paper

CBSE | DEPARTMENT
OF SKILL EDUCATION
CURRICULUM FOR
SESSION 2024-2025
____________________________________________________
_________
ARTIFICIAL INTELLIGENCE (SUB. CODE 417)
CLASS X

OBJECTIVES OF THE COURSE:


The objective of this module/curriculum - which combines both Inspire and Acquire
modules is
to develop a readiness for understanding and appreciating Artificial Intelligence
and its application in our lives. This module/curriculum focuses on:

1. Helping learners understand the world of Artificial Intelligence and its


applications through games, activities, and multi-sensorial learning to become
AI-Ready.
2. Introducing the learners to three domains of AI in an age-appropriate manner.
3. Allowing the learners to construct meaning of AI through interactive
participation and engaging hands-on activities.
4. Introducing the learners to AI Project Cycle.
5. Introducing the learners to programming skills - Basic python coding language.

LEARNING OUTCOMES:
Learners will be able to
1. Identify and appreciate Artificial Intelligence and describe its applications in daily
life.
2. Relate, apply, and reflect on the Human-Machine Interactions to identify and
interact with the three domains of AI: Data, Computer Vision, and Natural
Language Processing and Undergo assessment for analyzing their progress
towards acquired AI-Readiness skills.
3. Imagine, examine, and reflect on the skills required for futuristic job opportunities.
4. Unleash their imagination towards smart homes and build an interactive story
around it.
5. Understand the impact of Artificial Intelligence on Sustainable Development
Goals to develop responsible citizenship.
6. Research and develop awareness of skills required for jobs of the future.
7. Gain awareness about AI bias and AI access and describe the
potential ethical considerations of AI.
8. Develop effective communication and collaborative work skills.
9. Get familiar and motivated towards Artificial Intelligence and Identify the AI
Project Cycle framework.
10.Learn problem scoping and ways to set goals for an AI project and understand
the iterative nature of problem scoping in the AI project cycle.

11.Brainstorm on the ethical issues involved around the problem selected.

4
12.Foresee the kind of data required and the kind of analysis to be done,
identify data requirements, and find reliable sources to obtain relevant
data.
13.Use various types of graphs to visualize acquired data.
14.Understand, create, and implement the concept of Decision Trees.
15.Understand and visualize computer’s ability to identify alphabets and
handwritings.
16.Understand and appreciate the concept of Neural Network through
gamification and learn basic programming skills through gamified platforms.
17.Acquire introductory Python programming skills in a very user-friendly format.

SKILLS TO BE DEVELOPED:

SCHEME OF STUDIES:
This course is a planned sequence of instructions consisting of units meant for
developing employability and vocational competencies of students of Class IX opting
for skill subject along with other education subjects.
The unit-wise distribution of hours and marks for class IX & X is as follows:

5
DETAILED CURRICULUM/TOPICS FOR CLASS X
Part-A: EMPLOYABILITY SKILLS

S. No. Units Duration in Hours


1. Unit 1: Communication Skills-II 10
2. Unit 2: Self-management Skills-II 10
3. Unit 3: Information and Communication Technology Skills-II 10
4. Unit 4: Entrepreneurial Skills-II 15
5. Unit 5: Green Skills-II 05
TOTAL 50

Note: * marked units are to be assessed through Internal Assessment/ Student Activities.
They are not to be assessed in Theory Exams

The detailed curriculum/ topics to be covered under Part A: Employability Skills can
be downloaded from CBSE website.

Part-B – SUBJECT SPECIFIC SKILLS

Units to be assessed in theory examinations:

 Introduction to Artificial Intelligence (AI)


 AI Project Cycle
 Natural Language Processing
 Evaluation
Units to be assessed through Practicals:

 Advance Python
 Data Science
 Computer Vision

**NOTE: Optional components shall not be assessed. They are for extra knowledge

6
UNIT 1
Communication Skill:

Part 1: Communication & their


types Part 2: Communication
Cycle
Part 3: Feedback in
Communication Part 4: Effective
Communication Part 5: Barriers
in Communication Part 6: Basic
Writing Skills

Part 1: Communication & their types

Communication

Communication is the act of giving, receiving, and sharing information -- in other


words, talking or writing, and listening or reading. Good communicators listen
carefully, speak or write clearly, and respect different opinions.

Communication is defined as the imparting or exchanging of information by


speaking, writing, or using some other medium

Communication skills allow you to understand and be understood by


others. These can include but are not limited to effectively communicating
ideas to others, actively listening in conversations, giving, and receiving
critical feedback and public speaking.

Communication skills involve listening, speaking, observing, and


empathising. It is also helpful to understand the differences in how to
communicate through face- to-face interactions, phone conversations,
and digital communications like email and social media.
Or
Communication helps people to know each other better. It helps in
removing misunderstanding and certain meaning clarity of thought.
Communication in any form written, oral, formal informal, visual,
interpersonal, intrapersonal help in educating people and connecting
them better.

.
Types of Communication- :

Communication can be categorized into four basic types:

7
1. Verbal Communication
2. Non Verbal Communication
3. Visual Communication

8
4. Written Communication

1. Verbal Communication- :
Verbal communication is the use of sounds and words to express yourself,
especially in contrast to using gestures or mannerisms (non-verbal
communication). Example-: Orally communicating.

2. Non- verbal Communication- :


Nonverbal communication refers to gestures, facial expressions, tone of
voice, eye contact, (or lack thereof), body language, posture, and other
ways people can communicate without using language.

3. Visual Communication- :
Visual communication is the transmission of information and ideas using
symbols and imagery. Types of visual communication include animated GIFs,
screenshots, videos, pie charts, infographics, and slide deck presentations. It
also includes signs, graphic designs, films, typography, and countless
other examples

4. Written Communication- :
A 'Written Communication' means the sending of messages, orders or
instructions in writing through letters, circulars, manuals, reports,
telegrams, office memos, bulletins, etc. It is a formal method of
communication and is less flexible.

Part 2: Communication Cycle

Communication Cycle

Communication is one of the most vital elements of society. People need


people, and to interact, it's essential they be able to convey messages and
understand each other. The communication cycle expresses how the system
of conveying and understanding messages operates.

Sender: the person or entity originating the communication.


Message: the information that the sender wishes to convey.
Encoding: how the sender chooses to bring the message into a form
appropriate

for sending.
Channel: the means by which the message is sent.
Receiver: the person or entity to whom the message is sent.
Decoding: how the receiver interprets and understands the
message. Feedback: the receiver's response to the message.

9
In the communication process, one person is a sender who convey message to
another person or a group of persons) nose as the receiver. When the receiver
gets the message, he acknowledges it and sends back a response. This leads
to a cycle process known as the communication cycle. The cycle describe how
can ideas, impression, or feeling is made no to others full stopper
communication cycle includes resource such as e-mail threads social media
outlets, VoIP message outlets. In the communication process, one person is a
sender who convey message to another person (or a group of persons) nose
as the receiver. When the receiver gets the message, he acknowledges it and
sends back a response. This leads to a cycle process known as the
communication cycle.

Part 3: Feedback in Communication

Feedback in Communication
The term 'feedback' is taken from cybernetics, a branch of engineering
concerned with self-regulating systems.
The observation of the receiver's response is called feedback. In other words,
the part of the receiver's response communicated back to the sender is called
feedback. Actually it is the amount of response of the receiver that reaches to
the sender. It enables the sender to evaluate the effectiveness of the
message.
In the communication process, feedback refers to a response from the
receiver which gives the communicator an idea of how the message is being
received and whether it needs to be modified.
Feedback ensures that the message has been successfully conveyed and the
communication is effectively successful.
Feedback is important in communication because it enables the sender to
evaluate the effectiveness of its message. Without feedback, the
communication process would be incomplete.
10
Importance of feedback in communication-:
1. It completes the whole process of communication and makes it continuous.
2. It sustains communication process.
3. It makes one know if one is really communication or making sense.
4. It is a basis for measuring the effectiveness of communication.
5. It is a good basis for planning on what next to be done especially statistical
report.
6. Communication will be useless without feedback.
7. Feedback paves way for new idea generation.
8. It is a process of effective listening.
9. It serves as basis of problem-solving.
10. Can motivate.
11. It can improve performance.

“To be effective, feedback needs to be clear, purposeful, meaningful, and


compatible with students' prior knowledge and to provide logical connections”
(Hattie & Timperley, 2007, p. 104). Task specific – feedback requires learning
context and therefore needs to be task specific.

In order to be effective, feedback must be:


Specific. Feedback must be concrete and relate to a specific, measurable
performance goal.
 Timely
 Appropriate
 Focus on behaviour, not personality
 Proactive
 Given using descriptive language
 Not given using judgmental language
 Based on accurate and credible information.

Types of Feedback-:

Feedback can be various form and of various types. Let us discuss different
types of feedback used in communication.

1. Formal and informal feedback


2. Descriptive and non-descriptive feedback
3. Specific and nonspecific

feedback Formal and informal

feedback

Formal Feedback-:
A formal feedback follows a present format or structure using which the
receiver friends feedback and sends it. Formal feedback covers many

11
predefined points and has a specific blueprint. The receiver friends the
feedback as per this blueprint and sends it. Formal feedback takes time to
construct and hence, is not instant.

12
Examples:

“Congratulations on scoring with A Grade in your final test performance. You


are promoted to your next class.”

“Please accept my

apologies.” Informal

Feedback-:
Informal feedback, on the other hand, is spontaneously friendly and does not
stick to a specific structure such as instant comments by the listener or
audience. It does not take time to construct as it is immediately conveyed.

Examples:
"Good job! “, “Congratulations!” “Sorry”

2. Descriptive and non-descriptive feedback-:


Descriptive feedback:
A descriptive feedback on the contrary, provides meaningful information in a
detailed, expressive manner that also contains some analysis or suggestion
etc.

Examples
“All paragraphs should cover basically on Idea. Only one paragraph was as per
this specification, other paragraphs convey multiple ideas and the information
was also cohesively linked.”

“In your article, the conclusion did not reiterate your observation and did not
support the evidence your article talks about. You need to rewrite the
conclusion by keeping this thing in mind.”

Non-descriptive feedback-:
A non-descriptive feedback provides some specific information but does not
give details descriptions. The feedback conveys meaningful specific response
but does not come with descriptive analysis or suggestions.

Examples
“I only like your second paragraph. Others needs
improvement.” “In your article, conclusion needs rework”

3. Specific and Non-specific Feedback:

Specific Feedback-:
The specific feedback talks about a thing, particularly without talking about a
General overview.
Example-:
“I like the way you described your grandfather's character. It makes me feel
like I too know him”.

13
“I like your portrayal of sibling rivalry, especially the part where you and your
sister were fighting. I fight with my brother too, so it made it sound real to me.
your story seemed related at all points.”

14
Non-specific Feedback-:
The Non-specific feedback, on the other hand, talks about the entire think while
giving a General overview. it does not particularly pinpoint is specific think/
feature.

Examples:
“I like your story. It is good.”
“I like it your topic of sibling rivalry.”

CHECK POINT :

Q1. Which of the following is NOT an element of communication within the


communication process cycle?

A) Channel

B) Receiver

C) Sender

D) Time

Q2. You need to apply for leave at work? Which method of communication will you
use?

A) e-mail

B) Poster

C) Newsletter

D) Blog

Q3 Which of the following is an example of oral communication?

A) Newspapers

B) Letters

C) Phone call

D) E-mail

Q4 Which of these are examples of negative feedback?

A) I hate to tell you this but your drawing skill is poor.

15
B) You can surely improve your drawing

16
C) These are good drawings but you can do better.

D) None of the above

Q5. What are the types of words we should use for verbal communication?

A) Acronyms

B) Simple

C) Technical

D) Jargons

Q6. Which of the following is an effective components of good feedback?

A) Detailed and time consuming

B) Indirect

C) Specific

D) Opinion-based

Q 7 Which of these are examples of positive feedback?

A) Excellent, your work has improved

B) I noticed your dedication towards the project.

C) You are always doing it the wrong way.

D) All of the above

Q8 Which of the following statement is true about communication?

A) 50% of our communication is non-verbal

B) 20% communication is done using body movements, face, arms, etc

C) 5% communication is done using voice, tone, pauses, etc.

D) 7% communication is done using words

17
Q9 Which of these is NOT an appropriate non-verbal communication at work?

A) Keeping hands in pockets while talking

B) Talking at moderate speed

C) Sitting straight

D) Tilting head a bit to listen

Q10 Which of these is a positive (good) facial expression?

A) Frowning while concentrating

B) Maintaining eye contact

C) Smiling continuously

D) Rolling up your eyes

Part 4: Effective Communication

EFFECTIVE COMMUNICATION
Introduction:
Effective communication is a two way communication process where both
parties have right and convenience to express their messages opinions, facts
and other informations.

Principles of Effective Communication:


 Clarity:-
Message conveyed should be in easily understandable language.

 Attention:-
The receiver should be fully attentive in a communication process.

 Consistency:-
This principle implies that communication should always be consistent with thE
planned objective of message being conveyed

 Adequacy:-
The information conveyed should be complete in all respects.
18
 Timelines:-
The message conveyed should be at the proper time.

 Feedback:-
The communication must have feedback confirmation from the recipient
whether the messages have been understood by the recipient

 Economy:-
The communication should take place in a way that costs optimally.

7Cs of Effective Communication


 Clear: While communicating one should be clear about what he / she say.

 Concise: Use simple words and say only what is needed.

 Concrete: Your arguments should be based on solid facts and opinions from
credible sources and you should share reliable data to support your stand.

 Correct: It’s essential that along with the factual information, the language
and grammar you use are correct.
 Coherent: Your words should make sense .Along with that it should related
with the main topic
 Complete: Your message should be complete .It should have all the needed
information
 Courteous: Be respectful , honest and friendly throughout your
communication

19
Part 5: Barriers in Communication

Barriers in communication
 Linguistic Barrier: Language at times can be a barrier to effective
communication
 Physical Barrier: If the surroundings do not support proper communication,
it can also act as a barrier to appropriate interaction.
 Cultural Barrier: Cultural differences hinder us from communicating properly.
 Interpersonal Barriers: It refers to the situations when the intended message
is received incorrectly due to many personal reasons.
 Organizational Barriers: In an organization if there is no clarity about the
roles, structures, responsibilities, it will hinder effective communication
among the members of the organization.
Measures to Overcome Barriers of communication
 Overcoming Lingual Factors: To overcome this one need to prepare
appropriately. One should carefully think about the language needs of the
recipient.
 Overcoming Environmental Factors: Communicators should ensure that the
message is delivered in a distraction free environment.
 Overcoming Barrier of Cultural Influence: Preparation to be made keeping
the culture of the people you are addressing.
 Overcoming Interpersonal Barriers of Communication:
 Overcoming Organizational Barriers of Communication

Part 6: Basic Writing Skills


WRITING SKILLS
Writing skills are an important part of communication. Good writing skills
allow you to communicate your message with clarity and ease to a far
larger audience than through face-to-face or telephone conversations.

Parts of speech:
 Noun: A noun is the name of a person, place, thing, or idea.
 Pronoun: A pronoun is used in place of a noun or noun phrase to avoid
repetition.
 Verb: A verb shows an action or state of being. A verb shows what
someone or something is doing.
20
 Adjective: An adjective describes, modifies, or gives more information
about a noun or pronoun.
 Article: A word that introduces a noun.
 Adverb: An adverb describes/modifies a verb, an adjective, or another
adverb. It tells how, where, when, how often or to what extent.
 Preposition: A preposition shows the relationship of a noun or pronoun to
another word. They can indicate time, place, or relationship.
 Conjunction: A conjunction joins two words, ideas, phrases, or clauses
together in a sentence and shows how they are connected.
 Interjection: An interjection is a word or phrase that expresses a
strong feeling or emotion. It is a short exclamation.

Capitalisation and Punctuation:


These are important while writing sentences as they help readers
understand and interpret the message.

21
Sentences:
A group of words that makes complete sense is called a sentence. The
sentence must contain the subject and a predicate.

Kinds of Sentences:
There are four kinds of sentences:
1. Assertive or declarative sentence or Statement
2. Integrative sentence (a Question)
3. Imperative sentence (a Command)
4. Exclamatory sentence (an Exclamation)

Parts of a sentence-:

Every complete sentence contains two parts---


1. Subject
2. Predicate.

 Subject-:
A subject is a word or group up of words which conveys the name of the person
or think that we are asking about.

 Predicate-:
On the other hand, It is the part of the sentence which contains a verb, and
state something about the subject.

22
Active and Passive voice
The object of the active sentence becomes the subject of the verb in the
passive voice.

23
UNIT 2 :
SELF- MANAGEMENT SKILLS

Self-Management Skills
Def:- Self-management, which is also referred to as ‘self-control’ or ‘self-
regulation’, is the ability to regulate one’s emotions, thoughts, and behavior
effectively in different situations. This includes motivating oneself, and setting
and working towards personal and academic goals.
Domains of Self-Management Skills
i. Stress
Management
ii.Self-Awareness
iii. Self-Motivation
iv. Set Goals
v. Time Management

Stress management: -
Managing stress is all about taking charge: taking charge of your thoughts,
your emotions, your schedule, your environment, and the way you deal with
problems. The ultimate goal is a balanced life, with time for work,
relationships, relaxation, and fun – plus the resilience to hold up under
pressure and meet challenges head on.

24
Stress: -

25
 Stress is a normal physical response to events that make you feel
threatened or upset your balance in some way.
 When you sense danger – whether it’s real or imagined – the body's
defences kick into high gear in a rapid, automatic process known as the
―"fight-or-flight" reaction, or the stress response.
There can be two types of stress- good stress and bad stress.

Good Stress:
 Good stress helps us go about our daily tasks and achieve those hard-to-reach
goals.
 This stress, called eustress, helps us learn new things, adapt to change and
engage in creative thinking.
 Everyone experiences good stress on a daily basis.
 Another form of good stress is the stress that enables us to survive in times of
trauma.
 This stress makes us aware of danger and enables us to escape when we
need to.
Bad Stress:
 Bad forms of stress do not help us achieve goals or tasks, but instead
actually inhibit our ability to function on a daily basis.
 Bad stress occurs when too much stress builds up around us.
 Once the body feels there is too much stress, it will begin to break
down, causing symptoms like perspiration, anxiety, headaches and
rapid breathing.
 This kind of stress can take a huge toll on your physical and mental well-
being.

Benefits / Importance / Needs of Stress Management


Here are the benefits that can be derived with practicing an efficient stress
management method:

 It improves your overall health status.


 You are able to assume a more positive attitude and outlook in life.
 It increases your productivity since you are able to focus clearly on your tasks.
 You have better control over your emotions and how you respond to it.
 And more importantly, you reduce or eliminate stress in your life.
 Improving mood.
 Boosting immune system.
 Improve thinking ability.

STRESS MANAGEMENT TECHNIQUES


Stress Management techniques help to guide and empower individuals to
maintain equilibrium, stabilise their emotions, and live a productive life.

1. Keep a positive attitude.


2. Accept that there are events that you cannot control.
3. Be assertive instead of aggressive. Assert your feelings, opinions, or beliefs
instead of becoming angry, defensive, or passive.
4. Learn and practice relaxation techniques; try meditation, yoga, or tai-chi
for stress management.
5. Exercise regularly. Your body can fight stress better when it is fit.
26
6. Eat healthy, well-balanced meals.
7. Learn to manage your time more effectively.
8. Set limits appropriately and learn to say no to requests that would create
excessive stress in your life.

27
9. Make time for hobbies, interests, and relaxation.
10. Get enough rest and sleep. Your body needs time to recover from
stressful events.
11. Seek out social support. Spend enough time with those you enjoy.
12. Seek treatment with a psychologist or other mental health professional
trained in stress management or biofeedback techniques to learn healthy
ways of dealing with the stress in your life.

Independent Working: -
Independent or self-directed learning is an important skill, whether you plan
to continue your studies after school or college or professionally.
Independent learning is when an individual is able to think, act and pursue
their own studies autonomously, without the same levels of support you
receive from a teacher at school.

To become a good independent learner you need to be:


 Motivated
 Resilient, to overcome challenges
 An excellent time manager
 Becoming self-aware, self-monitoring and self-correcting;
 Knowing what you need to do;
 Taking the initiative rather than waiting to be told what to do;
 Doing what is asked to the best of your ability, without the need
for external prodding, and working until the job is completed;
 Learning to work at a pace that you can sustain;
 Taking ownership of your mistakes without looking for excuses; and
 Refusing to let self-doubt or negative emotions due to negative past
experiences take you off course.

Advantages & Disadvantages of Working Independently

Advantages of Working Independently: -


 There’s Less Conflict
 You’re More Efficient
 You Can Enjoy a Challenge
 You’re in Charge
 You Take Full Credit

Disadvantages of Working Independently: -

 There’s Less Teamwork


 There’s Less Creativity
 You’ll Be More Stressed
 You’ll Get Bored
 You Take Full Responsibility

Characteristics for Independent Working / Self Reliant


 Self-awareness
 Self-motivation
 Self-regulation
28
Self-Awareness: -
 Self-awareness means searching for patterns in the manner we think
about what is taking place, how we can explain matters to ourselves, and also
make sense of the surroundings.
 Self-awareness implies comprehending our moods as well as
emotions. Rather than attempting to avoid how we are feeling, we perceive
and even become interested in our feelings, including the uncomfortable and
tough ones.
 Self-awareness implies focusing on how we are prone to behave
and act in some particular circumstances. How are we going to respond to
certain things? What exactly are our tendencies and habits?

Some useful questions to think about in this regard are the following:
 What kind of science do you enjoy doing? Fundamental or applied?
 Do you enjoy working in the lab or in an office?
 Do you enjoy explaining your work? How? Orally? In Writing? Both?
 Do you like working with others as a member of a team or do you prefer
to work by yourself?
 Are you a good listener?
 Can you handle personal conflict?
 Do you prefer delving into a problem deeply?
 Do you see the "big picture"?
 Do you prefer to work on short term projects (6 months or less) or long term
projects?
 Do you enjoy using instrumentation? What kinds?
 Do you enjoy using computers and/or software?
 Do you enjoy travel? Can you speak one or more foreign languages
conversationally? Can you read in another language?
 Are you self-motivated? Do you require external prompts in order to
meet deadlines and/or achieve results?

Types of Self awareness


1. Internal Self awareness

2. External Self awareness

Internal Self awareness

 Internal Self-awareness is about focusing on your inner values.


 The emotions, values, goals, aspirations, everything which we possess
in our inner feelings.
 Behaviours, thoughts, our weaknesses, and strength which help us
present our views and feel in a certain way. These things come under
the category of internal Self-awareness.
 Any self-aware person can introspect the inner values. This makes them
aware of their behaviours and emotions. One can even manage their
29
feelings and control

30
them if they are aware of what bothers them. Be it any good or bad
actions taken by them that can recognize it very quickly.

External Self awareness

 External Self-awareness deals with our feelings and behaviour with


others.
 It’s the ability to look at others.
 When we assume about a leader, she/he should be empathetic
towards their employees. It helps to build a healthy relationship.
 This awareness helps you decide what others think about you.
 If you can judge whether a person is happy with you or not, then you
have better external Self-awareness. It certainly makes a person more
effective in paying attention to others.

Self-Motivation: -
 Self-motivation is ability to do thinks on your own without being told to do so.
 Self-motivation is a glorious cycle of boosting self-confidence and self-esteem.
 Self-motivation definition, initiative to undertake or continue a task or
activity without another's prodding or supervision.

Self-regulation: -
Self-regulation is the ability to understand and manage your behaviour and
your reactions to feelings and things happening around you.

Multiple Choice Questions:

Q1. Stress is identified as a condition in which a person is ........


A) tensed
B) worried
C) relaxed
D) both (A) and (B)

Q2. What plays a major role in reaction to stress


A) Emotions
B) Personality
C) Confidence
D) None of these

Q3. The feeling of self-awareness enhances our........


A) Self-confidence
B) Self-monitoring
C) Self-Regulation
D) All of the above

Q4. The internal stress caused by ........


A) pent-up worries
B) laziness
C) survival stress
D) experiences

31
Q5. Physical exercise is used as a stress management technique because
A) It improves blood circulation
B) improves self-image
C) make us feel better
D) All of the above

Q6. Stress management prevents


A) psychological disorders
B) behavioural problems
C) both of the above
D) none of the above

Q7. Self-Reliance means


A) Ability to Work Independently
B) Complete the task effectively
C) Both of the above
D) None of the above

Q8............is not a symptom of stress?


A) Increased sweating
B) Cold hands or feet
C) Dry mouth
D) None of these

Q9. Which of the following is not a kind of self-awareness?


A) Knowing your weaknesses
B) Knowing your relatives
C) Knowing your flaws
D) Knowing your strengths

Q10. Which of the following focuses on your ability to influence personal and
professional improvement based on your self-awareness and motivation?
A) Self-regulation
B) Self-awareness
C) Self-motivation
D) All of these
Answers:
Q1.D) Q2.B) Q3.A) Q4.A) Q5.D) 6.C) Q7.C)
Q8.D) Q9.B) Q10.A)

Answer the following questions(2 Marks)

1. What do you mean by Self-management?

Ans. Self-management, also referred to as ‘self-control,’ is the ability to control


one’s
emotions, thoughts, and behaviour effectively in different situations.
2. Give any two examples where small amount of stress is
helpful. Ans. Two examples where small amount of
stress is helpful are:

32
a. A fire alarm is intended to cause stress that alerts you to avoid danger.
b. The stress created by a deadline to finish a paper can motivate you to finish it
on time.

33
3. Write the effects of stress on our life.

Ans. It can harm our emotional and physical health, and limit our ability to
function well at home, in school and within our relationships.

Answer the following questions(3Marks)

1. What is Stress?
Ans – Our emotional, mental, physical, and social responses to perceived
demands or threats are referred to as stress. Stressors are the pressures or
threats that people face. For example –
a. You’re only a few days away from your examinations, yet you’re feeling
unprepared.
b. you are experiencing a loss of someone close in the family.
c. You’re concerned about what others will think of you if you don’t dress
properly or speak
confidently.
d. you are stressed due to lack of sleep.

2. How can you identify your Strengths and Weaknesses?


Ans-The techniques for identifying our strengths and weaknesses are –
Finding Strengths
 Think of anything that you are always successful at.
 Think about what others like in you.
 Take out time and think about what you
do well Finding Weaknesses
 Point out the areas where you struggle and the things you find difficult to do.
 Look at the feedback others usually give you.
 Be open to feedback and accept your weaknesses without feeling low about it.

3. Explain the importance of Stress


Management. Ans:- Stress management is
important as:
 It allows a person to react positively in stressful situations.
 It provides ways to measure the different levels of stress so that the inflicted
person can resort to self-help or seek help from a professional.
 It helps to identify distinct stressors, which can either be good or bad. They
can be self- induced or be triggered due to external situations. They can be
categorised as: Positive stressors, Dangerous stressors (leads to stressful
situations), irrelevant stressors.

34
UNIT 3
ICT SKILLS

TYPES OF OPERATING SYSTEMS


An Operating System (OS) is an interface between a computer user and
computer hardware. An operating system is a software which performs all the
basic tasks like file management, memory management, process
management, handling input and output, and controlling peripheral devices
such as disk drives and printers. Some popular operating systems are,

• DOS (Disk Operating System) • Windows It is an operating system


developed by Microsoft.
•Linux It is an operating system designed for personal computers. It is a free
and open- source software
•Mobile operating Systems
✓ Android
✓ Symbian
✓ Windows Phone
✓ iOS

Following are some of important functions of an operating System.

 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users

35
The different types of operating systems are as follows:
Interactive (GUI-based) A graphical user interface is a user-friendly operating
system in which commands can be entered by clicking/double-clicking/right-
clicking a mouse. Windows operating system is an example of an interactive
operating system.

Single-user, single-task operating system: This type of operating system allows


only one user to do a task on the computer and one thing at a time.
Single-user, multi-task operating system: This type of operating system is used
on Desktop computers, laptops, where a single user can operate on several
programs at the same time. For example, Windows, Apple MacOS are
examples of single-user multi task operating system.

Multi-user A multi-user operating system enables multiple users to work on the


same computer at different times or simultaneously.

Real Time A real time operating system is used to control machinery, scientific
instruments, like robots, in complex animations and computer controlled
automated machines. A real-time operating system is a computing
environment that reacts to input within a specific period of time. It manages
the resources of the computer so that any particular operation is executed in
the same amount of time every time it is executed. Windows CE and Lynx OS
are examples of real-time operating systems.

Distributed A distributed operating system runs on a set of computers that are


interconnected by a network. It combines the different computers in the
network into a single integrated computer and storage location. Windows,
UNIX, and LINUX are examples of distributed operating systems.
Windows 7 operating system
Windows 7 is an operating system developed by Microsoft and is used on
personal computers.
After loading Windows 7, the first screen that appears on the monitor is called
desktop. From the desktop, you can access different components of Windows 7.
By default, Windows 7 has a picture for the desktop background. This is called
wallpaper.
36
Small pictures on the desktop are called icons. These icons represent files,
folders,

37
applications, etc. At the bottom of the desktop is a long bar called the
Taskbar. To the left of the taskbar is the Start button.

Components of Windows 7 Desktop


The components of Windows 7 Desktop are shown in figure 1.

Figure 1

38
Computer :

It displays all the storage areas of the computer . Through the Computer icon, you
can access all drives, files, and folders on the computer. When you double-click
Computer icon, a window shown below in Figure 2 appears on the screen.

Fig 2 Computer Window


Taskbar

Taskbar is the long horizontal bar present at the bottom of the screen. To left of the
Taskbar is the Start button and to the right appears Date/Time. You can also see icons
of active applications and some shortcuts on the Taskbar

The main components of Taskbar are shown in the following figure 3:

Fig 3 Taskbar
Start button it is located on the left of the taskbar. Clicking the Start button (Figure 4)
opens the Start menu and provides access to programs and features, like:
Shut Down: - allows the user to turn off the computer
All Programs: - Provides access to all the installed programs and applications. To start
an application, just click it.
Search Box: - This allows the user to search a file or a folder or run executable files.
39
Control

40
panel: - This allows the user to change various settings.
Recycle Bin Files and folders deleted by the user are stored in the Recycle Bin. From
Recycle Bin, you can retrieve files or folders deleted by mistake.

Fig 4 Start button

File Concept, File Operations, File Organization, Directory Structures And


File- System Structures
Everything you store on your computer is stored in the form of a file. There are
specific naming conventions for naming files or folders, like characters that can be
used, maximum number of characters, etc. Files can be separately placed into
groups, called folders/directories. Each directory/folder can contain related files
and/or sub-folders

The steps to create a new folder are:

1. Double-click the Computer icon.

41
2. Select the drive in which you want to create a new folder. Say, Local Disk D:.

42
3. Window will open up showing files and folders in Local Disc D: Click New Folder on the
toolbar.

4. A new folder is created with name New Folder highlighted

5. Type a name for the folder

To create a new file:

1. Right-click anywhere in the blank area of the right-column.

2. In the Shortcut menu, click New and select the type of the file you want to create.

To rename a file or a folder:

1. Right-click the file or the folder.

2. From the shortcut menu, select Rename option

3. Type the new name or edit the existing name and press the

Enter key. Or Just select the file/folder and press Function key

F2.

To copy a folder or directory

You can copy a file or a folder in any one of the following ways:

1. Shortcut menu:

a. Right-click the file or the folder you want to copy.

b. Select Copy option from the Shortcut menu.

c. Select the drive or the folder where you want to make a copy of the selected file or
folder.

d. Right-click and select Paste option from the Shortcut menu.

2. Drag and Drop method:

To copy a file or a folder, hold down the Ctrl key while dragging it to the new location.

3. Using Keyboard:

a. Select the file or the folder.

b. Press Ctrl + C to copy the file or the folder.

c. Open the destination folder.

d. Press Ctrl + V to paste the copied file.

To Move Files and folders

You can move a file or a folder in any one of the following ways:
43
1. Shortcut menu:

a. Right-click the file or the folder you want to copy.

44
b. Select Cut option from the Shortcut menu.

c. Select the drive or the folder where you want to move the selected file or folder.

d. Right-click and select Paste option from the Shortcut menu.

2. Drag and Drop method: To copy a file or a folder, select the file and drag it to a new
location.

3. Using Keyboard:

a. Select the file or the folder.

b. Press Ctrl + X to cut the file or the folder.

c. Open the destination folder.

d. Press Ctrl + V to paste the copied file.

To permanently delete Files

You can permanently delete the contents of the Recycle Bin in any one of the

following ways: Right-click the Recycle Bin icon and then click Empty Recycle Bin

OR

1. Double-click the Recycle Bin icon.

2. The Recycle Bin window appears.

3. Click Empty the Recycle Bin.

To restore the files and folders

To recover a file from the Recycle Bin, right-click the file, and then click

Restore. Or

Select the file and click Restore this item

CARE AND MAINTENANCE OF COMPUTER

Regular maintenance of the computer system is very important.

Some of the maintenance activities are:

•Keep the components of the computer, like keyboard, mouse, monitor, etc. clean.

•Replace hardware that is not functioning properly

•Keep food items away from the computer

•Cables and chords should not be messed up

•Removing unauthorized software from the computer

•Take regular backup of the data

45
• Ensure backups are working properly by periodically restoring or checking of data. You
should

46
use external hard drive for backup of data on your computer.

•Run anti-virus periodically

•Keep anti-virus software up to date

•Do not overcharge the batteries

•Do not block the vents

•Always shut down the computer properly

How to take

Measures to protect Computer

Regular scans should be done to check for viruses,

malware, etc. An effective antivirus software should be

installed in your computer.

Always keep your anti-virus software updated so that it can detect new viruses. Full
system scan should be done to periodically, preferably weekly to scan for viruses.

A regular disk defragmentation should be done to remove all unnecessary


information that slows down the computer.

Disk defragmentation done at regular intervals helps the disc space to be used at an
optimal level.

Take regular backup of the data on your computer. In case the data is lost due to
any reason, system failure, virus attack, etc., you can easily retrieve your data using
backup files till your last update.

System should be upgraded with new updates that were not there at the time of
purchase, like, increasing RAM, to improve the performance. Also storage space
should also be increased for storage of more information.

If you are getting some disc errors, then make sure that temporary internet files are
deleted from time to time.

Software’s should be updated regularly so that it works with maximum efficiency.

47
QUESTIONS-1 MARK
1 Here are the steps that take place when starting a computer. Rearrange 1
the steps in the correct order. i) Desktop appears after login ii) Login
screen appears iii) Power on Self-Test (POST) starts iv) Operating system
starts v) Welcome screen appears
a) i) -> ii) -> iii) -> iv) -> v)
b) ii) -> iv) -> iii) -> v) -> i)
c) iii) -> iv) -> v) -> ii) -> i)
d) iii) -> v) -> iv) -> ii) -> i)
2 Which one of the following is an example of Operating System? 1
a) Microsoft Word
b) Microsoft Windows
c) Microsoft Excel
d) Microsoft Access
3 Given below are the steps to make a copy of folder ‘D:\Myfolder’ in ‘C:\ 1
Documents’.
Rearrange the steps in the correct order.
(i) Right click anywhere in the folder and select Paste option
from the shortcut menu or use Ctrl+V keyboard keys.
(ii) Select the C: drive and locate Documents folder.
(iii) Right click on Myfolder and select Paste option from the
shortcut menu or use Ctrl+C keyboard keys.
(iv) (iv) Select the D: drive and locate Myfolder.
(a) (iii) -> (i) -> (ii) -> (iv)
(b)(iv) -> (ii) -> (iii) -> (i)
(c) (iv) -> (iii) -> (ii) -> (i)
(d)(i) -> (ii) -> (iii) -> (iv)
4 Which of the following is not an example of Antivirus software? 1
(i) McAfee (ii) Norton (iii) Disk Clean-up (iv) Kaspersky
5 Given below are the components of the taskbar in Windows 7. Rearrange 1
the icons from left to right of the taskbar. (a)Date/Time (b) Start Button
(c) Notification Area
(d) File Explorer
(i) (c) -> (a) -> (b) -> (d) (ii) (b) -> (d) -> (c) -> (a) (iii) (d) -> (c) -> (b) ->
(a) (iv) (a) ->
(b) -> (c) -> (d)
6 Which of the following is not a symptom of a computer affected with 1
virus?
(i) Computer stops responding (ii) Computer restarts on its own (iii)

48
Computer can’t
open a permanently deleted file (iv) Computer runs very slowly

7 The cleaning of software installed in the computer cannot be 1


achieved by
.
a) Disk clean-up b) backup c) Cleaning CPU cabinet d) Installing antivirus
software
8 Which of the following will you opt for saving a file? 1
(a) save button on standard toolbar
(b)save option from file menu
(c) pressing Ctrl+S
(d)any of the above
9 is leakage of information stored in a computer. 1

Ans. Security break


10 Picture for the desktop background is called …………… 1
Ans: wall paper
11 ICT Stands for . 1
a. Inform and Communicate technology
b. Information and Communication technology
c. Inform and Communication technology
d. Information and Communicate technology
12 ICT Skills help us to , run our business and stay 1
connected with our family and friends.
a. Communicate
b. Entertainment
c. Both a) and b)
d. None of the above
13 The most important software in any computer is the . 1
a. Operating System
b. Antivirus
c. Office Package
d. Photo Editing Software
14 Mobile devices also have an operating system like . 1
a. Apple iOS
b. Android
c. Both a) and b)
d. None of the above

49
15 helps the computer to close all the applications, 1
Operating system and turn off the computer.
a. Sleep
b. Shut down
c. Hibernate
d. None of the above

16 Which one of the following shortcut keys is used to paste a file? 1


a. Ctrl + c
b. Ctrl + p
c. Ctrl + v
d. Ctrl + x
17 What are the best options for caring for computer devices? 1
a. Keeping a Device Clean
b. Prepare a Maintenance Schedule
c. Do not overcharge your battery
d. All of the above

18 To clean the computer from the virus we required . 1


a. Antivirus
b. Office Package
c. Photoshop
d. Operating System

19 If we are using a computer for a long time we have to 1

unnecessary files and data from the computer.


a. Delete
b. Save
c. Backup
d. None of the above
20 Sometimes we get mails from companies who are advertising a product 1
or trying to attract you to their website. Such mails are called .
a. Trash
b. Inbox
c. Spam
d. None of the above

21 What happens if you keep a device plugged in after it has been fully 1
charged?
a. It can break.
b. It can overheat.
c. It can stop functioning.
d. Data can get corrupt.

50
22 What role does antivirus play in protecting your device? 1
a. It can increase its performance.
b. It can protect it from overheating.
c. It can prevent data from getting corrupt.
d. It can backup data.

23 Which option does not need to be enabled in order to keep a device cool? 1
a. Make sure the computer’s CPU fan is working.
b. Keep the device unplugged when in use.
c. Do not cover a laptop with a blanket.
d. Avoid leaving the device in the sun.

24 Which of the following is required for keyboard maintenance? 1


a. Use a very dilute combination of soap and water applied with a
non-abrasive cloth to remove stains from the keycaps.
b. Turn the keyboard upside down and shake it to remove foreign
material.
c. Blow dust and other particles with the help of a blower.
d. All of the above.
25 What do you mean by Threats . 1
a. Theft
b. Virus
c. Both a) and b)
d. None of the above

26 If someone steals your desktop computer or laptop, it is referred to as 1


theft.
a. Physical
b. Identity
c. Software Piracy
d. None of the above

27 When a hacker takes your personal information and assumes your 1


identity, this is referred to astheft.
a. Physical
b. Identity
c. Software Piracy
d. None of the above

28 are persons who try to attract you into inappropriate 1


relationships.
a. Trojan House
b. Online Predator
c. Theft
d. None of the above

51
29 Sometimes you may receive very attractive offers saying you have 1
won a huge amount of money in a lottery and that you can claim the
prize by depositing a certain amount of money known as .
a. Trojan House
b. Online Predator
c. Theft
d. Internet Scams

30 We can check secure websites using . 1


a. http://
b. https://
c. Www
d. None of the above

DESCRIPTIVE QUESTIONS

1 What do you mean by Operating System? 1

Ans. Operating System: It is a software that acts as an interface between


the user and the computer.
2 Give two examples of mobile operating system. 2

Ans. Two examples of mobile operating system :


a. Apple iOS
b. Google Android
3 Name two operating systems for laptops or desktop. 2

Ans. Two operating systems for laptops or desktop are:


a. Ubuntu
b. Microsoft Windows
4 Identify me 5

a. I am a physical part of computer.


b. I am a collection of instruction doing specific task.
c. I am the software that starts working as soon as we switch on a
computer.
d. I am an input device used to type text, numbers etc
e. I am a small device that you can use to move, select and open
items on your computer screen.
Ans.
a. Hardware
b. Software
c. Operating System
d. Keyboard
e. Mouse
5 Differentiate between files and folder. 2

Ans.

52
File Folder

A location where a group


A place where information is stored
of files can
in computer.
be stored.

It has a name and extension both It has only name.

6 Write the extension for the following. 3

a. A Notepad file

b. A Sound File

c. An image file

Ans. Extensions are


a. .txt

b. .mp3
c. .jpg
7 Write the steps to create folder on desktop? 1

Ans. The steps to create folder on desktop are:


1. Right-click on desktop and then choose the ‘New Folder’.
2. Type the name of the folder.
8 Write the shortcut command for the following. 3

a. Cut

b. Copy

c. Paste

Ans. Shortcut commands are:


a. Cut ———– Ctrl + X
b. Copy ———– Ctrl + C
c. Paste ———– Ctrl + V

9 What do you mean by Data Backup? 1

Ans. Backing up data means to save the information present on your


computer on another device, such as CD/DVD drives or hard disk.

53
10 What do you mean by Spam? 1

Ans. We get mails from companies who are advertising a product or


trying to attract you to their website. Such mails are called Spam.

11 How can you increase the performance of a computer? 2

Ans. We can increase the performance of a computer by


a. Using an updated Antivirus Software
b. Removing unnecessary files and data, such as temporary files and
images.
12 What do you mean by Virus? 1

Ans. Viruses are computer programs that can damage the data and
software programs or steal the information stored on a computer.
13 Name two types of Virus. 2

Ans. Worms and Trojan Horse


14 Write few tips to protect your data from online theft and viruses. 2

Ans. Few tips to protect our data from online theft and viruses are:
a. Use passwords to login to your computer:
b. Install Anti-virus and Firewall:
c. Use Data Encryption

d. Give details of your credit card or bank account only on secure sites
15 What do you mean by threats to Computer? 1

Ans. Threats are the ways in which personal information can be leaked
from a computer without our knowing.
16 List the various threats to a computer and its data. 2

Ans. The various threats to a computer and its

data are: 1 Virus


2. Phishing
3. Online theft
4. Cyber crime
17 What is ‘s’ in “https”? 1

Ans. ‘s’ stands for secure.

Answers(Objective questions – 1 mark)


1 c) iii) -> iv) -> v) -> ii) -> i)
2 b) Microsoft Windows
3 (c) (iv) -> (iii) -> (ii) -> (i)

54
4 (iii) Disk Cleanup
5 (ii) (b) -> (d) -> (c) -> (a)
6 (iii) Computer can’t open a permanently deleted file
7 c) Cleaning CPU cabinet
8 (d) any of the above
9 Security break
10 wall paper
11 b. Information and Communication technology
12 a. Communicate
13 a. Operating System
14 c. Both a) and b)
15 b. Shut down
16 c. Ctrl + v
17 d. All of the above

18 a. Antivirus

19 a. Delete

20 c. Spam

21 b. It can overheat.

22 c. It can prevent data from getting corrupt.

23 b. Keep the device unplugged when in use.

24 d. All of the above.

25 c. Both a) and b)

26 a. Physical

27 b. Identity

28 b. Online Predator

29 d. Internet Scams

55
30 b. https://

56
UNIT 4
Entrepreneurial Skill

An entrepreneur is an individual or a team, having an innovative idea, and takes


every step to turn the idea into reality, while bearing the risks. Entrepreneurship is
the process of setting up a business, taking it from an idea to realization.
Entrepreneurship is the ability and readiness to develop, organize, and run a
business enterprise, along with any of its uncertainties in order to make a profit.

Entrepreneurship and society

Entrepreneurship is simply described as starting a business using the resources


available to a person. An entrepreneur combines factors in a creative manner in
order to generate value for customers and create wealth.

Society is described as an aggregate of people living together in a community, who


associate for various engagements including business.

Entrepreneurship is the attitude of mind to seek opportunities, take calculated risks


and derive benefits by setting up a venture. It comprises of numerous activities
involved in conception, creation, and running an enterprise.

The beauty of entrepreneurship in a society is that as businesses prosper the impact


the businesses create also increases. It is due to entrepreneurial activity that the
society is provided with goods and services. In turn, society provides market for
products and services provided by the entrepreneur.

Positive impact of entrepreneurship on society:

•Accentuates economic Growth

•Fosters Creativity

•Stimulates Innovation and Efficiency

•Creates Jobs and Employment Opportunities

•Solves the problems of the society

•Encourages welfare of the society

57
Role of society in boosting entrepreneurship:

● Creates needs and demands


● Provides raw materials
● Enables financial support
● Creates a need for education
● Catalyses policy formation and reform
● Facilitates networking
● Supports infrastructure development

Entrepreneurship also creates some adverse impact on society at times like:


 environmental degradation
 trade imbalance
 labour exploitation etc.

Common entrepreneurship activities related to society:


Social Entrepreneurship:
Social entrepreneurship can be understood as creation of sustainable solutions for social
problems that leads to social change by employing entrepreneurial mind-set, processes and
operations.
In social entrepreneurship research is conducted to completely define a specific and
core social problem. Many social problems are tackled by social entrepreneurs such
as low reach of quality education, health and sanitation, unemployment, child labour
etc.
Agricultural Entrepreneurship: Agricultural Entrepreneurship can be defined as being primarily
related to the marketing and production of inputs and products used in agricultural activities.
Farmers have benefited the most with rise in agricultural entrepreneurship as it has
led to low-cost innovations in farming processes.
Women Entrepreneurship: Women entrepreneurship is referred to the entrepreneurial activity
led by women, where women undertake risks, create enterprises, organise factors of production,
innovate with products/services, and generate employment opportunities.
Government of India has defined women entrepreneurship as “an enterprise owned and
controlled by a woman having a minimum financial interest of 51 per cent of the capital and giving
at least 51 per cent of the employment generated in the enterprise to women.”
Small Scale Entrepreneurship: Small scale entrepreneurship refers to starting
industries in which manufacturing, trading, providing services, productions are done
on a small scale or micro scale. These businesses serve as the backbone of many
developing countries.

Qualities of an Entrepreneur
58
The qualities of an Entrepreneur are the key value to success. They play the role to
guide the person to achieve his/her goal. Some qualities of an Entrepreneur are
stated below:

59
QUALITIES OF AN ENTREPRENEUR

OPTIMISM HARD WORK

INDEPENDENCE ENERGETIC

SELF CONFIDENT PERSEVERANT

Hard work: Entrepreneur work hard to be successful. Entrepreneurs use a lot of trial
and error and keep putting in work till they succeed.

Optimism: Positivity and belief in what they do is what takes entrepreneurs far in
their journey. Entrepreneurs should not think negatively or be afraid of adverse
situations. For an entrepreneur, part of being optimistic is about learning from
mistakes and failures and finding alternative ways to do things.

Independence: Entrepreneurs prefer to be their own master and not work under
someone else. Entrepreneurs like the independence to drive a business on their own.

Energetic: Drive and energy is always high in successful entrepreneurs which makes
them extremely proactive. They are continuously taking actions to try multiple
approaches and execute things.

Self-confident: Belief in one’s own vision and abilities and passion for the goal makes
successful entrepreneurs confident. Entrepreneurs are able to transfer this passion
and vision to investors, employees, customers etc. to sell their idea to every
stakeholder.

Perseverant: A way of thinking that helps to accept failure, learn from mistakes, not
give up, continuously experiment etc. is crucial for an entrepreneur. Hence,
entrepreneurs need to be perseverant in their pursuit.

60
Functions of an Entrepreneur

61
Entrepreneurial functions

Organisation Building and Management:


● Organisation building is about bringing together different factors of
production and allocating these resources to bring down costs and
losses.
● All decisions relating to an enterprise are taken by the entrepreneur.
● An entrepreneur builds the organization by taking various steps such as hiring
employees, organizing the factors of production, sourcing finance etc.

Risk taking:
● Risk taking is about taking responsibility and planning for a loss or mishap
that may occur in the future due to unforeseen contingencies.
● Some common risks entrepreneurs take are around return on investment,
hiring of new employees, working with vendors etc.
● An entrepreneur plays the function of developing a certain risk-taking
appetite and taking calculative risks to reduce adverse consequences.

Innovation:
● Entrepreneurs innovate by introducing new concepts, products, services,
designs, ideas etc.
● They may introduce something new and innovative in any branch of economic
activity.
● An entrepreneur foresees a potentially profitable opportunity and innovates in
the effort to exploit it.

Promotional functions
Idea Discovery:
● The first step towards entrepreneurship is discovery of a business idea.
● An entrepreneur comes up with a business idea and thinks about ways to implement
it.
● It is about seeking opportunities for a specific type of business and
finding ways to commercialise it.
● Usually, entrepreneurs work around the process of idea discovery by
exploiting natural resources, finding a market need or calculating the profit
potential.

Detailed Investigation:

62
● While coming up with ideas can seem like an easy process, the challenge is to
understand if the idea has the potential to turn into a viable business venture.
● For this, an entrepreneur conducts research, investigates and evaluates an
idea considering various factors and estimates the total demand for a new
product or service.

63
Assembling the Requirements:
● Some basic business requirements include infrastructure or office
space, human resources, key vendors or partners, working capital etc.
● In a manufacturing or product-based business, some requirements are
selecting the factory site, sourcing plant and machinery, hiring staff,
finding the right suppliers etc.
● No matter what is the type of the business, an entrepreneur has to work
towards assembling and organising all the requirements once he/she is sure
about the practicality and profitability of the proposition.
● Once this function is performed, the project is set to start smoothly.

Financing:

● Raising capital for a business is one of the core functions that


entrepreneurs perform themselves, not just at the initial stage of the
business, but even to grow and scale the business.
● First, the requirements of finances are estimated. Next, the sources from
which capital will come are determined.
● This includes calculating the long-term and short-term financial
requirements and considering the debt equity ratio.

Managerial functions
Planning
● An entrepreneur documents a business idea in the form of a business plan, to
detail each element of the business such as product or service description,
operations, marketing, finance, accounting, growth plan etc.
● A business plan serves as a guide to determine the business objectives and
the course of action.
● It helps to detail the “what, when, how and who” of doing every specific task.
Organizing
● Organizing in the managerial context refers to setting specific and
attainable goals and objectives to be achieved by different departments
and by each employee.
● It is about arranging, directing, guiding, coordinating, and controlling the
key business activities

Directing
● Directing is about initiating planned action and ensuring that each employee
is performing effectively.
● This also includes doing continuous performance reviews and organizing
tasks according to plans.

64
Staffing
● Staffing refers to different sub-processes around human resource
management, such as manpower planning, recruitment, selection,
placement, training, transfer, salary, promotion, payroll, appraisal, etc.
● The objective of staffing is to fill a particular position with the right
employee at the right time.

Leadership
● Leadership is more of a skill than a function for an entrepreneur as he or she
has to lead, guide and supervise people who work for the business.
● It is the process by which an entrepreneur directs, guides and influences the
work of others in choosing and attaining specified goals by mediating
between the individual and organization in such a manner that both get
maximum satisfaction.

Communication
● An entrepreneur has to communicate every single day, in the form of writing,
responding, drafting emails, verbal instruction, discussion, etc.
● Entrepreneurs spend 75% to 90% of their working time communicating with others.
● It refers to the exchange of ideas, feelings, emotions, knowledge, and
information between two or more persons.
● Nothing happens in management until effective communication takes place.

Supervision
● After issuing instructions, the entrepreneur has to see that the given
instructions are carried out.
● Supervision refers to the job of overseeing subordinates at work to ensure
the maximum utilization of resources, to get the required and directed work
done, to correct the subordinates whenever they go wrong, and ensure each
function of the business runs smoothly.

Motivation
● Along with guiding employees, an entrepreneur also plays the role of
motivating them and encouraging positive behavior and culture within the
organization.
● Motivating employees is about creating an urge in them to exhibit the desired
behavior and positive attitude towards work.
● Employees with high motivation automatically do other things along with it to
perform successfully, such as being productive, flexible, competitive,
comprehensive, efficient, etc.

Co-ordination

65
● Coordination between different departments of the business helps to
ensure that work happens in a timely manner.
● Activities of all employees must be channelized towards goal achievement.
● An entrepreneur has to set certain targets, measures, goals, etc.

66
● With different departments to ensure all are coordinating and working
effectively internally as well.

Controlling
● Sometimes controlling is necessary for the entrepreneur to set
company rules and policies.
● The controlling function helps the entrepreneur to set performance standards,
measure and compare productivity and performance, identify variations, take
corrective action, etc.

Negotiation
● An entrepreneur negotiates terms and conditions for many parts of the
business such as payment terms and timelines, salaries of employees,
vendor quotations, etc.

Commercial Functions

Production and Operations


● Depending on whether it is a service business or product business, an
entrepreneur has to perform the function of managing production or
operations.
● For a manufacturing business, production-related activities include sourcing
raw materials, checking the functioning of machinery, utilizing maximum
capacity, meeting order requirements, etc.

Finance and Accounting


● While finance is more focused on raising funds and managing them,
accounting helps to record and analyze the financial position of the business.
● Thus, an entrepreneur has to prepare and analyze cash flow statements,
income sheets, balance sheets, etc.

Marketing
● Marketing is about moving the product or service from the producer into the
hands of the end customer or user.
● It involves promotion, advertising, distribution, customer service, etc
● An entrepreneur has to perform this function to make people aware of the
offerings of the business and makes sales.

Human Resource Management


● Human Resource Management (HRM) refers to the recruitment,
employment, selection, training, development, and compensation of the
employees within an organization.
● An entrepreneur performs this function as no business can function without people.
Role of entrepreneurs:

Innovator’s Role
52
Entrepreneurs innovate by bringing unique and new products and services into the
market. Innovation in the industry results in higher production efficiency which has
led to an increase in employment and income levels.

Agent’s role

Entrepreneurs are perceived as ‘Agents of Change’. They identify the opportunities,


establish
enterprises, and build up industries which in turn lead to the overall development of the
economy.

Coordinating role

An entrepreneur has to coordinate the various factors for production. It involves the
selection of the best possible combination of factors.

Risk assumption role

The fruit of bearing risks can be profit, which leads to wealth generation for the
overall economy. Entrepreneurs retain some amount of the profits earned and put it
back into the business. Therefore, by assuming risk entrepreneurs contribute to the
economy.

Capital formation role

Entrepreneurs enable the formation of capital by mobilizing idle savings for the
purpose of carrying on the business. This mobilization of capital leads to the
development of assets, trade activities, an increase in capital availability, and
economic development.

Imitating role

In developing nations, entrepreneurs usually imitate or adopt the innovations done


by the entrepreneurs of the developed nations. These innovations are adapted
according to the local needs and conditions and work towards overcoming
entrepreneurial challenges.

Employment Generation role

The establishment of business enterprises leads to the generation of employment


opportunities as various human resource professionals are needed to run the
business effectively. Hence, entrepreneurship solves the problem of unemployment,
which is a major problem in economic development.

Status transformation role

Entrepreneurs generate employment, income, and wealth which improves the overall
standard of living in society. Improved standard of living leads to economic
development as it reduces the disparity in income.

Balancing role
Entrepreneurship is encouraged with small and micro enterprises and small-scale
industries as well. This encourages regional development and removes development
imbalances in the economy
53
IMPORTANCE OF AN ENTREPRENEUR

Free market evolution


● Entrepreneurs are important in a free market because they help the
market respond to changing prices and consumer preferences.
● Entrepreneurs bring change in technology, trends, and markets.
● For example, with an increase in digital services, entrepreneurs have created
companies that offer many home delivery services such as groceries,
restaurant food, clothes, accessories, etc.

Efficiency improvements
● A successful entrepreneur tends to adapt to an established business and
increase their own efficiency.
● They innovate with current systems and introduce new technologies
which can significantly create advancement in the industry.
● Hence, during any major changes in the economy, entrepreneurs adapt and
do not have to go out of business.

New markets
● Entrepreneurs can often ‘redefine the rules’ of an established industry.
● They do this by creating new markets for existing products and slightly
innovating in small ways to suit the needs of a new target market.

New values
● Sometimes, entrepreneurs choose ethics over profit and offer a more ethical
product to the world, and are transparent about it.
● For example, Jaipur Rugs has multiple artisans who work towards making
rugs that are sold around the world.
● However, Jaipur rugs are very transparent about their artisan community and
they ensure that artisans are given a fair share of profit.

MYTH ABOUT ENTREPRENEURSHIP

a) Entrepreneurs are born, not made: It is an assumption that entrepreneurial qualities


are inborn and that only people with certain natural talents can become
entrepreneurs. This is a myth and research had established that almost anyone can
be an entrepreneur with the right skills, drive and passion.

b) It takes a lot of money to start a business: While certain amount of capital is


required for take a business off the ground, it varies depending on the business. The
key in entrepreneurship is to start with resources available and grow slowly and
steadily

c) Entrepreneurs take risk: While entrepreneurs definitely have to bear some risks,
they do not necessarily put themselves in high-risk situations. Entrepreneurs take
calculated risks and weigh risk versus reward.

d) Businesses either skyrocket or fail


54
e) Great ideas are what makes entrepreneurs: People who are able to execute the
idea and turn it into a business are referred to as entrepreneurial. Entrepreneurs
do not necessarily reinvent the wheel. Many times, they take existing ideas to
make a business out of it.

f) One must know everything before starting a business: Entrepreneurs continuously


thrive to be in a constant state of learning. What actually counts is not what you
know, but how fast you can learn.

ENTREPRENEURSHIP AS A CAREER OPTION

1. Nurtures development of entrepreneurial skills and capabilities


2. Enables the application of an entrepreneurial mindset
3. Develops the ability to handle failure and ambiguity
4. Enhances critical thinking and problem-solving ability
5. Provides early exposure to the real world
6. Inspires to think about one’s career differently
7. Leads to create a difference in society

**********************************************************************************************
********
A. MCQ QUESTIONS: (Each question carries 1 mark)

1. is the type of employment where one is running a business to


satisfy the needs of people and looking for ways to make the business better.
a. Entrepreneurship
b. Entrepreneur
c. Business plan
d. entrepreneurism
2. Successful entrepreneurs have the abilities.
a. They are confident
b. They keep trying new ideas
c. They are creative
d. All of the above
3. An is a person who is self – employed, is willing to take a calculated
risk, and brings in a new idea to start a business.

a. Software Engineer
b. Entrepreneur
c. Civil Engineer
d. Mechanical Engineer
55
4. The process of developing a business plan, launching and running a business using
innovation to meet customer needs and to make a profit is .

56
a. Software Engineer
b. Entrepreneur
c. Civil Engineer
d. Mechanical Engineer
5. A self-employed person who is always trying to make his/her business better by taking
risks and trying new ideas is an .
a. Business Man
b. Entrepreneur
c. Employer
d. None of the above
6. What do entrepreneurs do when she/he runs their business?
a. Fulfill Customer Needs
b. Use Local Materials
c. Create Jobs
d. All of the above
7. When a person begins a business, he or she may encounter several challenges and
failures. Even while taking a significant risk, an entrepreneur must think .
a. Positively
b. Negatively
c. Both a) and b)
d. None of the above
8. It is necessary for an entrepreneur to continuously towards his/her own and
company’s goals.
a. Work Hard
b. Always take rest
c. Not participate actively
d. None of the above
9. Entrepreneurs need to be open to and try them
without fear of failure.
a. Invest all of money
b. New Ideas
c. Both a) and b)
d. None of the above
10.Experimenting with many ideas is a quality related to .
57
a. Perseverance
b. Confidence
c. Creativity
d. Trial and error
11. An entrepreneur should be able to see a problem from
different perspectives and come up with original and .
a. Creative Solutions
b. New Ideas
c. Both a) and b)
d. None of the above
12. An entrepreneur should be willing to take a and is always open to new
ideas to make his/her business grow.
a. Satisfying human need
b. Product and Service
c. Calculated Risk
d. Regular Production
13. Ravi’s customer comes to his store and starts shouting at him. He does not get angry.
He listens to what his customer is saying. He is .
a. Hardworking
b. Confident
c. Patient
d. Prying new ideas
14. Susheela decides to sell her company tyres in Sri Lanka. It does not sell and she has a
loss. She apologizes to the people who work for her. She says she will plan better next
time. She .
a. takes responsibility for your mistakes
b. thinks before making a decision
c. does not give up
d. is creative
15.A myth, or a misconception about entrepreneurship is .
a. To start a business we required lot of money
b. Business should be unique or special
c. entrepreneurs are born, not made
d. All of the above
58
16. Ramya and Ramu both own plant shops. Ramu sits at his shop every day. When
customers come, he sells to them. Ramya walks around and gets customers to her shop.
She also sells seeds and flowers. Who is Entrepreneur out of Ramya and Ramu.
a. Ramya
b. Ramu
c. Both of the above
d. None of the above
17.What do entrepreneurs do when they run their business?
a. They help in increasing jobs in their area.
b. Helping the people in the society to earn money.
c. Both of the above
d. None of the above
18. Which of the following entrepreneurship refers to starting industries in which
manufacturing, trading, providing services, productions are done on a micro scale?
a. Women Entrepreneurship
b. Agricultural Entrepreneurship
c. Small Scale Entrepreneurship
d. None of the above
19. An enterprise owned and controlled by a woman and giving at least 51 per cent of the
employment generated in the enterprise to women is
a. Agricultural Entrepreneurship
b. Small Scale Entrepreneurship
c. Social Entrepreneurship
d. Women Entrepreneurship
20. Mary buys bulbs for her business from Noida. She learns that bulbs are cheaper in
Faridabad. So, she decides to start buying bulbs from there.

(a) Makes decisions

(b)Divides income

(c) Takes

risk

ANSWERS

59
1 a 5 b 9 b 13 c 17 c

2 d 6 d 10 d 14 a 18 c

3 b 7 a 11 c 15 d 19 d

4 b 8 a 12 c 16 a 20 a

B. DESCRIPTIVE QUESTIONS
1 MARK QUESTIONS:
1. What do you mean by Entrepreneur?
Ans: Entrepreneurs are people with vision who recognize and pursue opportunity,
create and establish business or new ventures, take into account the risk involved by
using available resources.
2.What do you mean by Entrepreneurship?
Ans: Entrepreneurship is the organizing an enterprise to undertake a new
production process, raising capital, arranging labour and raw materials, etc.
3.Entrepreneurs are not job seekers but they create opportunities of employment for
people. (True/False)
Ans. True.

2 MARK QUESTIONS:
1. Explain any two role of entrepreneurs?
Ans. Innovator’s Role: Entrepreneurs innovate by bringing unique and new products
and services into the market.
Risk assumption role: Entrepreneurs are not risk aversive and they realize that taking
risks is a part of business.
Employment Generation role: Entrepreneur solves the problem of unemployment by
generating jobs and employing people.
2. State any two benefits of Entrepreneurship to
society. Ans.
a) Entrepreneurs provide new job opportunities
b) Entrepreneurs increase competition & boost productivity
c) Entrepreneurs create new business & new markets.
d) Entrepreneurs add national income.
e) Entrepreneurs introduce innovative technology and low cost products

3. What is meant by Women Entrepreneurship?


Ans. Women entrepreneurship is referred to the entrepreneurial activity led by

60
women, where women undertake risks, create enterprises, organize factors of
production, innovate with products/services and generate employment opportunities.

61
4. What is meant by Agricultural Entrepreneurship?
Ans. Agricultural Entrepreneurship can be defined as being primarily related to the
marketing and production of inputs and products used in agricultural activities.

5. What is meant by Social Entrepreneurship?


Social entrepreneurship can be understood as creation of sustainable solutions for
social problems that leads to social change by employing entrepreneurial mind-set,
processes and operations. In social entrepreneurship research is conducted to
completely define a specific and core social problem.

6. Define Small Scale Entrepreneurship?


Ans. Small scale entrepreneurship refers to starting industries in which
manufacturing, trading, providing services, productions are done on a small scale or
micro scale.

7. What do you mean by business plan?


Ans. A business plan is a document that thoroughly explains a business idea and how
it will be carried out. It defines in detail a company's objectives and how it plans to
achieve its goals.
8. List any two qualities of an entrepreneur.
Ans. Hard work, optimism, independence, energetic, self- confident, perseverant.
9. What are the main commercial functions of an entrepreneur?
Ans. The commercial functions are production, finance, marketing, personnel and
accounting.

10.List any difference between wage employed and self-employed people.


Ans. Wage employed people are people who work for a person or an organization and
get paid for that work.
Self-employed people are those who start businesses to satisfy the needs of people.

11.What are the characteristics of Entrepreneur?


Ans. a) Economic: Entrepreneurship is an economic activity because it involves the
creation and operation of an enterprise with a view to creating value or wealth by
ensuring optimum utilization of resources.
b) Innovation: Entrepreneurship involves a continuous search for new ideas and
innovation. Innovation occurs through the introduction of a new quality in a product,
a new product.
c) Profit potential: Before starting a new business, evaluate the expected returns from the
business.
d) Risk bearing: The essence of Entrepreneurship is the willingness to take risk arises
62
out of the creation and implementation of new ideas.
e) Decision making: Entrepreneurship is making right and correct decisions tr
appropriate time by entrepreneur. A correct decision results in success in business
venture.

63
f) Managerial skills: The Entrepreneur must have right managerial skills so as to
handle the group of people efficiently.
g) Organization building: It implies skills to build an organization. Building an
organization is important part of Entrepreneurship development.

12.How Entrepreneurship is helpful to society?


Explain. Ans:
a) Helps in Wealth creation and sharing: By establishing Business entity,
entrepreneurs invest their own resources and attract capital from investors, lenders
and the public.
b) Creating Employment Opportunities jobs: Entrepreneurs are by nature and
definition job creators, as opposed to job seekers.
c) Innovation: Entrepreneurs use businesses to create products and services that
solve problems in innovative ways. There products and services must be functional
and they must be designed to be cost effective.
d) Balanced Regional Development: Entrepreneurs setting up new businesses and
industrial units help with regional development by locating in less developed and
backward areas.
e) Improves Standards of Living of People: Increase in the standard of living in a
community is another key goal of economic development. Entrepreneurs play a key
role in increasing the standard of living in a community. They do this not just by
creating jobs, but also by developing and adopting innovation that led to
improvement in the quality of life of their employees, customers and other
stakeholders in the community.

13.Write a note on Entrepreneurship as career


option. Ans:
a) Nurtures development of entrepreneurial skills and capabilities.
b) Develops the ability to handle failure and ambiguity.
C) Enhances critical thinking and problem-solving ability
d) Provides early exposure to the real world
e) Leads to creating difference in society
f) Inspires to think about one’s career differently

14. What do you think are the important functions of an entrepreneur? Write your
answer giving suitable examples.
Ans.
The functions of an entrepreneur are:
 Making Decisions: An entrepreneur makes decisions every day. This includes
what to produce or sell, how much and where to sell.
 Managing the Business: An entrepreneur plans the future of his or her
business. He/she arranges for raw material, hires people for work, and tells
64
everyone what to do. They also check if the plan is being followed.
 Divide Income: The entrepreneur divides the business money into many
groups. He/she spends money to buy material, pays rent of the building and
salaries to people.

65
 Taking Risk: Risk is the chance of something going wrong. An entrepreneur
takes risks against fires, lost items and theft.
 Create a new Method, Idea, or Product: An entrepreneur is always trying new
things. He/she does this to increase their importance and income.

15.What do entrepreneurs do when they run their business?


Or
List the ways in which an entrepreneur affects a society.
Ans. –

a. Fulfil Customer Needs – A product or service that people want is referred to as


demand. Entrepreneurs discover what people desire. Then students use their
imaginations to come up with a business plan to address that demand.
b. Use Local Materials – Entrepreneurs produce low-cost items by using the materials
and people available to them.
c. Help Society – Entrepreneurs have a good interaction with the general public. They
gain money by doing things that help society. Some business people donate money
to create schools and clinics, while others work to save the environment.
d. Create Jobs – They buy more material, and from more people. They also hire more
people to work for them. In this way, more people have jobs.
e. Sharing of Wealth – Wealth means having enough money to live a comfortable life.
As entrepreneurs grow their business.
f. Lower Price of Products – The price of a product decreases when more
entrepreneurs sell the same thing. In India, for example, as more mobile phones
were sold, the cost of the phone decreased.
16.List any five qualities of the entrepreneur?
They are confident. They believe in themselves and their
abilities. They keep trying new ideas in their business.
They are patient.
They are creative and think differently about
business ideas. They take responsibility for their
actions.
They make decisions after thinking about
them. They work hard.
They do not give up when they face a difficulty
17.Write any four Functions of entrepreneurship?

66
Ans. Planning, organizing, decision making, managing, innovating, risk bearing, etc.

67
18.How do entrepreneurs contribute to society?

Ans. Entrepreneurs contribution to the welfare of society is of high order. A business


person apart from making money for him or herself also helps the society in many
ways financially and socially. Also they contribute in form of donations, sponsorship,
welfare programs, advisors to respective government, etc.

19.Mention four important roles of an

entrepreneur. Ans. Four important roles of an

entrepreneur are:

Innovator’s

role Agents’

role Innovator

Risk Assumption

Capital formation

Employment

generation

20.Is entrepreneurship a career choice?

Ans. Entrepreneurship is becoming the most pursued career choice. The term
entrepreneurship is defined as the type of self-employment where one is running a
business and looking for ways to make the business better to make profits.

21.“Entrepreneurs are born, not made.” Do you agree with this statement? Justify
your answer. Ans. No, this is a myth/misconception about entrepreneurship.
Being an entrepreneur starts with a way of thinking. One must believe that anything
is possible and it shall be achieved. It starts with thinking of an idea that you want to
work on, making it different.

22.Entrepreneurship has a positive impact on society. Write down


any two. Ans.
1. Some of them work towards saving the environment.
2. Some of them give money to build schools and hospitals.

23.What is the difference between a businessman and an entrepreneur?


Ans. A businessman walks on the defined path, but an entrepreneur believes in
making his own path, which becomes a guideline for other businessmen.
68
Unit 5
GREEN
SKILLS

SUSTAINABLE DEVELOPMENT

As the human race progressed, we neglected the vitality of nature in our lives. In
pursuit to fulfil our unending wants we started exploiting the nature that has resulted
in what we see today, the scarcity. There is scarcity of clean water to drink, scarcity
of pure air to breathe, scarcity of unadulterated food, rising issue of global warming,
depletion of ozone layer.

69
Everyone in the world today is talking about the measures to curb these rising
problems. There are World Summits being organised to find a solution to these global
problems. And the solution to these problems is only one – SUSTAINABILITY.

‘The ability to be maintained at a steady level’ is SUSTAINABILITY.

- Collins English Dictionary

Sustainability focuses on how human beings can live in peace and harmony with
nature without creating ecological disturbance. The aim is that we visualize the long
term impact of our actions on environment and take corrosive measures to maintain
balance between our demands and the supply of natural resources.

SUSTAINABLE DEVELOPMENT

The concept of sustainable development received


its first major international recognition in 1972 at
the UN Conference on the Human Environment held
in Stockholm.

Sustainable development is the “Development that


meets the needs of the present without
compromising the ability of future generations to
meet their own needs”.

- Brundtland Report – Our Common Future,


published in 1987 by the World Commission on
and Development (WCED) Environment

Sustainable development focuses on long term, integrated approach to develop a


healthy, social and economically viable society. The aim is to inculcate the value of
self-resistance amongst the people to save natural resources for everyone to utilize
judiciously and still ensuring its availability for future generations.

4 R’S AND 1 U OF SUSTAINABILITY

In our daily life we can contribute to create a Sustainable Society by following 4Rs’ and
1U of
Sustainability. These are REFUSE, REDUCE, REUSE, RECYCLE and UPCYCLE.
70
REFUSE - Not to use products that may not harm the environment.

REDUCE - To minimize the use of the products that may cause harm to the
environment.

71
REUSE - To reuse products as far as possible, in order to reduce the waste
generation.

RECYCLE - After reusing the product, we must try to recycle it as far as possible.

UPCYCLE - Any product that is not usable can be upcycled with creativity and
innovation. It gives a new look to the old product and makes it look desirable.

IMPORTANCE OF SUSTAINABLE DEVELOPMENT

In the 21st Century the importance of adopting


sustainable techniques for sustainable development
is of grave importance.

1. Judicious use of resources is of prime importance


since the exploitation of resources is causing its
depletion. We need to curb our usage to ensure that
resources like air, water, forests are available to
future generation. This would also mean that the
resources are in their pure form.

2. Not only for the next generation but even for the
existing generation, the quality of basic resources
is deteriorating
leading to major health concerns such as Cancer, Bronchitis etc. Ensuring
sustainability will help curb these problems.
3. Rising demands is leading to economic disparity. The rich is becoming richer while
the poor is becoming poorer. The uneven distribution of available resources across
different economic fronts is leading to discrimination, giving rise to crime and
creating
social imbalance. To ensure proper balance
Sustainability is important.

4. Environmental problems like Climate Change,


Emission of Green House gases are alarming. If
everyone draws a line for themselves, we will be
able to combat these issues with the help of

72
Sustainable Development.

5. Adoption of Sustainable Development in our daily life and at our work place will
also promote economic growth. Young entrepreneurs with minimum investment can
produce better output. Introduction of Solar Power Plants, Waste Water Treatment
Plants, Electric Vehicles etc. will not only help in protecting Environment but shall
also contribute in Saving money and resources. The

73
economy that reduces environmental risks and strikes ecological balance is termed
as Green Economy.

DRIVING FORCE TO PROMOTE


SUSTAINABLE DEVELOPMENT

The following may be considered as


the driving force to promote
Sustainable Development:
i. Protecting and living in harmony
with the Nature
ii. Considering all human being
as equal
iii. Promoting good governance
iv. Using Science &
Technology responsibly
v. Creating healthy, social
and economically viable society

SUSTAINABLE DEVELOPMENT GOALS


To ensure that Sustainable Development is ensured in our communities and world at
large United Nations Member States in 2015 adopted 17 SDGs (Sustainable
Development Goals) as a universal call to action to end poverty, protect the planet
and ensure that all people enjoy peace and prosperity by 2030. These are:

1. poverty
2. Zero Hunger
3. Good Health and Well Being
4. Quality Education
5. Gender Equality
6. Clean water and Sanitation
7. Affordable and Clean Energy
8. Decent Work and Economic Growth
9. Industry Innovation and Infrastructure
74
10. Reduced Inequalities
11. Sustainable Cities and Communities
12. Responsible Consumption and Production
13. Climate Action

14. Life Below Water


15. Life on Land
16. Peace, Justice and Strong Institution
17. Partnership for the Goals

PROBLEMS RELATED TO SUSTAINABLE


DEVELOPMENT

To achieve Sustainability for next generation,


the whole world needs to come as one. This is
the biggest challenge in realising this goal
because of the following reasons:

1. A large population in major parts of the world is living


an underprivileged life and is excluded. For them earning a meal each day is a
challenge. Under such circumstances, expecting an alteration in their mind set or
behaviour is not easy.

2. A huge population in world’s economy is unemployed. Any means of earning


whether
75
sustainable or not is their ray of hope.

76
3.With the existing issues of climate change, number of species has extinct and
many are on verge of their extinction. Under such circumstances striking a balance in
the food chain is a big responsibility.

4. The market all over the world is trying to capture as many resources as possible to
maximize their profit. In pursuit of maximising the profit they overuse and exploit the
resources.

5. In the time of nuclear race, where every developing country is trying its hand to
become developed nation, ensuring world peace is a global challenge.

6. It is the responsibility of every country to ensure having a full proof policy towards
Sustainable Development. While the challenge remains that many are simply leaving
loose ends in the execution of policies.

7. Last but most important, while it is the responsibility and accountability of every
individual to promote Sustainable Development, there is a huge world population
which is simply insensitive towards its need.
QUESTIONS
1 mark QUESTIONS

1. There are SDGs given by the United Nations.

17

2. SDGs stand for

Sustainable Development Goals

3. Give any one practice / sustainable process that is being used to help
preserve the environment.

organic farming/ vermicomposting

4. When and where Sustainable Development Goals were launched?

United Nations Sustainable Development Summit in New York in


September 2015.
5. What is Sustainable Development?

Sustainable development is the development that satisfies the needs of


the present without compromising the capacity of future generations.

77
6. What do you mean by Sustainable Development Goals?

The Sustainable Development Goals (SDGs) are a universal call of action


to end poverty, protect the planet, and ensure that all people enjoy
peace and prosperity.
7. Give any 2 R’s of sustainability.

These are REFUSE, REDUCE, REUSE, RECYCLE. (Any two)

8. Enlist different problems related to Sustainable Development.

Food and nutrition security, safe drinking water, energy security, and
waste management.

9. Why is upcycling used extensively in sustainable development?

Any product that is not usable can be upcycled with creativity and
innovation to give a new look to an old product, this helps in
sustainable development.
10. What is meant by REFUSE in context of creating sustainable
environment?

REFUSE implies refusing use of those products which may cause harm to
environment.
DESCRIPTIVE (2 MARKS)

1. Enumerate any two initiatives through which we can reduce inequalities


in our society

 Helpful to one another.


 Friendly with everyone.
 Including everyone while working or playing.
 Helping others by including everyone whether they are small or
big, girl or boy, belonging to any class or caste.
2. Explain ‘Affordable and Clean Energy’.

 Using solar power i.e., power generated using the sun does
not cause pollution as it does not require burning of non-
renewable fuels, such as coal.
 Use of biogas is also an eco-friendly alternative to natural gas.

78
3. ‘Reduced Inequalities’ is one of the Sustainable development goals set
by the UN.
Give any two ways to reduce inequalities.

Two easy to reduce inequalities are : -

 Be helpful to one another.


 be friendly with everyone
4. What are the problems related to sustainable development? Discus any
two.

 Food: Large areas of rich, fertile land needed to grow crops, which
is becoming less as we are using up more and more land for other
purposes – cities, roads, airports, industries, etc. Soil nutrients are
also getting depleted and lots of chemicals are spoiling the soil
due to use of chemical fertilizers.
 Water: We use fresh water from rivers and ponds for drinking
and cleaning but dump garbage into them. The rivers and ponds
are getting polluted. This way after several years, we will have
no clean water for our use.
 Fuel: We are using a lot of wood from trees as fuels and for
construction of homes and furniture. As more and more trees are
being cut, it is affecting the climate of the place. Extreme
weather conditions, such as floods, extreme cold or heat, are
seen in many places, which affect the people
living there.
5. Briefly explain importance of sustainable development.

 It will ensure that resources like air, water, forests are saved
to future generation.
 Problems like Climate Change, Emission of Green House gases
can be taken care of with the help of Sustainable
Development.
 Adoption of Sustainable Development in our daily life and at our
work place
will also promote economic growth.

79
INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Humans developed machines to make their lives easier to accomplish tasks which
are too tedious or are time consuming. Therefore humans put efforts in making the
machines more sophisticated and smart.
Children are asked to compare old TV and smart TVs. How they differ in their working.
Similarly Old phones and smartphones are compared, to understand about latest
facilities in smart phones.

Mention two types of machines which have evolved with time.

ARTIFICIAL INTELLIGENCE:
Artificial is something which is man-made, which does not occur naturally.
Intelligence is the ‘ability to perceive or infer information, and to retain it as knowledge to be applied
towards adaptive behaviours within an environment or context.’

ARTIFICIAL INTELLIGENCE

ARTIFICIAL INTELLIGENCE
HUMAN INTELLIGENCE:
Human Intelligence is defined in terms of :
1. Ability to observe, recognize and understand
2. Ability to make ‘smart’ decisions and solve problems
3. Ability to learn and increase knowledge

80
Any device that can perform the above, can be termed as intelligent device.
When a machine possesses the ability to mimic human traits i.e make decisions,
predict the future, learn and improve on its own by collecting data, understand it,
analyse it , learn from it and improve it, it is said to have Artificial Intelligence.
Machines become intelligent once they are trained with data and algorithm.

Define Artificial Intelligence.

How does a machine become Artificially Intelligent?

Mention four examples of artificially intelligent applications in our smart


phones.
Answer:
Phone Smart Lock / Snapchat filter / Shopping websites / Netflix /
YouTube / Face Detection / Google Maps / Emotions recognition / Google
assistant / Natural language recognition / image detection / beauty filters
etc.

THE ABILITIES THAT ARE INVOLVED IN INTELLIGENCE:

81
There are mainly 9 types of Intelligence :-

1. Mathematical Logical Intelligence: A person's ability to regulate, measure,


and understand numerical symbols, abstraction and logic.
2. Linguistic Intelligence: Language processing skills both in terms of
understanding or implementation in writing or speech.
3. Spatial Visual Intelligence: It is defined as the ability to perceive the visual world
and the relationship of one object to another.
4. Kinaesthetic Intelligence: Ability that is related to how a person uses his limbs in
a skilled manner.
5. Musical Intelligence: As the name suggests, this intelligence is about a person's
ability to recognize and create sounds, rhythms, and sound patterns.
6. Intrapersonal Intelligence: Describes the level of self-awareness someone has
starting from realizing weakness, strength, to recognizing his own feelings.
7. Existential Intelligence: An additional category of intelligence relating to
religious and spiritual awareness.
8. Naturalist Intelligence: An additional category of intelligence relating to the
ability to process information on the environment around us.
9. Interpersonal Intelligence: Interpersonal intelligence is the ability to
communicate with others by understanding other people's feelings and the
influence of the person.

Every human being has all 9 intelligence, but at different levels.

What do you understand by mathematical and logical reasoning?

82
Exercise – 1 :
Teachers can list out some professions and ask students to identify the type of
intelligence used in their professions.
For Eg:

83
Lawers : Linguistic Intelligence
Musicians : Musical Intelligence
Architect : Mathematical, Logical Reasoning
Exercise – 2 :
Allow students to check on, the type of intelligence used by them, when they are
exposed to various scenarios.

Identify and list the intelligence types that you have in descending order.

What is Intelligence? Explain in brief any three types of intelligence that are mainly
perceived by human beings?

What do you understand by Interpersonal Intelligence?

APPLICATION OF ARTIFICIAL INTELLIGENCE AROUND US:


a. Google Search Engine:
With the help of AI, Google Search Engines, turned into intelligent search, producing
direct answers. It uses voice and image searches and incorporated deep learning to
fasten the searches with more accuracy.
b. Voice assistant:
AI is being used in voice assistants to recognize words spoken by the user. NLP has
capabilities like “Speech-to-Text” convert the natural language of the user into text
for further processing. Digital assistants improve its performance over time.
c. E-commerce website:

84
With the use of big data, AI in E-Commerce is impacting customer choices by
recording the data of previous purchases, searched products, and online browsing
habits.
d. Navigate to Places:
To help us navigate to places, apps like UBER and Google Maps exist. Thus, one no
longer needs to stop to ask for directions.
e. Improved Gaming Experience:
AI has changed the world of gaming by making the game more intelligent with
enhanced graphics, providing the ability to learn using machine learning algorithms.
Games, understand human patterns and give responses to new difficulty levels. AI
can adapt to your playing style by making the game more exciting.
f. Platforms that provide recommendations:
Platforms like Netflix, Amazon, Spotify, YouTube etc. show us recommendations on
the basis of what we like. They even cater to needs of connecting with friends on
social media platforms with apps like Facebook and Instagram. They also send us
customized notifications about our online shopping details, auto-create playlists
according to our requests and so on. Taking selfies with Snapchat filters are all
possible now.
g. Monitor Health:
AI is also being used to monitor our health. Chatbots and other health apps are
available, which continuously monitor the physical and mental health of its users.
The humanoids like Sophia, to get citizenship, biometric security systems like the
face locks in phones, real-time language translators, weather forecasts, all use AI.

WHAT IS AI & WHAT IS NOT AI :

WHAT IS NOT AI?


a. A fully automatic washing machine:
It can work on its own, but it requires human intervention to select the parameters of
washing and to do the necessary preparation for it to function correctly before each
85
wash, which makes it an example of automation, not AI.
b. An Air Conditioner working remotely :

86
An air conditioner can be turned on and off remotely with the help of internet but still
needs a human touch. This is an example of Internet of Things (IoT).
c. Automated Robots :
Robots which might follow a path or maybe can avoid obstacles but need to be
primed accordingly each time.
d. Automated Projects using Sensors :
A lot of projects which can automate our surroundings with the help of sensors, bots
or the automation machine is not trained with any data, it does not count as AI.
e. All "smart" devices are not AI-enabled :
For example, a TV does not become AI-enabled if it is a smart one.
NOTE: It gets the power of AI when it is able to think and process on its own.

AI, ML & DL :

Artificial Intelligence (AI)


Refers to the technique that enables computers to mimic human intelligence. It gives
the ability to machines to recognize a human’s face; to move and manipulate
objects; to understand the voice commands by humans etc. The AI-enabled machines
think algorithmically and execute intelligently.
Machine Learning (ML)
It is a subset of Artificial Intelligence which enables machines to improve at tasks
with experience (data) using the provided data and make accurate Predictions/
Decisions.

87
Deep Learning (DL)

88
It enables software to train itself to perform tasks with vast amounts of data. In Deep
Learning, the machine is trained with huge amounts of data which helps it in training
itself around the data. Such machines are intelligent enough to develop algorithms
for themselves.

Differentiate between Machine Learning & Deep Learning.


Machine Learning Deep Learning
Performs well on small to medium
Data Performs well on large datasets
datasets
Hardware Able to function on CPU Requires significant computing power e.g., GPU
Features need to be manually
Features Learns features automatically
identified
Training time Quick to train Computationally intensive

Compare Artificial Intelligence, Machine Learning & Deep Learning.

Artificial Intelligence Machine Learning Deep Learning

AI stands for Artificial DL stands for Deep


Intelligence, and is ML stands for Machine Learning, and is the
basically the Learning, and is the study that makes use of
study/process which study that uses Neural Networks (similar
enables machines to statistical methods to neurons present in
mimic human enabling machines to human brain) to imitate
behaviour through improve with functionality just like a
experience. human brain.
particular algorithm.
AI is the broader family
consisting of ML and DL ML is the subset of AI. DL is the subset of ML.
as it’s components.

DL is a ML algorithm that
AI is a computer ML is an AI algorithm uses deep (more than
algorithm which which allows system to one layer) neural
exhibits intelligence learn from data. networks to analyze data
through decision and provide output
making. accordingly.
If you are clear about the
If you have a clear idea
math involved in it but
about the logic (math)
don’t have idea about
involved in behind and
Search Trees and much the features, so you
you can visualize the
complex math is break the complex
complex functionalities
involved in AI. functionalities
like K-Mean, Support
into
Vector Machines, etc.,
linear/lower
then it defines the ML
89
dimension features by
aspect.
adding more layers, then
it defines the DL aspect.
It attains the highest
The aim is to basically The aim is to increase
rank in terms of
increase chances of accuracy not caring
accuracy when it is
success and not much about the success
trained with large
accuracy. ratio.
amount of data.
DL can be considered as
neural networks with a
Three large number of
Three parameters layers lying
broad in one of the four
categories/types Of AI broad fundamental
are: Artificial categories/types Of ML network
are: Supervised architectures:
Narrow Intelligence Unsupervised Pre-trained
(ANI), Artificial General Learning, Unsupervised
Intelligence (AGI) and Learning and Networks, Convolutional
Artificial Super Reinforcement Learning
Intelligence (ASI) Neural
Networks, Recurrent
Neural Networks and
Recursive Neural
Networks
The efficiency Of AI is Less efficient than DL as
More powerful than ML
basically the efficiency it can’t work for longer
as it can easily work for
provided by ML and DL dimensions or higher
larger sets of data.
respectively. amount of data.

Examples of AI
applications Examples of ML Examples of DL
applications include: applications include:
include: Google’s AI- Virtual Personal Sentiment based news
Powered Predictions, Assistants: Siri, Alexa, aggregation, Image
Ridesharing Apps Like Google, etc., Email Spam analysis and caption
Uber and Lyft, and Malware Filtering. generation, etc.
Commercial Flights Use
an AI Autopilot, etc.

INTRODUCTION TO AI DOMAINS:
Artificial Intelligence becomes intelligent according to the training which it gets. For
training, the machine is fed with datasets. According to the applications for which the
AI algorithm is being developed, the data which is fed into it changes.
With respect to the type of data fed in the AI model, AI models can be broadly
categorized into three domains:
90
91
a. Data Sciences
Data sciences is a domain of AI related to data systems and processes. The system
collects numerous data, maintains data sets, and derives meaning/sense out of them.
The information extracted through data science can be used to make a decision
about it. Example of Data Science:
Price Comparison Websites
These websites are being driven by lots of data giving us the convenience of
comparing the price of a product from multiple vendors at one place.
PriceGrabber, PriceRunner, Junglee, Shopzilla, DealTime are some examples of
price comparison websites.
b. Computer Vision
Computer Vision (CV) , is a domain of AI that depicts the capability of a machine to
get and analyze visual information and predict some decisions about it. The entire
process involves image acquiring, screening, analyzing, identifying and extracting
information. This extensive processing helps computers to understand any visual
92
content and act on it accordingly.

93
In computer vision, Input to machines can be photographs, videos and pictures from
thermal or infrared sensors, indicators and different sources.
Computer vision related projects translate digital visual data into descriptions. This
data is then turned into computer-readable language to aid the decision-making
process. The main objective of this domain of AI is to teach machines to collect
information from pixels.
Examples of Computer Vision
Self-Driving cars/ Automatic
Cars
CV systems scan live objects and analyse them, based on whether the car decides to
keep running or to stop.
Face Lock in Smartphones
Smartphones come with the feature of face locks in which the smartphone’s owner
can set up his/her face as an unlocking mechanism for it. The front camera detects
and captures the face and saves its features during initiation. Next time onwards,
whenever the features match, the phone is unlocked.
c. Natural Language Processing
Natural Language Processing (NLP) , is a branch of artificial intelligence that deals
with the interaction between computers and humans using the natural language.
Natural language refers to language that is spoken and written by people, and natural
language processing (NLP) attempts to extract information from the spoken and
written word using algorithms.
The ultimate objective of NLP is to read, decipher, understand, and make sense of
the human languages in a manner that is valuable.
It has two main components:
Natural Language Understanding (NLU): It is used for spoken or written language to
provide a link between natural language inputs and what they present. It analyzes
different aspects of language.
Natural Language Generation (NLG): It helps to produce meaningful phrases and
sentences along with Text planning, Sentence Planning, and Text realization.
Examples of Natural Language Processing
Email filters
Email filters are one of the most basic and initial applications of NLP online. It started
out with spam filters, uncovering certain words or phrases that signal a spam
message.
Smart assistants
Smart assistants like Apple’s Siri and Amazon’s Alexa recognize patterns in speech,
then infer meaning and provide a useful response.

94
What are AI Domains ?

95
Pick the odd one out and justify your answer:
a. Snap Chat Filter
b. Face Lock in Phone
c. Chatbot
d. Image search Option

Answer: Chatbot, as it is NLP based, the other three are Computer vision based

Applications of Artificial Intelligence around us


Every now and then, we surf the internet for things on Google without realizing how
efficiently Google always responds to us with accurate answers. Not only does it
come up with results to our search in a matter of seconds, it also suggests and
autocorrects our typed sentences.

We nowadays have pocket assistants that can do a lot of tasks at just one command.
Alexa, Google Assistant, Cortana, Siri are some very common examples of the voice
assistants which are a major part of our digital devices.

To help us navigate to places, apps like UBER and Google Maps come in there. Thus,
one no longer needs to stop repeatedly to ask for directions.

AI has completely enhanced the gaming experience for its users. A lot of games
nowadays are backed up with AI which helps in enhancing the graphics, come up
with new difficulty levels, encourage gamers, etc.

96
AI has not only made our lives easier but has also been taking care of our habits,
likes, and dislikes. This is why platforms like Netflix, Amazon, Spotify, YouTube etc.
show us recommendations on the basis of what we like.

AI is also being used to monitor our health. A lot of chatbots and other health apps
are available, which continuously monitor the physical and mental health of its users.

These applications are not limited to smart devices but also vary to humanoids like
Sophia, the very first humanoid robot sophisticated enough to get citizenship,
biometric security systems like the face locks we have in our phones, real-time
language translators, weather forecasts, and whatnot! This list is huge, and this
module will go on forever if we keep tabulating them. So, take some time, discuss
with a friend and identify more and more AI applications around you!

AI Ethics
AI ethics is a set of values, principles and techniques that employee widely accepted
standards of right and wrong to guide moral conduct in the development and use of
AI technology.
AI Bias and AI Access
Bias means inclination or prejudice for or against one person or group, especially in
a way considered to be unfair. When AI programs, tool, and algorithm exhibit any
kind of bias, it is called AI bias.
AI Access
Since Artificial Intelligence is still a budding technology, not everyone has the
opportunity to access it. The people who can afford AI enabled devices make the
most of it while others who cannot are left behind. Because of this, a gap has
emerged between these two classes of people and it gets widened with the rapid
advancement of technology

97
AI Project Cycle

What is an AI Project Cycle?


Project Cycle is a step-by-step process to solve problems using proven scientific
methods and drawing inferences about them.

Let us take some daily examples as projects, requiring steps to solve the
problem. Creating a birthday card.

1. Checking the factors like budget, etc which will help us decide the next
steps and understanding the Project.
2. Acquiring data from different sources like online, with friends etc for Designs and
ideas.
3. Making a list of the gathered data.
4. Creating or modelling a card on the basis of the data collected.
5. Showing it to Parents or cousins to let them check it or evaluate it.

Components of AI Project Cycle?


Components of the project cycle are the steps that contribute to completing the Project.

The Components of AI Project Cycle are: -


 Problem Scoping - Understanding the problem
 Data Acquisition - Collecting accurate and reliable data
 Data Exploration - Arranging the data uniformly
 Modelling - Creating Models from the data
 Evaluation - Evaluating the project

1. Problem Scoping
Problem Scoping refers to understanding a problem, finding out various factors which
affect the problem, define the goal or aim of the project.

Sustainable Development Goals


Sustainable Development: To Develop for the present without exploiting the resources of
the future.
o 17 goals announced by United Nations.
o Aim to achieve them by 2030.
o Pledge taken by all the member nations of the UN.

The Sustainable Development Goals (SDGs), also known as the Global Goals, were
adopted by all United Nations Member States in 2015 as a universal call to action to
end poverty, protect the planet, and ensure that all people enjoy peace and
prosperity

98
4 W's of Problem Scoping
4 Problem Statement Template
The 4W’s of Problem Scoping are Who, What, Where, and Why.
This W’s helps in identifying and understanding the problem in a better and efficient
manner.
 Who - “Who” part helps us in comprehending and categorizing who all are affected
directly
and indirectly with the problem and who are called the Stake Holders.
 What - “What” part helps us in understanding and identifying the nature of the
problem and under this block, you also gather evidence to prove that the
problem you have selected exists.
 Where - "Where” does the problem arise, situation, context, and location?
 Why - “Why” is the given problem worth solving?

Problem Statement Template


The Problem Statement Template helps us to summarize all the key points into one
single template. So that in the future, whenever there is a need to look back at the
basis of the problem, we can take a look at the Problem Statement Template and
understand its key elements of it.
Have a look at Problem Statement Template.
The Stakeholder Who
Have a problem Issue/Problem What
When/While Context/Situation/Location Where

Ideal Solution How the solution will help the Why


stakeholders

99
2. Data Acquisition
The process of collecting accurate and reliable data to work with.

100
Two types of Data Sets
Base Training set Testing set
Use Used for Training the model Used for Testing the model after it
is trained
Size Is allot bigger than testing It is smaller than Training set
data and constitutes about and constitutes about 20% to 30%
70% to 80%
Data Features
o Refer to the type of data you want to collect.
o Eg: Salary amount, increment percentage, increment period, bonus etc.
Big data
o It includes data with sizes that exceed the capacity of traditional software to
process within an acceptable time and value.
o The main focus is on unstructured type of data
Volume
Amount of data produced
Variety
Types of data produced
Big Data
Velocity
Speed of data produced

 Web Scraping
 Web Scraping means collecting data from web using some technologies.
 We use it for monitoring prices, news and etc.
 Example: Web Scrapping using beautiful soup in python.
 Sensors
 Sensors are very important but very simple to understand.
 Sensors are the part of IoT (Internet of things)
 Sensors collect the physical data and detect the changes.
 Cameras
 Camera captures the visual information and then that information which is
called image is used as a source of data.
 Cameras are used to capture raw visual data.
 API
 Application Programming interface.
 API is a messenger which takes requests and tells the system about requests
and gives the response.
 Ex: Twitter API, Google Search API
 Observations
 When we observe something carefully, we get some information
 For ex: Scientists Observe creatures to study them.
 Observations are a time-consuming data source.
 Surveys
 The survey is a method of gathering specific information from a sample of people.
 Example, a census survey for analysing the population
101
3. Data Exploration
In this stage of project cycle, we try to interpret some useful information out of the
data we have acquired. For this purpose, we need to explore the data and try to put
it uniformly for a better understanding. This stage deals with validating or verification
of the collected data and to analyze that:
 The data is according to the specifications decided.
 The data is free from errors.
 The data is meeting our
needs This stage is divided into 2
sub stages.
1) Data Cleaning
2) Data Visualization.

Data Cleaning
Data cleaning helps in getting rid of commonly found errors and mistakes in a data
set. These are the 3 commonly found errors in data.
1) Outliers: Data points existing out of the range.
2) Missing data: Data points missing at certain places.
3) Erroneous data: Incorrect data points.

Outliers
An outlier is a data point in a dataset that is distant

from all other observations.


or
An outlier is something that behaves differently

from the combination/ collection of the data.

Missing Data
What do these NaN values indicate? They
are the missing values in the data set.

We can handle them in two ways:


1. By eliminating the rows of missing values.
(Generally, not recommended as it might reduce

the data set to some extent leading to less data to be


trained)
102
2. By
using an Imputer to find the best
possible substitute to replace missing
values.
Erroneous Data

103
Erroneous data is test data that falls outside of what is acceptable and should be
rejected by the system.
Student Name Class
RIYA GEORGE XA
JOSHUA SAM XA
APARNA BINU XA
SIDHARDH V R XA
NITHILA M 57
ATHULYA M S XA
ANUJA MS XB
KEERTHI
XB
KRISHNANATH

Data Visualization
Why we need to explore data through visualization?
1) We want to quickly get a sense of the trends, relationships, and patterns
contained within the data.
2) It helps us define strategy for which model to use at a later stage.
3) Visual representation is easier to understand and communicate
to others. Example:

104
Data Visualization Techniques
1. Area Graphs
Area Graphs are Line Graphs but with the area below

the line filled in with a certain colour or texture. Like Line


Graphs, Area Graphs are used to display the
development of quantitative values over an interval or time
period. They are most commonly used to show trends,

rather than convey specific values.

2. Bar Charts
The classic Bar Chart uses either horizontal or vertical

bars (column chart) to show discrete, numerical comparisons


across categories. Bars Charts are
distinguished from Histograms, as they
do not display continuous
developments over an interval. Bar Chart's discrete data is
categorical data and therefore answers the question of
"ho
w many?" in each category.

3. Histogram
A Histogram visualizes the distribution of data
over a continuous interval or certain time period.
Each bar in a histogram represents the tabulated
frequency at each interval/bin. Histograms help
give an estimate as to
where values are concentrated, what the extremes are

and whether there are any gaps or unusual values.

4. Line Graphs
Line Graphs are used to display quantitative values

over a continuous interval or time period. A Line Graph is most


frequently used to show trends and analyze how the data

has changed over time. Line Graphs are drawn by first


plotting data points on a Cartesian coordinate grid, then
connecting a line between all of these points. Typically,

105
the y-axis has a quantitative value, while the x-axis is a
timescale or a sequence of intervals. Negative values

can be displayed below the x-axis.

5. Pie Charts
Pie Charts help show proportions and percentages between categories, by dividing a
circle into proportional segments. Each arc length represents a proportion of each
category, while the full

106
circle represents the total sum of all the data, equal to 100%. Pie Charts are ideal for
giving the reader a quick idea of the proportional distribution of the data.

6. Scatterplots
Scatterplots use a collection of points placed
using Cartesian Coordinates to display values
from two
variables. By displaying a variable in each axis, you can detect
if a relationship or correlation between the two variables exists.

7. Flow Charts
This type of diagram is used to show the sequential

steps of a process. Flow Charts map out a process using a


series of connected symbols, which makes the process

easy to understand and aids in its communication to other


people. Flow Charts are useful for explaining how
a complex and/or abstract procedure, system,
concept or algorithm work. Drawing a Flow Chart
can also help in planning and developing a
process or improving an existing one.

107
4. Modelling
It’s the fourth stage of AI project cycle. In previous stage, i.e. graphical representation
makes
the data understandable for humans as we can discover trends and patterns out of it.

108
But when it comes to machines accessing and analyzing data, it needs the data in
the most basic form of numbers (which is binary – 0s and 1s) and when it comes to
discovering patterns and trends in data, the machine goes in for mathematical
representations of the same.
The ability to mathematically describe the relationship between parameters is the
heart of every AI model.
Generally, AI models can be classified as follows:

Rule Based

AI Models
Machine Learning
Learning Based
Deep Learning

Rule Based Approach


In this approach, the rules are defined by the developer. The machine follows the
rules or instructions mentioned by the developer and performs its task accordingly. So, it’s
a static model.
i.e. the machine once trained, does not take into consideration any changes made in
the original training dataset.

dat
Rule based approach answers
a

rule

s
Thus, machine learning gets introduced as an extension to this as in that case,
the machine adapts to change in data and rules and follows the updated path only,
while a rule-based model does what it has been taught once.

Learning Based Approach


It’s a type of AI modelling where the machine learns by itself. Under the
Learning Based approach, the AI model gets trained on the data fed to it and then is
able to design a model which is adaptive to the change in data. That is, if the model
is trained with X type of data and the machine designs the algorithm around it, the
model would modify itself according to the changes which occur in the data so that
all the exceptions are handled in this case.

data answers
Learning based approach109
rules

110
After training, the machine is now fed with testing data. Now, the testing data might
not have similar images as the ones on which the model has been trained. So, the
model adapts to the features on which it has been trained and accordingly predicts
the output.
In this way, the machine learns by itself by adapting to the new data which is
flowing in.
This is the machine learning approach which introduces the dynamicity in the
model. Generally, learning based models can be classified as follows:

Machine Learning Models

Supervised Learning Unsupervised Learning Reinforcement Learning

Dimensionality
Regression Classification Clustering
Reduction

I. Supervised Learning
In a supervised learning model, the dataset which is fed to the machine is
labelled. In other words, we can say that the dataset is known to the person who is
training the machine only then he/she is able to label the data. A label is some
information which can be used as a tag for data. For example, students get grades
according to the marks they secure in examinations. These grades are labels which
categorize the students according to their marks.
There are two main types of supervised learning models:

Regression
Supervised
Learning

Classification

a) Classification
In this model, data is classified according to the labels. For
example, in the grading system, students are classified on the basis
of the
grades they obtain with respect to their marks in the
examination. This model works on discrete dataset which

means the data need not be continuous.

111
b) Regression
This model work on continuous data. For example, if you wish
to predict your next salary, then you would put in the data of your
previous salary, any increments, etc., and would train the model.
Here, the data which has been fed to the machine is
continuous.

II. Unsupervised Learning


An unsupervised learning model works on unlabeled dataset. This means that
the data which is fed to the machine is random and there is a possibility that the
person who is training the model does not have any information regarding it. The
unsupervised learning models are used to identify relationships, patterns and trends
out of the data which is fed into it. It helps the user in understanding what the data
is about and what are the major features identified by the machine in it.
For example, you have a random data of 1000 dog images and you wish to
understand some pattern out of it, you would feed this data into the unsupervised
learning model and would train the machine on it. After training, the machine would
come up with patterns which it was able to identify out of it. The Machine might
come up with patterns which are already known to the user like colour or it might
even come up with something very unusual like the size of the dogs.
There are two main types of unsupervised learning models:

Clustering

Unsupervised Learning
Dimensionality Reduction

a) Clustering
It refers to the unsupervised learning algorithm which can cluster
the unknown data according to the patterns or trends identified out of
it. The patterns observed might be the ones which are known to the
developer or it might even come up with some unique patterns out
of it.
b) Dimensionality Reduction
We humans are able to visualize up to 3-Dimensions

only but according to a lot of theories and algorithms, there are


various entities which exist beyond 3-Dimensions.
For example, in Natural language Processing, the words are
considered to be N-Dimensional entities. Which means that we

cannot visualize them as they exist beyond our visualization ability.


Hence, to make sense out of it, we need to reduce
112
their dimensions. Here, dimensionality reduction algorithm
is used.

113
III. Reinforcement Learning
It a type of machine learning technique that enables an agent(model) to learn in
an interactive environment by trial and error using feedback from its own actions and
experiences. Though both supervised and reinforcement learning use

mapping
between input and output, unlike supervised learning
where feedback provided to the agent(model) is
correct set of actions for performing a
task,
reinforcement learning uses rewards
and punishment as signals
for positive and negative
behavior. Reinforcement learning is all about

making decisions sequentially.

5. Evaluation
Evaluation is a process of understanding the reliability of any AI model, based on
outputs by feeding the test dataset into the model and comparing it with actual
answers. i.e. oonce a model has been made and trained, it needs to go through
proper testing so that one can calculate the efficiency and performance of the model.
Hence, the model is tested with the help of Testing Data (which was separated out of
the acquired dataset at Data Acquisition stage.
The efficiency of the model is calculated on the basis of the parameters mentioned below:

1. Accura
cy
Accuracy
is defined
percentage of correct predictions out of all the observations. as
the

2. Precision
Precision is defined as the percentage of true positive cases versus all the cases
where the prediction is true.

3. Recall
Recall is defined as the fraction of positive cases that are correctly Identified.

114
4. F1 score
The F1 score is a number between 0 and 1 and is the harmonic mean of precision and
recall

115
Questions
1 mark
Questions
1) Which of the following is correct about the rule-based approach?
a. We cannot provide enough rules to the machine.
b. A drawback/feature for this approach is that the learning is static.
c. Once the rules are fed into the system, it takes into consideration
any changes made in the original training dataset.
d. It can improve itself based on the feedbacks.

2) Choose the five stages of AI project cycle in correct order


a. Evaluation -> Problem Scoping -> Data Exploration -> Data Acquisition -
>Modelling
b. Problem Scoping -> Data Exploration -> Data Acquisition -> Evaluation -
>Modelling
c. Data Acquisition -> Problem Scoping -> Data Exploration -> Modelling -
>Evaluation
d. Problem Scoping -> Data Acquisition -> Data Exploration -> Modelling -
>Evaluation

3) A business problem wherein we categorize whether an observation is “Safe,”


“At Risk,” or “Unsafe” is an example of
a. Classification
b. Clustering
c. Regression
d. Dimensionality Reduction

4) Assertion (A): We can use histograms when data is in categories (such as "Pop",
"Rock", ”Jazz”, ”Hip-Hop” etc.)
Reason (R): We use bar charts when we have continuous data (such as a person's
height or weight)
a. (A) is false but (R) is true
b. (A) is true but (R) is false
c. Both (A) and (R) are true
d. Both (A) and (R) are false
5) Choose the correct option
a. Unsupervised learning ->labelled dataset, Regression
b. Supervised learning -> labelled data set, Regression
c. Unsupervised learning ->unlabelled dataset, Classification
d. Supervised learning -> unlabelled data set, Regression

6) Data about the houses such as square footage, number of rooms,


features, whether a house has a garden or not, and the prices of
these houses, i.e., the
corresponding labels are fed into an AI machine. By leveraging data coming from
thousands of houses, their features and prices, we can now train the model to
116
predict a new house’s price. This is an example of
a) Reinforcement learning
b) Supervised learning
c) Unsupervised learning

117
d) None of the above

7) is defined as the percentage of correct predictions out


of all the observations.
a) Predictions
b) Accuracy
c) Reality
d) F1 Score
8) In , the machine is trained with huge amounts
of data which helps it in training itself around the data.
a) Supervised Learning
b) Deep Learning
c) Classification
d) Unsupervised Learning
9) What is the role of modelling in an NLP based AI model?
a) Modelling in NLP helps in processing of AI model
b) Modelling is required to make an AI model
c) In NLP, modelling requires data pre-processing only after which the data
is fed to the machine.
d) Modelling is used in simplification of data acquisition
10) Recall-Evaluation method is
a) defined as the fraction of positive cases that are correctly identified.
b) defined as the percentage of true positive cases versus all the cases where
the prediction is true.
c) defined as the percentage of correct predictions out of all the observations.
d) comparison between the prediction and reality
11) Give 2 examples of Supervised Learning models.
a) Classification and Regression
b) Clustering and Dimensionality Reduction
c) Rule Based and Learning Based
d) Classification and Clustering

12) Define Machine Learning.


a) Machine learning is the study of computer algorithms that improve
automatically through experience.
b) Refers to any technique that enables computers to mimic human intelligence.
118
c) Machine learning refers to computer systems (both machines and
software) enables machines to perform tasks for which it is
programmed.
d) Machine Learning refers to projects that allow the machine to work on a particular
logic.
13) Differentiate between Prediction and Reality.
a) Prediction is the input given to the machine to receive the expected result of the
reality.
b) Prediction is the output given to match the reality.
c) The prediction is the output which is given by the machine and the
reality is the real scenario in which the prediction has been made.
d) Prediction and reality both can be used interchangeably.
14) Which of the following statements is true for the term Evaluation?
a) Helps in classifying the type and genre of a document.
b) It helps in predicting the topic for a corpus.
c) Helps in understanding the reliability of any AI model
d) Process to extract the important information out of a corpus.
15) Which of the following is not part of the AI Project Cycle?
a) Data Exploration
b) Modelling
c) Testing
d) Problem Scoping
16) refers to the AI modelling where the
machine learns by itself.
a) Learning Based
b) Rule Based
c) Machine Learning
d) Data Sciences

17) Define the term Machine Learning. Also give 2 applications of Machine
Learning in our daily lives.

18) Differentiate between Classification and Regression.


19) Which of these is NOT used for visualization in AI?
a) Pie Chart
b) Scatter plot
c) Ruler
d) Bar chart
119
20) Which of the following is an example of rule-based approach?

120
a) Pixel it activity
b) Decision trees
c) Histogram
d) Illustration diagram
21) Match the best choice of graph for the data below.
1. Chart to show the number of students in a school over past 5 years.
2. Chart to show the temperature on each day of the week.
3. Chart to show percentage of each sale of ticket type at a concert

a) 1 -> i) ; 2 -> ii) ; 3 -> iii)


b) 1 -> ii) ; 2 -> iii) ; 3 -> i)
c) 1 -> iii) ; 2 -> i) ; 3 -> ii)
d) 1 -> iii) ; 2 -> ii) ; 3 -> i)

22) Name all the stages of an AI Project cycle.


23) What is Testing Dataset?
24) Mention the types of learning approaches for AI modeling
25) What is the objective of evaluation stage?
26) is not a learning-based approach where AI model gets
trained on the data fed to it and then is able to design a model which is
adaptive to the change in data. [CBSE TERM-1 2021]
a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) Enforcement Learning
27) Unsupervised learning is divided
into the following two categories. Identify the correct one. [CBSE TERM-1
2021]
a) Rule based and learning based
b) Classification and clustering
c) Clustering and dimensionality reduction
d) Classification and regression

121
28) is one of the types supervised learning model, where
data is classified according labels and data need not be continuous.
[CBSE TERM-1 2021]
a) Regression
b) Clustering
c) Classification
d) Dimensionality reduction

29) In design is adaptive to change in data,


which results in dynamicity of a model. [CBSE TERM-1 2021]
a) Learning based approach
b) Rule-based approach
c) Data Acquisition
d) Data modelling
30) Drawbacks of Rule based approach is/are: [CBSE TERM-1 2021]
I. The learning is static
II. Any changes made to the original data will not be considered
III. Once trained the model cannot improvise on the basis of feedback
a) All of the above statements are correct
b) Statements i and ii are correct
c) Statements ii and iii are correct
d) Statements i and iii are correct

31) Evaluation is the process of


understanding the reliability of any AI model, based on outputs by
feeding test dataset into the model and comparing with actual answers.
Therefore, it must be followed by: [CBSE TERM-1 2021]
a) Problem Scoping c) Data Acquisition
b) Data Exploration d) Modelling
32) Classification and regression are , and approach followed is
[CBSE TERM-1 2021]
a) Supervised, Learning c) Unsupervised, Learning
b) Reinforcement, Learning d) Supervised, rule-based
33) refers to the unsupervised learning algorithm which can cluster
the unknown data according to the patterns or trends identified out of it.
[CBSE TERM-1 2021]
a) Regression c) Classification
e) Clustering d) Dimensionality reduction
34) Accuracy, Recall, Precision, F1 Score are the parameters to calculate the efficiency
under
[CBSE TERM-1 2021]
a) Data Acquisition c) Data Evaluation
b) Data Testing d) Data Modelling
35) Assertion(A): The training data should be
authentic and relevant to the problem statement scoped. [CBSE TERM-1
2021]
Reason(R): It increases the AI project efficiency.
122
a) Both A and R are true, and R is the correct explanation of A.
b) Both A and R are true, but R is not the correct explanation of A.
c) A is true but R is false.

123
d) A is false but R is true.
36) Which type of graphical representation suits best for continuous
type of data like monthly exam scores of a student?

2 Mark Questions

37) What are the two different approaches for AI modelling? Define them
38) Draw the graphical representation of Classification AI model. Explain in brief.
39) Draw the graphical representation of Regression AI model. Explain in brief
40) Draw the graphical representation of Clustering AI model. Explain in brief.
41) Explain Data Exploration stage

3 Mark questions
42) Differentiate between rule-based and learning-based AI modelling approaches.
43) Explain the following:
a. Supervised Learning b. Unsupervised Learning
44) Differentiate between classification and clustering algorithms with the
help of suitable examples.

124
NATURAL LANGUAGE PROCESSING

INTRODUCTION
Computers can understand the structured form of data like spreadsheets and
the tables in the database, but human languages, texts, and voices form an
unstructured category of data, and it gets difficult for the computer to
understand it, and there arises the need for Natural Language Processing.

Natural Language Processing, or NLP, is the sub-field of AI that is focused on


enabling computers to understand and process human languages. AI is a
subfield of Linguistics, Computer Science, Information Engineering, and
Artificial Intelligence concerned with the interactions between computers and
human (natural) languages, in particular how to program computers to
process and analyze large amounts of natural language data.
Solving a complex problem in Machine Learning means building a pipeline. In
simple terms, it means breaking a complex problem into a number of small
problems, making models for each of them and then integrating these models.
A similar thing is done in NLP. We can break down the process of
understanding English for a model into a number of small pieces.

A usual interaction between machines and humans using Natural Language


Processing could go as follows:
Humans talk to the computer
The computer captures the
audio
There is an audio to text
conversion Text data is processed
Data is converted to audio
The computer plays the audio file and responds to humans

Applications of Natural Language Processing

1. Chatbots

Chatbots are a form of artificial intelligence that is programmed


to interact with humans in such a way that they sound like
humans themselves. Depending on the complexity of the
chatbots, they can either just respond to specific keywords or
they can even hold full conversations that make it tough to
distinguish them from humans. Chatbots are created using
125
Natural Language Processing and Machine Learning, which means that
they understand the complexities of the English language and find the actual
meaning of the sentence and they also learn from their conversations with
humans and become better with time. Chatbots work in two simple steps.
First, they identify the meaning of the

126
question asked and collect all the data from the user that may be required to
answer the question. Then they answer the question appropriately.

2. Autocomplete in Search Engines

Have you noticed that search engines tend to guess


what you are typing and automatically complete your
sentences? For example, On typing “game” in Google,
you may get further suggestions for “game of
thrones”, “game of life” or if you are interested in maths
then “game theory”. All these suggestions are
provided using autocomplete that uses Natural
Language Processing to guess what you want to ask. Search engines use their
enormous data sets to analyze what their customers are probably typing when
they enter particular words and suggest the most common possibilities. They
use Natural Language Processing to make sense of these words and how they
are interconnected to form different sentences.

3. Voice Assistants

These days voice assistants are all the rage! Whether its Siri, Alexa, or Google
Assistant, almost everyone uses one of these to make
calls, place reminders, schedule meetings, set alarms,
surf the internet, etc. These voice assistants have made
life much easier. But how do they work? They use a
complex combination of speech recognition, natural
language understanding, and natural language
processing to understand what humans are saying and
then act on it. The long term goal of voice assistants is to
become
a bridge between humans and the internet and provide all manner of services
based on just voice interaction. However, they are still a little far from that
goal seeing as Siri still can’t understand what you are saying sometimes!

4. Language Translator

Want to translate a text from English to Hindi but don’t know Hindi? Well,
Google Translate is the tool for you! While it’s not
exactly 100% accurate, it is still a great tool to convert
text from one language to another. Google Translate
and other translation tools as well as use Sequence to
sequence modeling that is a technique in Natural
Language Processing. It allows the algorithm to convert
a sequence of words from one language to another
which is
translation. Earlier, language translators used Statistical machine translation
(SMT) which meant they analyzed millions of documents that were already
translated from one language to another (English to Hindi in this case) and
then looked for the common patterns and basic vocabulary of the language.
However, this method was not that accurate as compared to Sequence to
sequence modeling.

103
5. Sentiment Analysis

Almost all the world is on social media these days! And


companies can use sentiment analysis to understand how a
particular type of user feels about a particular topic,
product, etc. They can use natural
language processing,
computational linguistics, text analysis, etc.
to understand the general
sentiment of the users for their
products and services and find out if the sentiment is

good, bad, or neutral. Companies can use sentiment analysis in a lot of ways
such as to find out the emotions of their target audience, to understand
product reviews, to gauge their brand sentiment, etc. And not just private
companies, even governments use sentiment analysis to find popular opinion
and also catch out any threats to the security of the nation.

6. Grammar Checkers

Grammar and spelling is a very important factor while writing professional


reports for your superiors and even assignments for your
lecturers. After all, having major errors may get you fired or
failed! That’s why grammar and spell checkers are a very
important tool for any professional writer. They can not only
correct grammar and check spellings but also suggest better
synonyms and improve the overall readability of your content.
And guess what, they utilize natural language processing to
provide the best possible piece of writing! The NLP algorithm
is trained on millions of
sentences to understand the correct format. That is why it can suggest the
correct verb tense, a better synonym, or a clearer sentence structure than
what you have written. Some of the most popular grammar checkers that use
NLP include Grammarly, WhiteSmoke, ProWritingAid, etc.

7. Email Classification and Filtering

Emails are still the most important method for professional communication.
However, all of us still get thousands of promotional Emails that we don’t want
to
read. Thankfully, our emails are automatically divided into 3 sections

namely, Primary, Social, and Promotions which means we never have to


open
the Promotional section! But how does this work? Email services
use
natural language processing to identify the contents of each Email with
text classification so that it can be put in the correct section. This
104
method is not perfect since there are still some Promotional newsletters in
Primary, but it’s better than nothing. In more advanced cases, some
companies also use specialty anti-virus software with natural language
processing to scan the Emails and see if there are any patterns and phrases
that may indicate a phishing attempt on the employees.

8. Text Summarization

105
Text summarization is the process of creating a shorter version of the text with
only vital information and thus, helps the user to understand the text in a
shorter amount of time. The main advantage of text summarization lies in the
fact that it reduces user’s time in searching the important details in the
document.
There are two main approaches to summarizing text documents –
1. Extractive Method: It involves selecting phrases and sentences from the
original text and including it in the final summary.
Example:
Original Text: Python is a high-level, interpreted, interactive, and object-oriented
scripting language. Python is a great language for the beginner-level programmers.
Extractive Summary: Python is a high-level scripting language is great language for
beginner-level programmers.
2. Abstractive Method: The Abstractive method involves generating
entirely new phrases and sentences to capture the meaning of source
document.
Example:
Original Text: Python is a high-level, interpreted, interactive, and object-oriented
scripting language. Python is a great language for the beginner-level programmers
Abstractive Summary: Python is interpreted and interactive language and it is easy
to learn.

1. Text Classification
Texts are a form of unstructured information that possesses very
prosperous records inside them. Text Classifiers categorize and
arrange exceptionally a great deal with any form of textual content
that we use currently. Text classification makes it possible to assign
predefined categories to a document and organize it to help you find
the information you need or simplify some activities. For example, an
application of text categorization is spam filtering in email. A very
fundamental key and remarks for commercial enterprise would be how
their merchandise is touching their meant buyers and Text
Classification offers solutions to enterprise questions with the aid of
classifying people’s opinions on the stated brand, price, and aspects.

Questions

1 What do you mean by Natural language processing


2 Name the AI game which uses NLP
3 Write an example of text classification

106
4 Which application of NLP assigns predefined categories to a
document and organize it to help customer to find the
information they
want
5 I used to identify opinions online to help what customers
think about
the products and services. Who am I?

INTRODUCTION TO CHATBOTS
Chatbots is a computer program designed to simulate conversation with human
users, especially over the internet powered by Artificial intelligence.

Eg:
Mitsuku Bot

https://www.pandorabots.com/mitsuku/

AskDISHA 2.0 (Digital Interaction To Seek Help


Anytime) is an Artificial Intelligence and Machine
learning based Chatbot, that answers queries
pertaining to various services offered by IRCTC and
even help users perform various transactions like
end to end ticket booking, and more.
• CleverBot*

https://www.cleverbot.com/

• Jabberwacky*

http://www.jabberwacky.com/
`

• Haptik*

https://haptik.ai/contact-us

107
• Rose*

http://ec2-54-215-197-164.us-west-
1.compute.amazonaws.com/speech.php

• Ochatbot*

https://www.ometrics.com/blog/list-of-fun-chatbots/

108
Types of Chatbots
1. Simple Chatbot (Script bots)
2. Smart Chatbots (AI based Smart bots)

Script Bot Smart Bot


1. Script bots are easy to make 1. Smart bots are flexible and
2. Script bots work around a script powerful
that is programmed in them ie. 2. Smart bots work on bigger
Rule based chatbot databases and other resources
3. Mostly they are free and are directly.
easy to integrate into a 3. Smart bots learn with more data
messaging platform 4. Coding is required to take this
4. No or little language processing up on board. Works on AI
skills algorithms
5. Task based rules 5. Context based AI
6. Limited functionality 6. Wide functionality
7. Example: the bots which are 7. Example: Google Assistant,
deployed in the customer care Alexa, Cortana, Siri, etc.
section of various companies

HUMAN LANGUAGE VS COMPUTER LANGUAGE

Human Language Computer Language

1. Our brain keeps on processing the 1. Computers understand the


sounds that it hears around itself and language of numbers.
tries to make sense of them all the Everything that is sent to the
time. machine has to be converted
to numbers.
 Example: In the classroom, as the
teacher delivers the session, our  Binary code is a system by
brain is continuously processing which numbers, letters and
everything and storing it someplace. other information are
Also, while this is happening, when represented using only two
your friend whispers something, the symbols, or binary digits. The
focus of your brain automatically binary definition to a
shifts from the teacher’s speech to computer is a 1s and 0s code
your friend’s conversation. arranged in ways that the
 So now, the brain is processing both computer can read,
the sounds but is prioritizing the one understand, and act upon
on which our interest lies.

2. The sound reaches the brain through 2. While typing, if a single


a long channel. As a person speaks, mistake is made, the
the sound computer throws an
109
travels from his mouth and goes to error and does not process
the that
listener’s eardrum. The sound part. The communications
striking the eardrum is converted into made by the machines are
neuron impulses, gets transported to very basic and simple.
the brain, and then gets processed.

3. After processing the signal, the brain 3. Now, if we want the machine
gains an understanding of its to understand our language,
meaning of it. If it is clear, the signal how should this happen?
gets stored. Otherwise, the listener What are the possible
asks for clarity from the speaker. difficulties a machine would
This is how human languages are face in processing natural
processed by humans. language? Let us take a look
at some of them here:

 There are rules in human language. There are nouns, verbs, adverbs, and
adjectives. A word can be a noun at one time and an adjective some other time.
There are rules to provide structure to a language.
 Besides the matter of arrangement, there’s also meaning behind the language we
use. Human communication is complex. There are multiple characteristics of the
human language that might be easy for a human to understand but extremely
difficult for a computer to understand.

Let’s understand Semantics and Syntax with some examples:

1. Different syntax, same semantics: 2+3 = 3+2


o Here the way these statements are written is different, but their
meanings are the same that is 5.
2. Different semantics, same syntax: 2/3 (Python 2.7) ≠ 2/3 (Python 3)
o Here the statements written have the same syntax but their meanings
are different. In Python 2.7, this statement would result in 1 while in
Python 3, it would give an output of 1.5.

Multiple Meanings of a word


To understand let us have an example of the following three sentences:

1. His face turned red after he found out that he had taken the wrong bag
o What does this mean? Is he feeling ashamed because he took another
person’s bag instead of his? Is he feeling angry because he did not
manage to steal the bag that he has been targeting?
2. The red car zoomed past his nose
o Probably talking about the colour of the car, that travelled close to him in a
flash.
3. His face turns red after consuming the medicine
o Is he having an allergic reaction? Or is he not able to bear the taste of that
medicine?
110
Perfect Syntax, no Meaning

111
Sometimes, a statement can have a perfectly correct syntax but it does not mean
anything.
For example
Chickens feed extravagantly while the moon drinks tea.

Sample Questions
1. Which of these chatbots is/are not AI based 1
a) Script bot b) Smart bot c) Hybrid bot d) None of these

2 Give one example of Script bot 1

3 Give 4 examples for Smart Bot 2

4 Distinguish between the Smartbot and Script bot 4

Answers
1 A) Script bot

2 AskDISHA 2.0

3 Google Assistant, Alexa, Cortana,


Siri,
4 Answer in the notes.

Activity
1. List some statements with syntax and same semantics and vice-versa.
2. Enact the Smartbot in the class. Incorporate the communication skills.

Text processing/Data processing, Bag of words, TFIDF, NLTK


Computers can’t yet truly understand English in the way that humans do. With AI and
NLP, they are learning it fast and already doing a lot. Computers with the help of NLP
techniques try to reach to the meaning of the sentences and take action or respond
accordingly.
Since we all know that the language of computers is Numerical, the very first step
that comes to our mind is to convert our language to numbers. This conversion takes
a few steps to happen. The first step to it is Text Normalisation. Since human
languages are complex, we need to first of all simplify them in order to make sure
that the understanding becomes possible. Text Normalisation helps in cleaning up
112
the textual data in such a way that it comes down to a level where its complexity is
lower than the actual data.

Let us go through Text Normalisation in detail.

113
Text Normalisation

Text Normalisation is a process to reduce the variations in text’s word forms to a


common form
when the variation means the same thing.

Text normalisation simplifies the text for further

processing Text Normalisation

Raw Text from User Text Normalization Process Output

He visited Goa

he visited goa Normalize Text he visited goa

HE VISITED GOA

hE vISItED GoA

In Text Normalisation, we undergo several steps to normalise the text to a lower


level. Before we begin, we need to understand that in this section, we will be
working on a collection of written text. That is, we will be working on text from
multiple documents and the term used for the whole textual data from all the
documents altogether is known as corpus. Not only would we go through all the
steps of Text Normalisation, we would also work them out on a corpus. Let us take a
look at the steps:

1. Sentence Segmentation
Under sentence segmentation, the whole text is divided into individual
sentences. Eg

Hello world.
Hello world. AI is fun to know. It has started impacting our lives in many ways. Many m
AI is fun to know.
It has started impacting our lives in many ways.
Many more revolutionary

will soon
technologies evolve out of it.
114
2.Tokenisation
After segmenting the sentences, each sentence is then further divided into tokens.
Tokens is a term used for any word or number or special character occurring in a
sentence. Under tokenisation, every word, number and special character is
considered separately and each of them is now a separate token.

3. Removing Stop words, Special characters and Numbers


In this step, the tokens which are not necessary are removed from the token list.
What can be the possible words which we might not require?
Stop words are the words in any language which do not add much meaning to a
sentence. They can safely be ignored without sacrificing the meaning of the
sentence
Humans use grammar to make their sentences meaningful for the other person to
understand. But grammatical words do not add any essence to the information which
is to be transmitted through the statement hence they come under stop words. Some
examples of stop words are:

These words occur the most in any given sentence but talk very little or nothing
about the context or the meaning of it. Hence, to make it easier for the computer to
focus on meaningful terms, these words are removed.
Along with these words, the sentence might have special characters and/or numbers.
Now it depends on the type of sentence in the documents that we are working on
115
whether we should keep them in it or not. For example, if you are working on a
document containing email IDs, then you

116
might not want to remove the special characters and numbers whereas in some
other textual data if these characters do not make sense, then you can remove them
along with the stop words.

4. Converting text to a common case


After the stop words removal, we convert the whole text into a similar case,
preferably lower case. This ensures that the case-sensitivity of the machine does not
consider same words as different just because of different cases.

Here in this example, the all the 6 forms of hello would be converted to lower case and hence
would be treated as the same word by the machine.

5.Stemming
In this step, the remaining words are reduced to their root words. In other words,
stemming is the process in which the affixes of words are removed and the words
are converted to their base form.

Note that in stemming, the stemmed words (words which are we get after removing
the affixes) might not be meaningful. Here in this example as you can see: healed,
healing and healer all were reduced to heal but studies was reduced to studi after
117
the affix removal which is not a meaningful word. Stemming does not take into
account if the stemmed word is meaningful or not. It just removes the affixes hence
it is faster.

118
6. Lemmatization
Stemming and lemmatization both are alternative processes to each other as the
role of both the processes is same – removal of affixes. But the difference between
both of them is that in lemmatization, the word we get after affix removal (also
known as lemma) is a meaningful one. Lemmatization makes sure that lemma is a
word with meaning and hence it takes a longer time to execute than stemming.

As you can see in the same example, the output for studies after affix removal has
become study instead of studi.

Difference between stemming and lemmatization can be summarized by this example:

With this we have normalised our text to tokens which are the simplest form of
words. Now it is time to convert the tokens into numbers. For this, we would use the
Bag of Words algorithm

Bag of words (BOW)


Bag of Words is a Natural Language Processing model which helps in extracting
features out of the text which can be helpful in machine learning algorithms. In bag
of words, we get the occurrences of each word and construct the vocabulary for the
corpus.
119
This image gives us a brief overview about how bag of words works. Let us assume
that the text on the left in this image is the normalised corpus which we have got
after going through all the steps of text processing. Now, as we put this text into the
bag of words algorithm, the algorithm returns to us the unique words out of the
corpus and their occurrences in it. As you can see at the right, it shows us a list of
words appearing in the corpus and the numbers corresponding to it shows how many
times the word has occurred in the text body. Thus, we can say that the bag of
words gives us two things:
1. A vocabulary of words for the corpus

2. The frequency of these words (number of times it has occurred in the whole corpus).

Here calling this algorithm “bag” of words symbolises that the sequence of
sentences or tokens does not matter in this case as all we need are the unique words
and their frequency in it.
Here is the step-by-step approach to implement bag of words algorithm:

1. Text Normalisation: Collect data and pre-process it


2. Create Dictionary: Make a list of all the unique words occurring in the corpus.
(Vocabulary)
3. Create document vectors: For each document in the corpus, find out how many
times the word from the unique list of words has occurred.
4. Create document vectors for all the documents. Let us go through all the
steps with an example:
Step 1: Collecting data and pre-processing
it. Document 1: Aman and Anil are stressed
Document 2: Aman went to a therapist
Document 3: Anil went to download a health chatbot
Here are three documents having one sentence each. After text normalisation, the text
120
becomes: Document 1: [aman, and, anil, are, stressed]
Document 2: [aman, went, to, a, therapist]

121
Document 3: [anil, went, to, download, a, health, chatbot]
Note that no tokens have been removed in the stopwords removal step. It is
because we have very little data and since the frequency of all the words is almost
the same, no word can be said to have lesser value than the other.
Step 2: Create Dictionary
Go through all the steps and create a dictionary i.e., list down all the words which
occur in all three documents:
Dictionary:

Note that even though some words are repeated in different documents, they
are all written just once as while creating the dictionary, we create the list of unique
words.

Step 3: Create document vector


In this step, the vocabulary is written in the top row. Now, for each word in the
document, if it matches with the vocabulary, put a 1 under it. If the same word
appears again, increment the previous value by 1. And if the word does not occur in
that document, put a 0 under it.

Since in the first document, we have words: aman, and, anil, are, stressed. So, all
these words get a value of 1 and rest of the words get a 0 value.
Step 4: Repeat for all documents
Same exercise has to be done for all the documents. Hence, the table becomes:

122
In this table, the header row contains the vocabulary of the corpus and three rows
correspond to three different documents. Take a look at this table and analyse the
positioning of 0s and 1s in it.
Finally, this gives us the document vector table for our corpus. But the tokens have
still not converted to numbers. This leads us to the final steps of our algorithm:
TFIDF.

TFIDF: Term Frequency & Inverse Document Frequency


Bag of words algorithm gives us the frequency of words in each document we have
in our corpus. It gives us an idea that if the word is occurring more in a document, its
value is more for that document. For example, if I have a document on air pollution,
air and pollution would be the words which occur many times in it. And these words
are valuable too as they give us some context around the document. But let us
suppose we have 10 documents and all of them talk about different issues. One is on
women empowerment, the other is on unemployment and so on. Do you think air
and pollution would still be one of the most occurring words in the whole corpus? If
not, then which words do you think would have the highest frequency in all of them?
And, this, is, the, etc. are the words which occur the most in almost all the
documents. But these words do not talk about the corpus at all. Though they are
important for humans as they make the statements understandable to us, for the
machine they are a complete waste as they do not provide us with any information
regarding the corpus. Hence, these are termed as stopwords and are mostly
removed at the pre-processing stage only.

123
Take a look at this graph. It is a plot of occurrence of words versus their value.
As you can see, if the words have highest occurrence in all the documents of the
corpus, they are said to have negligible value hence they are termed as stop words.
These words are mostly removed at the pre-processing stage only. Now as we move
ahead from the stop words, the occurrence level drops drastically and the words
which have adequate occurrence in the corpus are said to have some amount of
value and are termed as frequent words. These words mostly talk about the
document’s subject and their occurrence is adequate in the corpus. Then as the
occurrence of words drops further, the value of such words rises. These words are
termed as rare or valuable words. These words occur the least but add the most
value to the corpus. Hence, when we look at the text, we take frequent and rare
words into consideration.
TFIDF stands for Term Frequency and Inverse Document

Frequency. TFIDF helps un in identifying the value for each

word.

Term Frequency
Term frequency is the frequency of a word in one document. Term frequency can
easily be found from the document vector table as in that table we mention the
frequency of each word of the vocabulary in each document.

124
Here, you can see that the frequency of each word for each document has been
recorded in the table. These numbers are nothing but the Term Frequencies!

Inverse Document Frequency


Now, let us look at the other half of TFIDF which is Inverse Document Frequency. For
this, let us first understand what does document frequency mean. Document
Frequency is the number of documents in which the word occurs irrespective of how
many times it has occurred in those documents. The document frequency for the
exemplar vocabulary would be:

Here, you can see that the document frequency of ‘aman’, ‘anil’, ‘went’, ‘to’ and ‘a’
is 2 as they have occurred in two documents. Rest of them occurred in just one
document hence the document frequency for them is one.
Talking about inverse document frequency, we need to put the document frequency
in the denominator while the total number of documents is the numerator. Here, the
total number of documents are 3, hence inverse document frequency becomes:

Finally, the formula of TFIDF for any word W becomes:


TFIDF(W) = TF(W) * log( IDF(W) )
Here, log is to the base of 10. Don’t worry! You don’t need to calculate the log values by
yourself.
Simply use the log function in the calculator and find out!
Now, let’s multiply the IDF values to the TF values. Note that the TF values are for
each document while the IDF values are for the whole corpus. Hence, we need to
multiply the IDF values to each row of the document vector table.

125
Here, you can see that the IDF values for Aman in each row is the same and similar
pattern is followed for all the words of the vocabulary. After calculating all the
values, we get:

126
Finally, the words have been converted to numbers. These numbers are the
values of each for each document. Here, you can see that since we have less amount
of data, words like ‘are’ and ‘and’ also have a high value. But as the IDF value
increases, the value of that word decreases. That is, for example:
Total Number of documents: 10
Number of documents in which ‘and’ occurs: 10
Therefore, IDF(and) = 10/10 = 1
Which means: log (1) = 0. Hence, the value of ‘and’ becomes 0.
On the other hand, number of documents in which ‘pollution’ occurs: 3
IDF(pollution) = 10/3 = 3.3333…
Which means: log (3.3333) = 0.522; which shows that the word ‘pollution’ has
considerable value
in the corpus.
Summarising the concept, we can say that:

1. Words that occur in all the documents with high term frequencies have the
least values and are considered to be the stop words.
2. For a word to have high TFIDF value, the word needs to have a high term
frequency but less document frequency which shows that the word is
important for one document but is not a common word for all documents.
3. These values help the computer understand which words are to be considered
while processing the natural language. The higher the value, the more
important the word is for a given corpus.
4.

Applications of TF-IDF
1. Document Classification: TF-IDF helps in classifying the type and genre of
a document by looking at the frequencies of words in the text. Based on
the TF-IDF values, it is easy to classify emails as spam or ham, to classify
news as real or fake and so on.
2. Topic Modelling: It helps in predicting the topic for the corpus. Topic
modelling refers to a method of identifying short and informative
descriptions of a document in a large collection that can further be used
for various text mining tasks such a summarisation, document
classification etc.
127
3. Key word Extraction: It is also useful for extracting keywords from text.
4. Information Retrieval System: To extract the important information out of a
corpus.

128
5. Stop word Filtering: It helps in removing unnecessary words out of a text body.
NLTK is a leading platform for building Python programs to work with human
language data. It provides easy-to-use interfaces to over 50 corpora and lexical
resources such as WordNet, along with a suite of text processing libraries for
classification, tokenization, stemming, tagging, parsing, and semantic reasoning,
wrappers for industrial-strength NLP libraries, and an active discussion forum.
NLTK is suitable for linguists, engineers, students, educators, researchers, and
industry users alike. NLTK is available for Windows, Mac OS X, and Linux. Best of all,
NLTK is a free, open source, community-driven project.
NLTK has been called “a wonderful tool for teaching, and working in, computational
linguistics using Python,” and “an amazing library to play with natural language.”
Natural Language Processing with Python provides a practical introduction to
programming for language processing. Written by the creators of NLTK, it guides the
reader through the fundamentals of writing Python programs, working with corpora,
categorizing text, analyzing linguistic structure, and more.

Installing NLTK

NLTK requires Python versions 3.7, 3.8, 3.9 or 3.10

Setting up a Python Environment (Mac/Unix/Windows)

Mac/Unix

1. Install NLTK: run pip install --user -U nltk


2. Install Numpy (optional): run pip install --user -U numpy
3. Test installation: run python then type import nltk
For older versions of Python it might be necessary to install setuptools
(see https://pypi.python.org/pypi/setuptools) and to install pip ( sudo easy_install pip ).

Windows

These instructions assume that you do not already have Python installed on your machine.

32-bit binary installation


1. Install Python 3.8: https://www.python.org/downloads/ (avoid the 64-bit versions)
2. Install Numpy (optional): https://www.scipy.org/scipylib/download.html
3. Install NLTK: https://pypi.python.org/pypi/nltk
4. Test installation: Start>Python38, then type import nltk

Installing NLTK Data

129
After installing the NLTK package, please do install the necessary datasets/models for specific
functions to work.
If you’re unsure of which datasets/models you’ll need, you can install the “popular” subset of
NLTK data, on the command line type python -m nltk.downloader popular, or in the Python
interpreter import nltk; nltk.download('popular')
For details, see https://www.nltk.org/data.html

*********************************************************************************************
*******

ACTIVITY - Text Processing, BoW

Normalize the given text


i) Sentence Segmentation
ii) Tokenisation
Raj and Vijay are best friends. They play together with other friends. Raj likes to
play football but Vijay prefers to play online games. Raj wants to be a footballer.
Vijay wants to become an online gamer.

Normalization of the given text: Sentence Segmentation:


1. Raj and Vijay are best friends.
2. They play together with other friends.
3. Raj likes to play football but Vijay prefers to play online games.
4. Raj wants to be a footballer.
5. Vijay wants to become an online gamer.
Tokenization:

Raj and Vijay are best friends .

Th play togeth with other friends .


e er
y
Raj likes to play footb but Vijay prefe t pl onli gam
al l rs o a n es
y e
Raj want to be a football .
s er
Vijay want to beco an online gam .
s m er
e

II) Implement the bag of words Algorithm-Activity


130
Activity-1 Through a step-by-step process, calculate TFIDF for the given corpus

131
Document 1: Divya and Rani both are stressed

Document 2: Rani wents to a therapist

Document 3: Divya went to download a health chatbot

The above example consists of three documents having one sentence


each. After text normalization, the text would be:

Document 1: [Divya, and, Rani, both, are, stressed]

Document 2: [Rani, went, to, a, therapist]

Document 3:[ Divya, went, to, download, a, health, chatbot]

Note that no tokens have been removed in the stopwords removal step.It
is because we have very little data and since the frequency of all the
words is almost the same, no word can be said to have lesser value than
the other.

Step 2 Create a Dictionary


To create a dictionary write all words which occurred in the three documents.

Dictionary:

In this step, the repeated words are written just once and we create a list of

unique words. Step 3 Create a document vector

TFIDF (Term Frequency and Inverse Document Frequency)


There are two terms in TFIDF, namely Term Frequency and Inverse Document Frequency.
132
Term Frequency

Inverse Document Frequency

IDF for each word

 The formula is

TFIDF(W) = TF(W) * log( IDF(W) )

 The IDF values for each word is as follows:

133
Total Number of documents: 10

Number of documents in which ‘and’ occurs: 10

Therefore, IDF(and) = 10/10 =

1 Which means: log(1) = 0.

Hence, the value of ‘and’ becomes 0.

On the other hand, suppose a number of documents in which ‘Artificial’ occurs:


3 IDF(Artificial) = 10/3 = 3.3333…

This means log(3.3333) = 0.522; which shows that the word ‘pollution’ has
considerable
value in the corpus

***************************************************************************************
*****

Activity-2) Through a step-by-step process, calculate TFIDF for the given

corpus Document 1: Johny Johny, Yes Papa,

Document 2: Eating sugar? No Papa

Document 3: Telling lies? No Papa

Document 4: Open your mouth, Ha!

Ha! Ha!

1. Create document vectors for the given documents (Term Frequency Table)\

134
2. Record the occurrence of the word in the document using term
frequency table (Document Frequency Table)

3. Draw the inverse document frequency table wherein, we need to put the
document frequency in the denominator while the total number of documents
is the numerator. Here, the total number of documents are 4, hence inverse
document frequency becomes:

4. The formula of TFIDF for any word W becomes: TFIDF(W) = TF(W) * log (IDF(W))

135
MCQ (Answers are bolded)

1. …………………………is a process to reduce the variations in text’s word forms


to a
common form when the variations mean the same thing
a) Text Normalisation b) Sentence segmentation
c) Tokenisation d) Stemming and Lemmatisation

2. …………………………………...is the process of dividing the whole text into


smaller components, i.e., individual sentences

a) Text normalisation b) Sentence segmentation c) Tokenisation d)


Stemming and Lemmatisation
3....................are well –defined semantic units inside a sentence and contributes to
overall
meaning of the sentence.
a) Syntax b) Semantics c) Tokens d) Stop words
4. A token may representall of these
a) Word b) phrase c) number d) symbol e) All of these

5. …………………………is the process of splitting up of individual sentences into


smaller units called token (a word, a phrase, a number or a symbol)
a) Text normalisation b) Sentence segmentation c) Tokenisation
d) Stemming and Lemmatisation

6. ……………………………… are the words in any language which do not add


136
much meaning to a sentence. They can safely be ignored without sacrificing
the meaning of the sentence.

137
a) Syntax b) Semantics c) Tokens d) Stop words

7. The process of extracting the root form of the word is known as


……………………………

a) Tokenisation b) Stemming c) Lemmatisation d) Segmentation

8. The words extracted through stemming are called …………………...


a) tokens b) lemmas c) stems d) All of these

9. A.....................................is the part of the word to which the inflectional


(changing/deriving)
affixes are added such as (-ed, -ize, -s, -de, mis etc.)
a) Token b) lemma c) stem d) all of these

10..............................Is the process of converting a word to its actual root form as


per
the language.
a) Tokenisation b) Stemming c) Lemmatisation d) Segmentation
11. The words extracted through lemmatisation are called ………………………...
a) tokens b) lemmas c) stems d) all of these
12. A …………………………. Is the base form of all its inflectional forms,
whereas a stem isn’t
a) Token b) lemma c) stem d) all of these
13.Regular dictionaries contain ……………………...
a) Token b) lemmas c) stem d) affixes
14........................................A is a model used for extracting features from
text for use in AI based modelling.
a) bag of words b) Text Normalisation
c) Sentence segmentation d) None of these

15. …………………… is a statistical measure that evaluates how relevant a


word is to a document in a collection of documents .
a) TF b) IDF c) TF -IDF d) All of these

VERY SHORT ANSWER QUESTIONS(1 Mark)

138
1. What is text normalisation?

139
Text normalisation is the process to reduce the variations in text’s word forms to a
common
form when the variations mean the same thing.
2. What is a corpus?
The whole collection of words from all the documents being processed is called
corpus.
3. What is tokenisation?
Tokenisation is the process of splitting up individual sentences into smaller
units called token.
4. What are stop words?
Stop words are words in any language which do not add much
meaning to a sentence.
5. What do you mean by stemming?
The process of extracting the root form of the word by removing
affixes is known as stemming.
6. What is lemmatisation?
It is the process of converting a word to its actual root form linguistically.
7. What is case normalisation?
Case normalisation refers to conversion of all the words in the
same case. (often lower case)
8. What is Bag – of-words?
Bag – of-words is a model used for extracting features from text for use

in modelling, with many AI algorithms.


9. What is TF-IDF?
TF-IDF is a statistical measure that evaluates how relevant a
word is to a document in a collection of documents.
10 What does TF-IDF refer to?
TF-IDF refers Term Frequency-Inverse Document Frequency
11.What is TF?
TF (Term Frequency) ia the frequency of a word in the document
12. What is IDF?
IDF (Inverse Document Frequency) refers to how common a rare word is in the
entire document set
13. What will be the output of the word “studies” if we do the following?
a) Lemmatization b)
Stemming Ans: a) study b) studi

14. How many tokens are there in the sentence given below?
Traffic Jams have become a common part of our lives nowadays. Living in an
urban area means you have to face traffic each and every time you get out
on the road. Mostly, school students opt for buses to go to school.

140
Ans: 46 tokens

141
15. Identify the stop words in the given sentence:
Pollution is the introduction of contaminants into the natural environment that
cause adverse change. The three types of pollution are air pollution, water
pollution and land pollution.

Ans: is, the, of, that, into, are, and

16. What is NLTK?


NLTK or Natural Language Toolkit is a python package that you can use for NLP.

Short Answer Questions (2 Marks)


1. What is a token?
A token is a well- defined semantic unit inside a sentence and contributes to
overall meaning of the sentence. A token may represent a word, a phrase, a
number or a symbol.

2. What is the difference between stems and lemmas?

Stem is the root word generated by stemming process and the lemma is the root
word generated by lemmatisation process.

Stemming and Lemmatisation both generate the foundation sort of the inflected
words, but the difference between a stem and a lemma is that a stem may not
be an actual word in the dictionary, whereas, a lemma is an actual language
word.

3. What are some applications of TF-IDF?


TF-IDF is commonly used for processing huge datasets of documents, usually by
search- engines.

Some common applications of TF-IDF are: Document Classification, Topic


Modelling, Keyword extraction, Information Retrieval System, Stop-word
filtering.

Long Answer questions (3 Marks)


1. What is Stemming?
Stemming is the process of removing a part of a word, or reducing to its stem or
root, e.g., in stemming, the word “studies” gets reduced to its stem ’studi’
with ‘ed’ removed; similarly, the word ‘advisable’ gets reduced to its stem
‘advis’.
142
A Stem is the root of the word to which an affix is added to make this word. Stem
may or may not be equal to a word in dictionary.

143
2. What is lemmatisation?

Lemmatisation is very similar to stemming, where the goal is to remove


inflections from the word and map a word to its root form. But unlike
stemming, lemmatisation tries to do it the proper way. It doesn’t just chop
things off, it actually transforms words to the actual root, a real word in
dictionary. The reduced forms resulting out of lemmatisation are called
lemmas.

For example, in lemmatisation the word “studied” get reduced to its lemma
‘study’ similarly, the word ‘advisable’ gets reduced to its lemma ‘advise’.

3. What is bag of words? What does it do?


A Bag-of-Words (BoW) model is a way of extracting features from text for use in
modelling, with many AI algorithms. bag-of-words is a representation of text
that describes the occurrence of words within a document.
A Bag-of-words contain two things
i) A vocabulary of known words
ii) A measure of presence of known words
It is called a Bag -of-words because it contains just the collections of words
without any information about the order or structure of words in the
document. It only tells that the known words occur in the document, not
their positioning in the document.

4. What is NLTK?
NLTK is a Python Package that you can use for NLP.It is a platform used for
building Python programs that work with human language data for applying in
statistical natural language processing (NLP). It contains text processing
libraries for tokenisation, parsing, classification, stemming, tagging and
semantic reasoning.
Very Long Answer Questions (4 marks)
1. What is text normalisation? What is its use in NLP?
Text normalisation is the process of transforming a text into a canonical (standard)
form, e.g.
the word “gooood” and “gud” can be transformed to “good” , its canonical form .
After text normalisation, only the real, contributing words are left in the text,
which is useful in NLP in two ways:
(i) The dataset size is now reduced with unimportant words removed and
thus less processing is required.
(ii) It is easier to gauge the intent from the remaining words.

2. Write the steps of Text normalisation?

144
Explain. The steps of Text normalisation
are:
1. Sentence Segmentation: It is the process of dividing the whole text
into smaller components, i.e., individual sentences
2. Tokenisation is the process of splitting up individual sentences into smaller
units called token.

145
3. Removing punctuation and stop words: In this step, the unnecessary tokens
are removed from the token list.
4. Stemming: In this step the remaining words are reduced to their root words
5. Converting text to a common case: Here the whole text is converted into a
similar case, preferably lower case.
6. Lemmatisation: It is the process of converting a word to its actual root form
linguistically.

3. Explain from the given graph, how the value and occurrence of a word are
related in a corpus?

As shown in the graph, occurrence and value of a word are inversely proportional.
The words which occur most (like stop words) have negligible value. As the
occurrence of the words drops, the value of such words rises. These words are
termed as rare or valuable words. These words occur the least but add the most
value to the corpus.

4. Write the steps to implement bag of words algorithm.


1. Text Normalisation: Collect data and pre-process it by removing the known stop
words.
2. Design the vocabulary. Prepare the corpus (a collection of words) from the
words in the document. The whole collection of textual data from all the
documents is called corpus.
3. Create Document vectors. Score the word’s frequency in the document.
4. Calculate TF-IDF. Calculate Term Frequency and Inverse Document Frequency.

5. What are some applications of TF-IDF?


Document Classification: TF-IDF helps in classifying the type and genre of a
document by looking at the frequencies of words in the text. Based on the TF-IDF
values, it is easy to classify emails as spam or ham, to classify news as real or fake
and so on.
Topic Modelling: It helps in predicting the topic for the corpus. Topic modelling
refers to a method of identifying short and informative descriptions of a document
in a large collection that can further be used for various text mining tasks such a
summarisation, document classification etc.
Key word Extraction: It is also useful for extracting keywords from text.
Information Retrieval System: To extract the important information out
146
of a corpus. Stop word Filtering: It helps in removing unnecessary words
out of a text body.

147
EVALUATION
Activity: 1
Imagine that you have come up with an AI-based prediction model which has been
deployed on the roads to check traffic jams. Now, the objective of the model is to
predict whether there will be a traffic jam or not. Now, to understand the efficiency
of this model, we need to check if the predictions which it makes are correct or not.
Thus, there exist two conditions which we need to ponder upon: Prediction and
Reality.
Traffic Jams have become a common part of our lives nowadays. Living in an urban
area means you have to face traffic each and every time you get out on the road.
Mostly, school students opt for buses to go to school. Many times, the bus gets late
due to such jams and the students are not able to reach their school on time.
Considering all the possible situations make a Confusion Matrix for the above situation.
Ans:
Case 1: Is there a traffic Jam?
Prediction: Yes Reality: Yes True Positive

Case 2: Is there a traffic Jam?


Prediction: No Reality: No True
Negative

Case 3: Is there a traffic Jam?


Prediction: Yes Reality: No False Positive

Case 4: Is there a traffic Jam?


Prediction: No Reality: Yes False Negative.

The Reality

confusio Yes No
n Matrix
True Positive False Positive
Yes
Predic TP FP
ti on False Negative True Negative
No
FN TN
Activity: 2
Shweta is learning NLP. She read about the F1 score but did not understand the
need for the F1 score formulation. Support her by giving an answer.

Ans.:
148
The F1 score is also known as the F score or F measure of AI model’s test accuracy. It is
calculated from the precision and recall of the test. Here

149
1) The precision is the number of correctly recognized positive results divided by
the number of all positive results, including those not identified correctly.

2) The recall is the number of correctly identified positive results divided by the
number of all samples that should have been identified as positive.

3) The F1 score is defined as the harmonic mean of the test’s precision and recall.
The formula of F1 score is as below:

(𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 𝑋 𝑅𝑒𝑐𝑎𝑙𝑙)
(𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑅𝑒𝑐𝑎𝑙𝑙)
F1 Score =2X

From this formula,

i) A good F1 score means that you have high true positives and high true
negatives. It means that the machine is correctly identifying real threats and not
disturbs the users by false alarms.

ii) An F1 score is considered perfect when it’s 1 while the model is a total failure when it’s
0.

iii)F1 score is a better metric to evaluate the model on real-life classification


problems and when imbalanced class distribution exists.

Activity: 3
Calculate accuracy, precision, recall, and F1 score for the following Confusion Matrix.
Suggest which metric would not be a good evaluation parameter and why?

The Realit
Reality:
Confusio y: 1
0
n Matrix
50 30
Prediction:
1 TP FP
15 25
Ans: Prediction: 0
FN TN

a) Accuracy: It is defined as the percentage of correct predictions out of all the observations.
(𝑇𝑃+𝑇𝑁)
(𝑇𝑃+𝐹𝑁+𝑇𝑁+𝐹𝑃)
Accuracy= x100%

𝑥100%=
(50+25)
(50+15+25+3 80 x100%= 0.67
0)
120
150
b) Precision: It is defined as the percentage of true positive cases versus all the
cases where the prediction is true.

151
= 0.625
𝑇𝑃
50
(𝐹𝑃+𝑇𝑃) 50
Precision =
80
=
=(30+50
)

c) Recall: It is defined as the fraction of positive cases that are correctly identified.
𝑇𝑃
(𝐹𝑁+𝑇𝑃) =50 = 0.769
Recall =
50
=(15+50 65
)

d) F1 Score: It is identified as the measure of balance between precision


and recall. (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 𝑋 𝑅𝑒𝑐𝑎𝑙𝑙)
F1(𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑅𝑒𝑐𝑎𝑙𝑙)
Score =2X

(0.625𝑋 0.769) 0.96125


2X (0.625+0.769) 1.394
=2X = 0.7

Accuracy = 0.67 Precision = 0.625


Recall = 0.769 F1 Score = 0.7
By this results, recall is not good evaluation metric it needs to improve more. Two
conditions are very risk here:

1) False Positive: Suppose if we see the above confusion matrix for the heart attack
cases then a person is predicted with heart attack but does not have heart attack
in reality.

2) False Negative: A person is predicted with no heart attack but in reality person
is suffering from the heart attack.
Hence False negative miss the actual patients. So recall needs more improvement.

Activity: 4
In schools, a lot of times it happens that there is no water to drink. At a few places,
cases of water shortage in schools are very common and prominent. Hence, an AI
model is designed to predict if there is going to be a water shortage in the school in
the near future or not. The confusion matrix for the same is:

The
Confusion Reality: Reality: 0
1
Matrix
22 12
Prediction:
1 TP FP
47 118
Prediction: 0
FN TN

Find out Accuracy, Precision, Recall and F1 Score for the given problems.
Ans:.
152
Calculation:
(𝑇𝑃+𝑇𝑁)
1.
(𝑇𝑃+𝐹𝑁+𝑇𝑁+𝐹𝑃)
Accuracy= x100%

153
𝑥100%=
(22+118) 140
(22+47+118+1 199
x100%= 0.703
2)

𝑇𝑃
(𝐹𝑃+𝑇𝑃) 22
2. Precision =
=(12+22 = 0.647
)

𝑇𝑃
(𝐹𝑁+𝑇𝑃) 22
3. Recall =
=(47+22 = 0.318
)

4. (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 𝑋 𝑅𝑒𝑐𝑎𝑙𝑙)
(𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑅𝑒𝑐𝑎𝑙𝑙)
F1 Score =2X

(0.647𝑋 0.318) 0.205746


2X (0.647+0.318) 0.965
=2X = 2X0.213=0.426

Accuracy = 0.703
Precision = 0.647
Recall = 0.318
F1 Score =
0.426

154
ADVANCE PYTHON
Jupyter Notebook

The Jupyter Notebook is an incredibly powerful tool for interactively developing and
presenting AI related projects. The Jupyter project is the successor to the earlier
IPython and it is an interactive way of running python code in the terminal using the
REPL model. (Read Eval Print Loop)

Jupyter Notebook is an open-source, web-based interactive environment, which


allows you to create and share documents that contain live code, mathematical
equations, graphics, maps, plots, visualizations, and narrative text. It integrates with
many programming languages like Python, PHP, R, C#, etc.

Advantages of Jupyter Notebook


1. All in one place: As you know, Jupyter Notebook is an open-source web-based
interactive environment that combines code, text, images, videos,
mathematical equations, plots, maps, graphical user interface and widgets to a
single document.
2. Easy to convert: Jupyter Notebook allows users to convert the notebooks into
other formats such as HTML and PDF. It also uses online tools and nbviewer
which allows you to render a publicly available notebook in the browser
directly.
3. Easy to share: Jupyter Notebooks are saved in the structured text files (JSON
format), which makes them easily shareable.
4. Language independent: Jupyter Notebook is platform-independent because it is
represented as JSON (JavaScript Object Notation) format, which is a language-
independent, text-based file format. Another reason is that the notebook can
be processed by any programing language, and can be converted to any file
formats such as Markdown, HTML, PDF, and others.
5. Interactive code: Jupyter notebook uses ipywidgets packages, which provide
many common user interfaces for exploring code and data interactivity.

Installing Jupyter Note Book


1. Installation using Anaconda
The easiest way to install and start using Jupyter Notebook is through Anaconda.
Anaconda is the most widely used Python distribution for data science and comes
pre-loaded with all the most popular libraries and tools. With Anaconda, comes the
Anaconda Navigator through which we can scroll around all the applications which
come along with it. Jupyter notebook can easily be accessed using the Anaconda

155
Prompt with the help of a local host

2. Installation using pip:


Jupyter note book can be installed also using the following code in command prompt

156
>python-m pip install jupyter

Kernels in Jupyter Notebook

A kernel provides programming language support in Jupyter. IPython is the default


kernel for Jupyter Notebook. Therefore, whenever we need to work with Jupyter
Notebook in a virtual environment, we first need to install a kernel inside the
environment in which the Jupyter notebook will run.

Virtual environment

A virtual environment is a tool that helps to keep dependencies required by different


projects separated, by creating isolated Python virtual environments for them. This is
one of the most important tools that most of the Python developers use.

Imagine a scenario where we are working on two Python-based projects and one of
them works on Python 2.7 and the other uses Python 3.7. In such situations virtual
environment can be really useful to maintain dependencies of both the projects as
the virtual environments will make sure that these dependencies are not conflicting
with each other and no impact reaches the base environment at any point in time.
Thus, different projects developed in the system might have another environment to
keep their dependencies isolated from each other.

Creating virtual environments is an easy task with Anaconda distribution. Steps to create
one are:

1. Open Anaconda prompt.

2. As we open the Anaconda prompt, we can see that in the beginning of the
prompt message, the term (base) is written. This is the default environment in
which the anaconda works. Now, we can create our own virtual environment
and use it so that the base does not get affected by anything that is done in
the virtual environment.

157
3. Let us now create a virtual environment named env. To create the environment,
write conda create -n env python=3.7

4. After some processing, the prompt will ask if we wish to proceed with installation
or not. Type y on it and press enter. Once we press enter, the packages will start
getting installed in the environment.

5. Depending upon the internet speed, the downloading of packages might take
varied time. The processing screen will look like this:

6. Once all the packages are downloaded and installed, we will get a message like this

7. This shows that our environment called env has been successfully created. Once
an environment has been successfully created, we can access it by writing the
following:

Conda active env

158
This would activate the virtual environment and we can see the term written in
brackets has changed from (base) to (env).Now our virtual environment is ready to
be used.

But, to open and work with jupyter notebooks in this environment, we need to install
the packages which help in working with jupyter notebook. These packages get
installed by default in the base environment when anaconda gets installed.

To install Jupyter Notebook dependencies, we need to activate our virtual


environment env and write

Conda insatll ipykernal nb_cond jupyter

It will again ask if we wish to proceed with the installation, type Y to begin the
installation. Once the installations are complete, we can start working jupyter
notebooks in this environment.

Introduction to Python

Python is a programming language which was created by Guido Van Rossum . It can
be used to follow both procedural approach and object-oriented approach of
programming. Python has a lot of functionalities which makes it so popular to use.

Why Python for AI?


Artificial intelligence is the trending technology of the future. We can see so many
applications around us. If we as individuals would also like to develop an AI
application, we will need to know a programming language. There are various
programming languages like Lisp, Prolog, C++, Java and Python, which can be used
for developing applications of AI. Out of these, Python gains a maximum popularity
because of the following reasons:

159
Applications of Python
There exist a wide variety of applications when it comes to Python. Some of the
applications are:

160
PYTHON BASICS

Comments

Comments are the statements which are incorporated in the code to give a better
understanding of code statements to the user.

There are two types of comments in python.

1. Single Line
2. Multi Line

Single Line comment

A single-line comment is used to add some explanatory text in the program for better
understanding of the next line. A # sign is used to write a single line comment in the
python program
For example,
# statement to add two
numbers res = 6 + 7
#Print the result
print(res)

Multiline comments

The multiline comments are written in python using triple quotes. You can write
number lines starting with triple quotes and end with triple quotes.
For example,
'''Write a python program to display the difference between two numbers, the first
number should be larger than second number'''
n1=5
n2=2
res=n1 - n2
print(res)

Keywords (Reserved Words)

Keywords are the reserved words or pre-defined words with a special meaning to the
machine by default. So the user cannot use them anywhere else or it cannot be
changed or modified in the entire program. They are always case-sensitive.
141
Identifiers

Identifiers are names used in programs to identify small units of programs such
as variables, objects, classes, functions etc.
Identifiers defined by the following few rules as follows:

1. It can be a combination of numbers and letters


2. It must start alphabets or underscore
3. Special characters are not allowed in identifiers name except underscore
4. Spaces are not allowed in identifier names, underscore can be used to separate two
words
5. Upper Case and Lower Case letters are treated

differently Examples:

MyData, roll_no, year1 etc…

142
Variables
A variable is a named location used to store data in the memory. It is helpful to think
of variables as a container that holds data which can be changed later throughout
programming.
For example,
a=10
b=20

These declarations make sure that the program reserves memory for two variables
with the names a and b. The variable names stand for the memory location.

Note:

Assignment operator is used in Python to assign values to variables. For example, a = 5 is a


simple assignment operator that assigns the value 5 on the right to the variable a on the
left.

Datatypes

In program, you have a choice to use any type of data such as real numbers,
numbers with decimals, numbers without decimals, text, etc. These type of data is
defined by datatype in Python. The python interprets the type of the variable
according to the value stored in the variable. Follow the below-given link to know
more about data types.

143
Python Input and Output
We use the print() function to output data to the standard output device (screen). We
can also output data to a file.
An example is given
below. a = "Hello
World!" print(a)
The output of the above code will be: Hello World!

Example Code Output

a = 20 30
b = 10
print(a + b)

print(15 + 35) 50

print("My name is Alan") My name is Alan

name=”Alan” My name is Alan


print("My name is “,name)
n=5 I have 5 Apples !
print("I have",n,"Apples !")

144
input() function

The input() function is used to accept values from the user at runtime. This function
accepts and returns the text data by default. Therefore, you need to specify the data
type if you want to use numbers or any other datatype. This process is known as
typecasting

Str = input(<String>) # Python expects the input to be of string datatype

Number = int(input(<string>)) # Input string gets converted to an integer value

before assignment Value = float(input(<String>)) # Input string gets converted to a

decimal value before assignment.

Python Operators
Operators are special symbols which represent computation. They are applied on
operand(s), which can be values or variables. Same operators can behave differently
on different data types. Operators when applied on operands form an expression.
Operators are categorized as Arithmetic, Relational, Logical and Assignment
operators. Values and variables when used with operators are known as
operands.

145
Conditional Statements

While coding in Python, sometimes we need to take decisions. For example, if a


person needs to create a calculator with the help of a Python code, he/she needs to
take in 2 numbers from the user and then ask the user about which function he/she
wishes to operate. Now, according to the user’s choice, the selection of function
would change. In this case, we need the machine to understand what should happen
when. This is where conditional statements help.

Conditional statements help the machine in taking a decision according to the

146
condition which gets fulfilled. There exist different types of conditional statements in
Python.

147
Some of them are:

Simple if Statement

If you have only one condition to be execute or one possibility of output, simple if
statement is useful for the same. Simple it executes the True condition block.
Suppose, If gate is open you are allowed to go inside!

Let’s see the syntax:

if <condition>:
statement(s)
Example:
gate_status =
"open"
if gate_status=="open":
print("Entry is permitted")

if else statement
148
If else statement evaluates the test expression and will execute body of if only if the
condition is true . If the condition is false body of else will be executed .The blocks
are separated using proper indentation.
if <condition>:
statement(s)
else:
statement(s)

Observe the following code:


gate_status = "open"
if gate_status=="open":
print("Entry is permitted")
else:
print("You have to go back to your home, Bye - Bye")

if- elif- else ladder

Python if-elif-else ladder is used in the case when you have more than two choices or
possibilities. The elif is a short form of else if. The ladder means it will continue upto
n possiblities.

The syntax for python ef-elif-else ladder is as following:

if <condition1>:
statement(s)
elif <condition2>:

149
statement(s)
elif <condition3>:

150
statement(s)
....
....
....
else:
statement(s)

Example :

if num > 0:
print("Positive
number") elif num == 0:
print("Zero")
else:
print("Negative number")

Python loops

151
Loops are a collection of statements executed repeatedly until the condition
evaluates to false. It is also known as iteration or iterative statements. It can be also
considered as step by step execution of python statements until the condition
evaluates to false.

Types of Loop

Python support two kinds of loops.

1. While: A while loop is used when you have different repetitive statements with
a single condition. When the condition gets false, your loop will terminate itself.
While loop may have else block too quite often.
2. For: The easy and popular loop is for a loop. It is very easy to write and
understand because all the parts of loops are written in the same line in for
loop. It will reduce the lines of codes as three parts of loops are written in a
single line.

while loop

The while syntax is as follows:


while <condition>:
statement(s)
update_statement

152
Observe this code which displays a series of numbers from 1 to 10.

153
i=1
while i<=10:
print(i
) i=i
+1
print("End of loop")

For Loop

The for loop is used to execute the sequence of statements executed in a series. It is
the most popular loop among python developers. It is also work in a similar way as
while loop is working. Observe the syntax of for loop:

for <variable> in
<sequence>: body
loop

So here variable is a variable from and then you can take a sequence to execute the
statements. The in operator is used to take check the value in the specified
sequence.

For the sequence, you can use the range function.

The range() function takes three basic parameters. The first is a start, the second is a
stop and the third is a step.
range(start,stop,ste
p) for i in
range(1,10,1):
print(i)
In the above code, the range function is used. Hence, the loop starts with 1, stops
with 9 and taking one step in every execution. The output will be 1 to 9 numbers
only.

PYTHON PRACTICALS :

CLASS X LIST OF PRACTICALS 2022-23


SNO SIMPLE PROGRAMS

154
1 Display the message “Welcome to Python "
2 Print your School Address
3 Sum of 2 numbers
4 Sum and Average of 3 numbers
5 Area and perimeter of a circle
6 Square and Cube of a Number
7 Area and perimeter of a Rectangle
8 Calculate Percentage after inputting 5 marks
9 Area of a triangle
10 Arithmetic Operations (+,-,*,?)
11 Calculate Simple Interest
CONDITIONAL STATEMENTS
12 Check whether a given number is even or odd using if else
13 Largest among two numbers using if else
42 Print day name in words using if elif else ladder
Print the grade of a student based on percentage using if elif else
15 ladder after inputting marks in 5 subjects
16 Print a single digit in words using if elif else ladder
17 Design a four function calculator using if elif else ladder
18 Electricity Bill Calculation using if else if ladder
LOOPING STATEMENTS
19 Print natural numbers upto N
20 Print sum of natural numbers upto N
21 Printing even no.s upto a limit
23 To check whether a number is Armstrong or not
24 To find the reverse of a number
25 Print Fibonacci series up to N
26 Find the Factorial of a number
27 Print Multiplication Table
28 Find the Sum and Average of even and odd numbers from a set of N
numbers
29 Find the Largest among N numbers

Print the pattern


*
**
30
***

155
DATA SCIENCES
Python for Data science
Every AI project requires a programming-based model which is trained to produce
outcomes. Data Sciences also are heavily dependent on programming language that
is capable of processing large amounts of data while applying data science functions.
Python is one such language and is mostly used I data science projects.

Numpy
Numpy, which stands for Numerical Python,
Python library that provides functionality to do the following:
 Create a multidimensional array object (called ndarray or Numpy array).
 Providing tools for working with
ndarrays, Numpy Arrays
An array in general refers to named group of homogeneous elements
A Numpy array is simply a grid that contains values of the
same/homogeneous type. import numpy as np
list =[1, 2,3,4]
A1=np.array(list)
print(a1)
Although Numpy Arrays look similar to python Lists.
Difference between Numpy Array and Python Lists
Lists Numpy Arrays
Python lists can store any type of Numpy Arrays can store only
data and mixed type of data in homogeneous data in them
them.
Lists are part of core Python so no Numpy arrays require Numpy
library is needed to create them. library to be imported first of all
that is following statement must be
first written in the program before
using Ndarrays
Import Numpy as np
Lists size can easily be changed Numpy arrays cannot be
resized directly.
Mathematical functions cannot be Ndarray support vector operations
applied directly to lists. and hence mathematical and
statistical can be directly applied
to Ndarray elements.
156
Lists consume more memory than Ndarrays are faster than lists.
Ndarray.
Adding new elements to a list does Adding new elements to an Ndarray
not create a new lists. internally creates anew Ndarray and
old ndarray is deleted

PANDAS
Pandas or Python pandas are python’s library for data analysis. Pandas have derived
its name from “Panel data system” which is an econometrics term for multi -
dimensional, structured data sets.
Pandas is a software library written for the python programming language for data
manipulation and analysis, and are a popular choice for data science.
The Pandas library has two primary data structure, Series (1-dimensional) and Data
frame (2- dimensional), that can handle the vast majority of typical use cases in
finance, statistics, social science, and many areas of engineering.
import pandas as
pd Example:
import pandas as pd

mydataset = {
'cars': ["BMW", "Volvo",
"Ford"], 'passings': [3, 7, 2]
}

myvar =

pd.DataFrame(mydataset)

print(myvar)

MATPLOTLIB
Matplotlib is a Python library used for Data Visualization. Data Visualization is an
essential component of data sciences.
import matplotlib as mp1
You can create bar-plots, scatter-plots, histograms and a lot more visualizations with
Matplotlib.
Data Visualization
Data Visualization basically refers to the graphical or visual representation of
157
information and data using visual elements like charts, graphs, and maps etc.
For data visualization in python, the Matplotlib library’s Pyplot interface is used.

158
Pyplot is a collection of methods within matplotlib library which allows user’s to
construct 2D plots easily and interactively.
1. Line Chart
A line chart or line graph is a type of chart which displays information as a series of
data
points called ‘markers’
A line chart is created using plot() function.
2. Bar Chart
A bar chart or bar graph is a chart or graph that presents categorical data with
rectangular bars with heights or lengths proportional to the values that they
represent.
With Pyplot, a bar chart is created using bar() and barh() functions.
3. Scatter Plot
The scatter plot is similar to a line chary, the major difference is that while line
graph connects the data points with a line, scatter chart simply plots the data
points to show the trend in the data.
With Pyplot, a scatter chart is created using scatter () function.
4. Pie Chart
A pie chart is a circular statistical graphic, which is divided into slices to illustrate
numerical proportion.
With Pyplot, a pie chart is created using pie () function.
5. Histogram Plot
A histogram is atype of graph that provides a visual interpretation of
numerical data by indicating the number of data points that lie within a
range of values.
With Pyplot, a histogram is created using hist () function.
6. BoxPlot Chart
A Box Plot is the visual representation of the statistical five number summary of a
given data set.
With Pyplot, a boxplot is created using boxplot () function.

STATISTICAL LEARNING
Data processing mainly aims at transforming data into a form most suited for an
application. There are many statistical techniques used for data processing some
basic and commonly used statistical techniques useful for different types of
measures.
MEASURES OF CENTRAL TENDENCY
A measure of central tendency is a single value that attempts to describe a set of
data by identifying the central position within that set of data. The most common
measures of central tendency are mean, median, and mode.
159
1. Mean
The measure of central location.

160
statistics.mean()

2. Median
Another measure of central location that, unlike the mean is not affected by
extremely large or extremely small data values.
statistics.median()

3. Mode
The data entry that occurs with the greatest frequency.
statistics.mode()
Measures of Variability
Measures of variability refer to the scatter or spread of scores around their central
tendency. The measures of variability indicate how the distribution scatters above
and below the central tendency. The most common measures of variability are
range, variance, and standard deviation.

Range
The Range is the difference between the lowest and highest values of a given set of
values. Range=(Max.data entry)-(Min.data entry)

Variance
The variance is the average of the squared differences from the mean.
statistics.variance()

Standard Deviation
Standard Deviation is a statistic used to describe the spread of data about the mean,
which is found by calculating the positive square root of the variance.
statistics.stdev()

Basic Statistics with python


You can use these functions as
numpy<function>(<ndarray>)
or
np.<function>(<ndarray>)

161
Example:
import numpy
speed = [99,86,87,88,111,86,103,87,94,78,77,85,86]
x = numpy.mean(speed)
print(x)
output
89.76923076923077

K-NEAREST NEIGHBOR MODEL


INTRODUCTION

KNN is a simple, supervised machine learning (ML) algorithm that can be used for
classification or regression tasks - and is also frequently used in missing value
imputation. It is based on the idea that the observations closest to a given data
point are the most "similar" observations in a data set, and we can therefore classify
unforeseen points based on the values of the closest existing points. By choosing K,
the user can select the number of nearby observations to use in the algorithm.

KNN (K-Nearest Neighbour)

KNN is a supervised Learning algorithm that classifies a new data point into the
target class, counting on the features of its neighbouring data points.

KNN modelling works around four parameters:

 Features: The variables based on which similarity between two points is calculated.

 Distance function: Distance metric to be used for computing similarity between


points.

 Neighbourhood(K): Number of Neighbours to search for

 Scoring function: The function which finds the majority score and class for the query
point.

Significance of K, The number-of-neighbors/neighborhood-value

• With much lower values of K, our predictions become less stable.


• With increase in the neighbourhood value of K, the predictions become more
stable due to clear indication of majority and thus the model is more likely to
make more accurate predictions.
• With very high value of K, the concept of neighbourhood is defeated and
increasing number of errors start occurring. This is the stage when
underfitting starts happening.
• KNN algorithms follow some methods and techniques to ensure the optimal
value of K so that the results are stable and accuracy prone.
162
Applications of KNN Models

163
• For Recommender system
• For Looking for similar documents
• For Text categorisation
• For Detecting frauds
• In Health and Medicine
• For Estimating soil Water parameter

Practicals
1.

import numpy as np

arr = np.array([1, 2, 3, 4,

5]) print(arr)

2.

import numpy as

np arr =

np.array(42)

print(arr)
3.

import pandas as pd

mydataset = {
'cars': ["BMW", "Volvo", "Ford"],
'passings': [3, 7, 2]
}

myvar =

pd.DataFrame(mydataset)

print(myvar)
4.

import pandas as

pd a = [1, 7, 2]

myvar = pd.Series(a)

print(myvar
) 5.
164
import pandas as pd

data = {

165
"calories": [420, 380, 390],
"duration": [50, 40, 45]
}

myvar = pd.DataFrame(data)

print(myvar)
6.

import statistics
print(statistics.mean([1, 3, 5, 7, 9, 11, 13]))
print(statistics.mean([1, 3, 5, 7, 9, 11]))
print(statistics.mean([-11, 5.5, -3.4, 7.1, -9, 22]))

7.
import statistics
print(statistics.median([1, 3, 5, 7, 9, 11, 13]))
print(statistics.median([1, 3, 5, 7, 9, 11]))
print(statistics.median([-11, 5.5, -3.4, 7.1, -9, 22]))

8.
import statistics
print(statistics.mode([1, 3, 3, 3, 5, 7, 7 9, 11]))
print(statistics.mode([1, 1, 3, -5, 7, -9, 11]))
print(statistics.mode(['red', 'green', 'blue', 'red']))
9.
import statistics
print(statistics.stdev([1, 3, 5, 7,
9, 11]))
print(statistics.stdev([2, 2.5, 1.25, 3.1, 1.75, 2.8]))
print(statistics.stdev([-11, 5.5, -3.4, 7.1]))
print(statistics.stdev([1, 30, 50, 100]))
10.
import statistics
print(statistics.variance([1, 3, 5, 7,
9, 11]))
print(statistics.variance([2, 2.5, 1.25, 3.1, 1.75, 2.8]))
print(statistics.variance([-11, 5.5, -3.4, 7.1]))
print(statistics.variance([1, 30, 50, 100]))
11.
import matplotlib.pyplot as
plt import numpy as np
xpoints = np.array([1, 2, 6, 8])
ypoints = np.array([3, 8, 1,
10]) plt.plot(xpoints,
ypoints) plt.show()

166
QUESTIONS
I. One mark question:
1. A python package which stands for ‘Numerical Python’ is named and used as
in Python programs.
2. is another name for Numpy arrays.
3. Series is a data structure belonging to python’s library.
4. The is the mathematical average of a set of data value.
5. KNN refers to .

II. Two mark questions:


1. What is the significance of K’s value in KNN model?
2. What are Numpy arrays?
3. Name the basic data structure of NumPy.
4. What is Median?
5. What is Outlier?

III. Three marks questions:


1. How are NumPy arrays similar or different from Python lists?
2. What is data visualisation?
3. What is Matplotlib library mainly used for?

IV. Four marks question


1. What is the difference between Python lists and Numpy Arrays?
2. Explain the applications of KNN Models.

167
COMPUTER VISION

Introduction to Computer vision


Computer Vision is a subset of artificial intelligence that makes computers, machines
and devices visually enabled by giving them capability to analyse and understand
the image captured by camera. The concept of computer vision was first introduced
in the 1970s.

Applications of Computer vision


Facial Recognition: A facial recognition system is a computer vision-based
technology that identifies or verifies or matches a digital image of human face
against a database of stored images. Facial recognition is performed in three
steps.
a) Face detection
b) Face capture
c) Face match
This can be used in either guest recognition or log maintenance of the visitors. It also
finds its application in schools for an attendance system based on facial recognition of
students.
Face Filters: The modern-day apps like Instagram and snapchat have a lot of features
based on the usage of computer vision. The application of face filters is one among
them. Through the camera the machine or the algorithm is able to identify the facial
dynamics of the person and applies the facial filter selected.
Image search on search engines: Image search where you paste an image in the
search engine’s query box and it returns the most similar images in a fraction of a
second. This type of search is called reverse image search. This uses Computer
Vision as it compares different features of the input image to the database of images
and gives us the search result while at the same time analysing various features of
the image.
Computer Vision in Retail: The retail field has been one of the fastest growing field
and at the same time is using Computer Vision for making the user experience more
fruitful. Retailers can use Computer Vision techniques to
 Track customers’ movements through stores, analyse navigational routes and
detect
walking patterns.
 Manage inventory: Through security camera image analysis, a Computer Vision
algorithm can generate a very accurate estimate of the items available in the
store.
 Analyse the use of shelf space to identify suboptimal configurations and
suggest better item placement.
Self-driving cars: Computer Vision is the fundamental technology behind developing
autonomous vehicles. AI is used for developing on-road versions of hands-free
technology. This involves the process of identifying the objects, getting navigational
routes and also at the same time environment monitoring.
Medical Imaging: It is widely used in medical imaging in the form of many applications
168
such as
 Skin cancer detection
 Surgery simulations
 Diagnosis Aid
 Pneumonia detection

169
Agriculture: Drones mounted with computer vision technology are being used for
crop monitoring. Computer vision systems can monitor animals such as cattle, sheep,
pigs or other with cameras
Google Translate App: By using optical character recognition to see the image and
augmented reality to overlay an accurate translation, Google translate app is a
convenient tool that uses Computer Vision to read signs in a foreign language and to
translate it to your preferred language.

Questions
Fill in the blanks
1. Emoji Scavenger Hunt game is based on technology.
2. A is a computer vision-based technology that identifies or verifies or
matches a digital image of a human face against a database of stored face
image.
3. refers to a search where the search query is formed using a pasted
image and the search engine looks for matching or similar images from around
the web.
4. Google reverse image search facility is officially known as
5. technology makes computers, machines and devices analyse and
understand the images captured by camera.
Short Answer Questions
1. What is computer vision?
2. What are some applications of computer vision?
3. What is reverse image search?
Answers
1. CV
2. Facial recognition
3. Reverse Image Search
4. Google Search by Image
5. CV
Computer vision concepts
Digital Images used with C
1. Pixel: - A pixel represents the smallest piece of the screen that can be
controlled individually in terms of colour and intensity.

170
2. Pixel Colour and Intensity: - Combination of three different colour signals- Red,
Green, Blue
(RGB) ◦ White - (255,255,255) ◦ Black - (0,0,0)

171
3. Resolution: - It refers to the quality and size of an image in terms of the number of
pixels it
contains, typically as ‘width x height’. ◦ Eg:- 100 * 100 pixel image has a total of 10000 pixels.
4. Colour Depth / Pixel Value: - The amount of information that is stored about a
pixel determines its colour depth (pixel value), which controls how precisely
the pixel’s colour can be specified.

5. Grayscale Images:- It is an image in which the only colours are shades of gray

6. RGB Images (Coloured Images): - It is a coloured image that is formed by the


three-colour information stored for each pixel of a digital image

172
Image Features:
An image feature is a measurable piece of data in image which is unique to this
specific object, such as a distinct colour, specific shape or an image segment

Questions & Answers


Answer the following questions (1 mark)
1. A.............represents the smallest piece of the screen that can be controlled
individually in
terms of colour and intensity.
173
Ans: Pixel

174
2. Image...........refers to the quality and size of an image in terms of the number of
pixels it
contains, typically as ‘width x height’.
Ans: Resolution
3. RGB value..............represents black colour.
Ans: (0,0,0)
4. RGB value..................represents white colour.
Ans: (255,255,255)
5. An....................is a measurable piece of data in your image which is unique to this
specific
object, such as a distinct colour, specific shape or an image segment.
Ans: Image feature

Answer the following questions (2 mark)


6. What is the difference between grayscale and RGB images?
Ans: A grayscale image is an image in which the only colours are shades of
gray. An RGB image is a coloured image that is formed by the three-colour
information (red, green, blue) stored for each pixel of a digital image.

Answer the following questions(3 mark)


7. What do you understand by image features? How are these useful in computer
vision? Ans: An image feature is a measurable piece of data in an image which
is unique to this specific object, such as a distinct colour, specific shape or an
image segment.
Using image features, the CV algorithms identify and create classes of
objects. Using these classes, various CV tasks take place.

Introduction to OpenCV, Image processing

OpenCV
OpenCV or Open-Source Computer Vision Library is that tool which helps a
computer extract these features from the images. It is used for all kinds of images
and video processing and analysis. It is capable of processing images and videos
to identify objects, faces, or even handwriting.
To install OpenCV library, open anaconda prompt and then write the following
command:
pip install opencv-python

175
In order to work with OpenCV in Python programs or scripts, import the module first.
import cv2 # import OpenCV
from matplotlib import pyplot as plt # import matplotlib

176
import numpy as np # import numpy
We import numpy as we want to store the pixel values in the numpy array We
import matplotlib to allow us to display our images on the Jupyter notebook itself

Programs using OpenCV


1. Write a program to load an image
img = cv2.imread('Images/man.jpg')#Load the image into memory
plt.imshow(img)
plt.title('BlueMan')
plt.axis('on')
plt.show()

2. Write a program to load an image in RGB


img = cv2.imread('Images/man.jpg') #Load the image file into memory
plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('off')
plt.show()

3. Write a program to read an image as a grayscale image


# the number zero opens the image as a grayscale image
img = cv2.imread('Images/man.jpg',0)
#cmap specifies color mapping, gray in this case.
plt.imshow(img, cmap = 'gray', interpolation = 'bicubic')
plt.title('man')
plt.axis('off')
plt.show()

4. Write a program to display the axis to find the region of interest(ROI)

img = cv2.imread('Images/man.jpg')
plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('on')
plt.show()

5. Write a program to crop the image


# Exctract a square that focuses on the man's face
# Remember, your current image size is 3967 x 2977

177
roi = img[1500:2500,1000:2000] #img[range of y, range of x]
plt.imshow(cv2.cvtColor(roi, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('off')
plt.show()

6. Write a program to resize the image maintaining aspect ratio


# fixed resizing and distort aspect ratio so let's resize the
width # to be 300px but compute the new height based on the aspect
ratio # Current image size is 3967 x 2977

img = cv2.imread('Images/man.jpg') resized=cv2.resize(img,


(int(img.shape[1]/10),int(img.shape[0]/10)))
plt.imshow(cv2.cvtColor(resized, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('off')
plt.show()
print(resized.shape)
cv2.imwrite('rem_man.jpg',resized)#save the image

CONVOLUTION OPERATOR AND CNN

Introduction to Convolutional Neural Network


1. A convolutional neural network (CNN) is a type of artificial neural network
used in image recognition and processing that is specifically designed to process
pixel data.
2. The term “convolutional” refers to a mathematical function that is created by
integrating two different functions. It usually involves multiplying various
elements to combine them into a coherent whole.
3. Convolution describes how the shape of one function is influenced by another
function.
4. Pooling refers to the down-sampling of the data by bringing the overall
dimensions of the image.
5. The image size can be reduced with the help of Feature Map.
6. The processing at the hidden layer is carried out as Sum of weighted
inputs+ activation function+ hidden rules.
7. In convolution operation, the kernel is a matrix of values who decides the
transformation effect of the image.
8. In the convolution layer pixel by pixel scanning of the image takes place.

CNN’s Basic Architecture


 A CNN architecture consists of two key components:
178
 A convolution tool that separates and identifies the distinct features of an
image for analysis in a process known as Feature Extraction
 A fully connected layer that takes the output of the convolution process and
predicts
the image’s class based on the features retrieved earlier.
 The CNN is made up of three types of layers: convolutional layers,
pooling layers, and fully-connected (FC) layers.

Layers in Convolutional Neural Network


A convolution neural network has multiple hidden layers that help in extracting
information from an image. The four important layers in CNN are:
1. Convolutional layer
2. ReLU layer
3. Pooling layer
4. Fully connected layer

Convolutional Layer
The convolutional layer is where the action begins. The convolutional layer is
designed to discover image features.
Convolutional Layer is the backbone of CNN working model. In this layer, pixel by
pixel scanning takes place of the images and then it creates a feature map to define
future classification
As per its name, this layer uses convolution operation on the images with the help of
several kernels to produce several features such as edges, colour, gradient
orientation, etc. This way collected outputs (features) are gathered in the form of
Feature Map or the Activation Map.

There’s several uses we derive from the feature map:


179
•We reduce the image size so that it can be processed more efficiently.
•We only focus on the features of the image that can help us in processing the image
further.

180
Rectified Linear Unit layer (aka ReLu)
This layer is considered as an extension of a convolutional layer. The goal of
ReLu is to increase the image’s non-linearity. It is the technique of removing
excess fat from a picture in order to improve feature extraction.

Pooling layer
The pooling layer is used to minimize the number of input parameters, i.e. it
focuses on the most important aspects of the information obtained.

Connected layer
It is a standard feed-forward neural network. It’s the last straight line before the finish
line,
where everything is already visible. It’s only a matter of time until the results are
confirmed.

Rectified Linear Unit Layer(ReLU)


The next layer in the Convolution Neural Network is the Rectified Linear Unit function
or the ReLU layer. After we get the feature map, it is then passed onto the ReLU
layer. This layer simply gets rid of all the negative numbers in the feature map and
lets the positive number stay as it is.
The process of passing it to the ReLU layer introduces non – linearity in the feature
map. Let us see it through a graph.

we see
the
two
graphs
side
by
side,
the
one on

the left
is a
linear
graph.
This
grap
h
when passed through the ReLU layer, gives the
one on the right. The ReLU graph starts with a horizontal straight line and then
increases linearly as it reaches a positive number.
181
Now the question arises, why do we pass the feature map to the ReLU layer? it is to
make the colour change more obvious and more abrupt

As

shown in the above convolved image, there is a smooth grey gradient change from
black to white. After applying the ReLU function, we can see a more abrupt change in
colour which makes the edges more obvious which acts as a better feature for the
further layers in a CNN as it enhances the activation layer

Pooling Layer
The Pooling layer is responsible for reducing the spatial size of the Convolved
Feature while still retaining the important features.
There are two types of pooling which can be performed on an image.
1) Max Pooling: Max Pooling returns the maximum value from the portion of the
image covered by the Kernel.
2) Average Pooling: Average Pooling returns the average value from the portion of
the image covered by the Kernel.

The pooling layer is an important layer in the CNN as it performs a series of tasks
which are as follows :
1) Makes the image smaller and more manageable

182
2) Makes the image more resistant to small transformations, distortions and
translations in the input image.

Fully Connected Layer


The final layer in the CNN is the Fully Connected Layer (FCP). The objective of a fully
connected layer is to take the results of the convolution/pooling process and use
them to classify the image into a label (in a simple classification example).
The output of convolution/pooling is flattened into a single vector of values, each
representing a probability that a certain feature belongs to a label. For example, if
the image is of a cat, features representing things like whiskers or fur should have
high probabilities for the label “ca

183
Testing CNN
Now let us see how this comes into practice. To see that, go to the link
http://scs.ryerson.ca/~aharley/vis/conv/flat.html
This is an online application of classifying different numbers. We need to analyse the
different layers in the application on the basis of the CNN

What is a kernel?
In Convolutional neural network, the kernel is nothing but a filter that is used to
extract the features from the images. A Kernel is a matrix used for applying various
effects on image through convolution such as for blurring, sharpening, embossing,
edge detection and more
In Image processing, the Kernel’s value depends upon the type of effect being
applied. The output of the convolution process changes with the changing kernel
values(Fig 3.3).For example , for sharpening the image, the kernel values will be
different from the blurring kernel. And accordingly the same picture will look different
with one thing common that the same effect will be applied to each pixel of the
image

OBJECTVE TYPE QUESTIONS


1) is the process of transforming an image by applying a similar effect through a
special array namely kernel over each pixel and it’s local neighbours across the entire
image.

a) Image flattening b) Pooling


c) Convolution d) ReLU

2) In convolution operation, the is a matrix of values whose size and values


determine the transformation effect of the image through convolution process.

a) ReLU b) Kernel
c) Pooling d) None of these
3) Which of the following is not a layer of the CNN architecture?

184
a) Convolutional layer b) ReLU layer
b) c) Pooling layer d) Flattening layer

185
4) In a CNN, which of these layers use convolution operation on the images with
the help of several kernels?

a) Convolutional layer b) ReLU layer


b) c) Pooling layer d) Fully connected

5) In CNN, which of these layers uses rectified linear activation function?

a) Full connected b) ReLU layer


c) Convolutional layer d) Pooling layer

6) Which of the polling types are used mostly in the pooling


layer?

a) Maximum pooling b) Average pooling


c) Minimum pooling d) Median pooling

7) In a CNN, which of these layers performs classification based on the features


by previous layer by classifying the images based on their labels assigning
after image flattening?

a) Pooling layer b) Convolutional layer


c) ReLU layer d) Fully connected

SHORT ANSWER QUESTIONS


1. What is ReLU? What does it do?
Ans) ReLU means Rectified Linear activation function. It is a piecewise linear
function that only outputs the input directly if it is positive, otherwise it removes the
inputs falling in negative range. This helps in sharpening the edges of images.
2. What is pooling? How is it performed?
Ans) Pooling refers to the down-sampling of the data by bringing the overall
dimensions of the images. Mostly two types of pooling takes place: (i) Maximum
pooling (where the maximum value of a pool is taken) and (ii) Average pooling
(where the average of all values of a pool is taken).
3. What is Convolutional layer?
Ans) Convolutional layer uses convolution operation on the images with the help
of several kernels to produce several features such as edges, colour, gradient
orientation, etc

4. What is the objective of fully connected layer?


Ans) The final layer in the CNN is the Fully Connected Layer. The
objective of a Fully connected layer is to take the results of the
convolution/pooling process
and use them to classify the image into a label (in a simple classification example)

186
5 Define the term ‘Kernel’?
Ans) A Kernel is a matrix used for applying various effects on image
through convolution such as for blurring, sharpening, embossing, edge
detection and more In Convolutional neural network, the kernel is
nothing but a filter that is
used to extract the features from the images

187
PRACTICAL PROGRAMS
PROGRAM NO-1

Python Basics-1
AIM- Write a Python program to print the following string in a specific format.

SOURCE CODE-
print("Twinkle, twinkle, little star, \n\tHow I wonder what you are! \n\t\tUp a
OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

188
PROGRAM NO-2
Python Basics-2
AIM- Write a Python program to print 5 lines about yourself using print() function.
SOURCE CODE-

OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

189
PROGRAM NO-3
Python Basics-3

AIM- Write a program to make a simple calculator.


SOURCE CODE-

190
OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

191
PROGRAM NO-4
Python Basics-4

AIM- Write a python program which can solve a quadratic equation.


Formula: Let ax2 + bx + c = 0 is a quadratic equation where a, b and c are real
and a ≠ 0,then Quadratic formula is

SOURCE CODE-

192
OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

193
PROGRAM NO-5
Python Basics-5
AIM- A tours and travels company charges their customer as per following
criteria according to customer category.
Category Charges

A 18

B 15

C 12

D 10

Others 20

SOURCE CODE-

OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

194
PROGRAM NO-6
LISTS AND ITS
AIM- Write a Python OPERATIONS
program:-

1. To declare a list as num = [10, 30, 40, 20, 50] and print it.
2. To sort the list num in Ascending and the Descending order in Python.
3. To create a list as List1 = ['Hello', 10, 'world', 20] and iterate in reverse order.
4. To remove an element of List1 using List1.pop() .
5. To add an element to a List1 using List1.append().

SOURCE CODE-

# 1. List of integers num


num = [10, 30, 40, 20, 50]
print ("The num list :", num)

# 2. Sort the list num in Ascending order


num.sort()
print ("the list num in Ascending order: ", num)

#Sort the list num in Descending order


num.sort(reverse=True)
print ("The list num in decending order: ", num)

#3. Create list List1 and iterate


List1 = ['Hello', 10, 'world', 20]
print("The List1 :-", List1)
# iterate the list
List1 = List1[::-1]

# Print the list


print ("List1 in reverse order: ", List1)

#4. Removing elements


List1.pop() ;
# Printing list after removing
print("list elements after removing from List1: ", List1)

#5. adding elements to List1


List1.append(50)
List1.append("Chennai")
# Printing list after adding
195
print("list elements after adding to List1: ", List1)

196
OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

197
PROGRAM NO-7
DATA SCIENCE
Data Visualization Tools

AIM- Write a short note about five essential plots that can help in data visualization
and write a Python program to show each.

Introduction: Data visualization is the process of turning your data into graphical
representations that communicate logical relationships and lead to more
informed
decision-making.In short, data visualization is the representation of data in a
graphical or pictorial format.
There are five essential plots that have we need to know well for basic data visualization.
 Line Plot
 Bar Chart
 Histogram Plot
 Scatter Plot
 Pie Chart
1. Line Plot:
• A line plot is used to show observations gathered at regular intervals.
•The x-axis shows the regular interval, such as time.
•The Y- axis shows the observations.
• A line plot can be built by the calling the plot() function and
passing the X- axis data for the regular interval, and Y – axis for
the observations.
# code to create a line
plot pyplot.plot(x, y)
2. Bar Plot:
 A bar chart presents relative quantities for multiple categories.
 The x-axis shows the categories that are spaced evenly.
 The Y- axis shows the quantity for each category and is drawn as a bar from the
baseline to the required level on the Y-axis.
 A bar chart can be built by the calling the bar() function and passing the
category names for the X-axis and the quantities for the Y – axis.
3. Histogram Plot
 Histogram plots are used for summarizing the distribution of a data sample.
 The x-axis shows distinct bins or intervals for the observation.
 The Y- axis shows the frequency or tally of the number of
observations in the dataset that has assigned to each bin.
 A Histogram plot can be designed by the calling the hist()
function and passing a list or array that shows the data
sample.
# code to create a histogram plot
pyplot.hist(x, y)
4. Scatter Plot:
 A scatter plot can be designed by the calling the scatter() function and
198
passing a list or array that shows the data sample.

199
# code to create a scatter plot
pyplot. Scatter(x, y)
5. Pie Chart
 A Pie Chart is a circular statistical plot that can display only one series of
data.
 The area of the chart is the total percentage of the given data. The area
of slices of the pie represents the percentage of the parts of the data
 # code to create a pie plot
pyplot.pie(values, labels = Names)

SOURCE CODE-

200
201
OUTPUT-

202
RESULT- The source code is executed successfully and the output was verified.

203
PROGRAM NO-8
INTRODUCTION TO COMPUTER VISION
AIM- Write a Python program
a. To read and display an image using OpenCV in Google Colab.
b. To dsiplay the height and width of an input image.
c. To covert BGR format of OpenCV to RGB format.

Introduction:
Computer Vision Computer vision is a field/domain of artificial intelligence (AI) that
enables computers and systems to derive meaningful information from digital
images, videos and other visual inputs — and take actions or make
recommendations based on that information.
OpenCV-Python is a library of Python bindings designed to solve computer vision
problems. Python is a general purpose programming language started by Guido van
Rossum that became very popular very quickly, mainly because of its simplicity and
code readability. It enables the programmer to express ideas in fewer lines of code
without reducing readability. OpenCV was started at Intel in 1999 by Gary Bradsky,
and the first release came out in 2000. Vadim Pisarevsky joined Gary Bradsky to
manage Intel's Russian software OpenCV team. In 2005, OpenCV was used on
Stanley, the vehicle that won the 2005 DARPA Grand Challenge.

SOURCE CODE-
# Importing the OpenCV library
import cv2
# Importing the matplotlib library
import matplotlib.pyplot as plt

# Reading the image using imread() function


image = cv2.imread('/road.jpg')
# Displaying the image using imshow() function
plt.imshow(image)

# Extracting the height and width of an image


h, w = image.shape[:2]
# Displaying the height and width
print("Height = {}, Width = {}".format(h, w))

# Converting the image to RGB format using cvtColor() function


imgrgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
plt.imshow(imgrgb),plt.title("RGB FROMAT of given Image")
# Extracting the height and width of an image
h, w = imgrgb.shape[:2]
# Displaying the height and width
print("Height = {}, Width = {}".format(h, w))

204
OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

205
PROGRAM NO-9
COMMON IMAGE MANIPULATION USING OpenCV

AIM- Write a Python program


a. To resize the image using resize().
b. To dsiplay the region of interest of an image.
c. To rotate an image.

SOURCE CODE-
# Importing the OpenCV library
import cv2
# Importing the matplotlib library
import matplotlib.pyplot as plt

# Reading the image using imread() function


image = cv2.imread('/road.jpg')
# Displaying the image using imshow() function
plt.imshow(image),plt.title(“ORIGINAL IMAGE”)

# Extracting the height and width of an image


h, w = image.shape[:2]
# Displaying the height and width
print("Height = {}, Width = {}".format(h, w))

# resize() function takes 2


parameters, # the image and the
dimensions
resize = cv2.resize(image, (800, 800))
plt.imshow(resize),plt.title(“RESIZED IMAGE”)

# We will calculate the region of interest


# by slicing the pixels of the image
roi = image[100 : 500, 200 : 700]
plt.imshow(roi),plt.title("REGION OF INTEREST IMAGE")

# Calculating the center of the image


center = (w // 2, h // 2)

# Generating a rotation matrix


matrix = cv2.getRotationMatrix2D(center, -45, 1.0)

# Performing the affine transformation


rotated = cv2.warpAffine(image, matrix, (w, h))
plt.imshow(rotated),plt.title("ROTATED IMAGE")

206
OUTPUT-

RESULT- The source code is executed successfully and the output was verified.

207
PROGRAM NO-10
ADVANCED IMAGE MANIPULATION USING OpenCV

AIM- Write a Python program


a. To show the use of threshold() function to display variations in the image.
b. To draw the rectangle in the image.
c. To put text in the image.

SOURCE CODE-
# Importing the OpenCV library
import cv2
# Importing the matplotlib library
import matplotlib.pyplot as plt

# Reading the image using imread() function


image = cv2.imread('/road.jpg')
# Displaying the image using imshow() function
plt.imshow(image),plt.title(“ORIGINAL IMAGE”)

# Thresholding is cool
ret,thresh1 = cv2.threshold(image,127,255,cv2.THRESH_BINARY)
ret,thresh2 = cv2.threshold(image,127,255,cv2.THRESH_BINARY_INV)
ret,thresh3 = cv2.threshold(image,127,255,cv2.THRESH_TRUNC)
ret,thresh4 = cv2.threshold(image,127,255,cv2.THRESH_TOZERO)
ret,thresh5 = cv2.threshold(image,127,255,cv2.THRESH_TOZERO_INV)

titles = ['Original Image','BINARY','BINARY_INV','TRUNC','TOZERO','TOZERO_INV']


images = [image, thresh1, thresh2, thresh3, thresh4, thresh5]

for i in range(6):
plt.subplot(2,3,i+1),plt.imshow(images[i],'gray'
) plt.title(titles[i])
plt.xticks([]),plt.yticks([])

plt.show()

# Blurring - smoothes the image out


blur = cv2.blur(image,(10, 10))

plt.imshow(image), plt.title('Original')
plt.show()
plt.imshow(blur), plt.title('Blurred')
plt.show()

# We are copying the original image,


# as it is an in-place operation.
output = image.copy()
208
# Using the rectangle() function to create a rectangle.
rectangle = cv2.rectangle(output, (1500, 900),
(600, 400), (255, 0, 0), 3)
plt.imshow(rectangle), plt.title('Original with rectangle box')
plt.show()

output = image.copy()
# Adding the text using putText() function
text = cv2.putText(output, 'USE OF OpenCV', (500, 550),
cv2.FONT_HERSHEY_SIMPLEX, 4, (255, 255, 0), 5)
plt.imshow(text), plt.title('Original with TEXT ')
plt.show()

OUTPUT-

209
RESULT- The source code is executed successfully and the output was verified.

210
ARTIFICIAL INTELLIGENCE (417)
Sample Question Paper
Class X Marks: 50

Time: 2 Hours

SECTION A: OBJECTIVE TYPE QUESTIONS

SECTION A: OBJECTIVE TYPE QUESTIONS


Ramya and Ramu both own plant shops. Ramu sits at his shop every day.
When customers come, he sells to them. Ramya walks around and gets
customers to her shop. She also sells seeds and flowers. Who is
Entrepreneur out of Ramya and Ramu.
1 a) Ramya 1
b) Ramu
c) Both of the above
d) None of the above

refers to focusing human efforts for maintaining a


healthy body and mind capable of better withstanding stressful
situations
2 1
a) Mental Health
b) Emotional Health
c) Self-Management
d) Stress Management
Indian great Srinivasa Ramanujan had exceptional understanding of
Theory of Numbers and Continuous Fractions and other
Mathematical equations. He possessed intelligence.
a) Linguistic
3 1
b) interpersonal
c) Naturalistic
d) logical- mathematical

211
act as an interface between the user and the computer.
a) Operating System
b) Ms Excel
4 1
c) Impress
d) Digital Documentation

The Meta company’s AI team recently trained an image recognition


model to 85% accuracy using billions of public Instagram photos
tagged with hashtags. The key technology behind this model is
.
5 a) NLP 1
b) Computer Vision
c) Data
d) All of these

Which of the following is not an AI Domain?


a) Deep learning
6 b) Machine Learning 1
c) Computer Vision
d) Computer Aided Design
Choose the five stages of AI project cycle in correct order

a) Evaluation -> Problem Scoping -> Data Exploration -> Data


Acquisition -> Modelling
7 b) Problem Scoping -> Data Exploration -> Data Acquisition -> 1
Evaluation -> Modelling
c) Data Acquisition -> Problem Scoping -> Data Exploration ->
Modelling -> Evaluation
d) Problem Scoping -> Data Acquisition -> Data Exploration -
> Modelling -> Evaluation

212
is the process of understanding the reliability of any AI
model, based on outputs by feeding
test dataset into the model and comparing with actual answers.
a) Evaluation 1
8
b) Problem Scoping
c) Data acquisition
d) Data Exploration

The people who face the stated problem and would be benefitted from the
solution are termed as
9 a) Stakeholders 1
b) Key Persons
c) Who
d) End user
How many SDGs have been announced by the United nations?

10 a) 20 1
b) 17
c) 30
d) 25

Which of the following statement is correct for problem scoping

11 a) it will create real value for the organization 1


b) it will create more confusion among the stakeholders
c) it is a tool that prevents the problem will not recur
d) it is a tool that provides a clear understanding of the data flow

You would feed the data into the machine. This is the data with which
the machine can be trained. Now, once it is ready, it will predict his
next data efficiently. This previous data is known as .
12 a. Testing Data 1
b. Training Data
c. Exploring Data
d. All of the above

The block helps in analyzing the people getting


affected directly or indirectly due to it.
a. Who
13 1
b. What
c. Where
d. Why

213
Name any 2 methods of collecting data.
a) Surveys and Interviews
14 1
b) Rumors and Myths
c) AI models and applications
d) Imagination and thoughts

You need to which will become the base of your project as it


will help you in understanding what the parameters that are related to
problem scoping are.
15 a. Acquire Data 1
b. Database
c. Data Mining
d. None of the above

NLP stands for .


a. Natural Language Processing
16 b. Nature Language Processing 1
c. None Language Processing
d. None of the above

You called a company’s customer care office. An application there


responded you, spoke to you, asked broadly about your issue and then
transferred your call to appropriate department. This is an example of
technology of AI.
17 a) Machine Learning 1
b) Big Data
c) NLP
d) Data Science
The driverless cars use domains and technologies of AI.
a) GPS
18 b) Data 1
c) Computer Vision
d) all of these

214
makes it possible to assign predefined categories to a
document and organize it to help you find the information you need
or simplify some activities.
a. Automatic Summarization
19 1
b. Sentiment Analysis
c. Text Classification
d. All of the above

can be defined as the fraction of positive cases that are


correctly identified.
a. Recall
20 1
b. Accuracy
c. Precision
d. Data acquisition

SECTION B
21 Name any 4 qualities of an entrepreneur. 2

22 List any 4 activities that help in stress management. 2

23 What are antivirus? Name any 2 antiviruses. 2

24 Explain the training data and testing data with an example 2

25 Speech recognition and response by machine is a revolutionary


concept.
26 What is 4Ws Problem Canvas? 2

27 What is a virtual assistant? Give Example? 2

28 What is Precision? Mention its formula. 2

29 Why is evaluation important? Explain. 2

Section C

30 Explain how AI works in the following areas (any two): 4

31 What are the steps of text Normalization? Explain them in brief. 4

32 Write the applications of NLP (Natural Language Processing). (Any 4


four)

215
200

You might also like