Edits
Edits
COMMUNICATION SKILLS
……
Communication
Communication is a two-way process through which information or message is exchanged between individuals
using language, symbols, signs or behaviour.
Active listening;-
a communication technique where the listener focuses fully on the speaker, both verbally and nonverbally, to
understand their message, comprehend the information, and respond thoughtfully
The various factors that affect active listening are as follows.
(1)EYE CONTACT;-It is a form of body language. Maintaining an eye contact with the person you are talking
to sends a signal to the speaker that you are interested in communication.
(2)Gestures: These indicate to the speaker if you are listening or not.
(3)Avoiding distractions: You need to identify the things that distract you. You must physically remove
the distractions in order to listen attentively.
(4)Giving feedback: Feedback can be positive or negative. But in both the cases, one needs to be polite so
that the person to whom the feedback is being given is not hurt or offended
Stages of active listeninG
. The five stages of active listening are as follows.
1.Receiving: It involves listening attentively.
2.Understanding: It is an informed agreement about something or someone.
3.Remembering: It refers to the retrieval or recall of some information from the past.
4.Evaluating: It is about judging the value, quantity, importance and amount of something or
someone.
5.Responding: It is about saying or doing something as a response to something that has been said
or done
SELF MANAGEMENT SKILLS
CHAPTER 2
SELF MANGEMENT:-It is also referred to as ‘self-control’, is the ability to control one’s emotions, thoughts
and behaviour effectively in different situations. This includes motivating oneself, and working towards
achieving personal and academic goals.. To manage oneself well, a person needs to develop the following.
Positive thinking: to think that one can get things done and be happy.
Result orientation: to dream big and achieve the desired or set results.
Self-awareness: to be aware of one’s personality traits and make the best out of one’s strengths.
Define Positive attitude
A positive attitude is a mental and emotional state characterized by optimism, hope, and a focus on the good
aspects of life and situations.
Ways to maintain positive attitude?
•Start the day with a morning routine. Say positive affirmations, smile often and think about the tasks to be
accomplished during for the day.
•Feed the mind with positivity, read motivating books etc.
•Move towards your goals and dreams. Be cheerful and work
hard to achieve the dreams
WHAT IS STRESS
Stress is a state of feeling upset, annoyed and hopeless
HOW TO MANAGE STRESS:
•Maintain an accomplishment sheet and enter even small achievements.
•Keep your thoughts in present.
•Talk to friends and family for comfort.
•Practise meditation and yoga.
Q. Define Motivation?
Motivation is derived from the word ‘motive’. Thus, directing behaviour towards certain motive or goal is the
essence of motivation. An individual’s motivation may come from within (intrinsic motivation) or be inspired by
others or events (extrinsic motivation).
Intrinsic motivation
It includes activities for which there is no apparent reward but one derives enjoyment and satisfaction in doing
them. It occurs when people are internally motivated to do something because it brings them pleasure. They
think it is important or feel what they are learning is significant. Incentives related to the motive or goal can
satisfy one’s needs.
Extrinsic motivation
It arises because of incentives or external rewards. Lack of motivation or incentives may lead to frustration, for
example, employees who are kept on contractual basis for a long time may get frustrated and leave an
organisation.
Q. What is Personality?
The word "personality" stems from the Latin word persona, which refers to a theatrical mask worn by
performers to play roles or disguise their identities.
Q. What are Personality disorders?
Personality disorders involve long-term patterns of thoughts and behaviour that are unhealthy and rigid. A
personality disorder is a way of thinking, feeling and behaving that deviates from worldly expectations and
causes distress, which lasts over time.
Q. Steps to overcome personality disorders
Be Active in Your Treatment
As with other mental health conditions, it is vital to take an active role in your treatment. Even if you
don’t feel that you don’t want to go to therapy, it’s important to take part in it so that you can achieve
your treatment goals.
Take Your Medication
One of the most obvious ways to control your personality disorder is to take your medications regularly.
Even if you think you’re fine, please don’t miss a dose, as doing so may cause your symptoms to return.
Avoid Drugs and Alcohol
Some substances can have a negative effect on personality disorders. In addition, some substances can
interfere with the medications that help to control your personality disorder. As a result, if you have
this condition, it’s vital to avoid using harmful substances.
Practice Good Self-Care
Your physical and mental health are integrally connected. When you don’t eat a healthy diet, drink water,
get enough sleep, and exercise regularly, your mental health suffer
Introduction to Spreadsheet
2
A spreadsheet is an electronic document, which has rows and columns. It is used to store data in a systematic
way and do calculations.
For example, a grocery shop has many items.
Types of spreadsheet
There are many types of spreadsheet available that have been created by different companies. Some of the
most popular ones are given in Figure 3.1.
3
Components of a spreadsheet
4
Q. is Presentation
Presentation software is a tool used to create visual presentations. These presentations are usually
What Software?
a slide show format, and can be created with a variety of programs. The programs make it possible to
delivered in
combine
text and graphic elements to convey important information to a group of people all at once. Common uses for
this type of software include teaching a new or complex concept to a group of students, announcing the launch
a new product or service campaign to employees, training employees on key concepts or new policies, or
presenting a proposal to a group.
Q. Steps to save a Presentation?
1. Locate and select the Save command on the Quick Access Toolbar.
4. The Save As dialog box will appear. Select the location where you want to save the presentation.
5
6. The presentation will be
saved.You can click the
Savecommand again to save your changes as
you modify the presentation.
2. Click Browse. Alternatively, you can choose OneDrive to open files stored on your OneDrive.
6
3. The Open dialog box will appear. Locate and select your presentation, then click Open.
7
Printing the spreadsheet
To print a spreadsheet, you can click File, and then, select Print
-down
fromor
the
press
drop
Ctrl+Pon the
keyboard as shown in Figure 3.12. A Print dialog box appears. Select the printer, range of pages and number of
copies to be printed, and click OK as shown in Figure 3.13.
Figure 3.12: Printing the spreadsheet Figure 3.13: Print dialog box
can be of many kinds, including new products — like adding varieties, new services like home delivery or
credit services, new marketing ideas, new cost reduction ideas and many more.
8
Economists define an entrepreneur as someone, who brings in resources, labour, material and other
assets into profit making combinations.
Psychologists define an entrepreneur as a person, who is, typically, driven by a psychological force,
which creates a desire to obtain or attain something.
Sociologists define an entrepreneur as a person, whose actions would determine social status and
contribute to societal development.
Service entrepreneurs
These entrepreneurs either create a new market for their services or provide a service in an existing
market. They spot an idea and convert it into a service, which is unprecedented or not available in the
market. It is irrespective of the nature and size of operations but is essentially a service.
9
Business entrepreneurs
These are entrepreneurs, who undertake business and trading activities and are not concerned with the
manufacturing work. A business entrepreneur identifies the potential of a product in a market. From
that point onwards, the business and trading entrepreneur is responsible for stimulating demand for
the product.
Industrial entrepreneurs
An industrial entrepreneur is, essentially, a manufacturer, who identifies the needs of customers and
creates products or services to serve them. Such an entrepreneur is product oriented, who starts
through an industrial unit to create a product like electronic industry, textile unit, machine tools,
manufacturing unit, etc.
Agricultural entrepreneurs
Agriculture has always been considered as a low yielding entrepreneurship. Agriculturists have now
introduced new and innovative technology to maximise the yield, giving birth to agriculture
entrepreneurship.
Technical entrepreneurs
The Industrial Revolution gave birth to technical entrepreneurs, who use their technical expertise to
create and offer machines, tools and methods. They constantly innovate to make industrial processes
seamless and efficient. Technical entrepreneurs use their technical knowledge and skills to innovate.
Non-technical entrepreneurs
These entrepreneurs use their expertise in providing services to create a market for technical
entrepreneurs. Their expertise is in non-technical aspects of a product or service, i.e., they are not
concerned with the manufacturing process but have more to do with before and after the
manufacturing process.
Professional entrepreneurs
Such an entrepreneur starts a business, nurtures it and makes it reach a point of self-sustenance. Once
the project reaches that point, the entrepreneur sells the business and starts a new one, and then,
follows the same cycle.
IT entrepreneurs
People who take up entrepreneurship in the field of Information Technology (IT) are called IT
entrepreneurs.
Women entrepreneurs
As the name suggests, when women take up entrepreneurship, they are called women entrepreneurs. A
number of women entrepreneurs are taking initiatives in starting entrepreneurial activities and many of
them have even made it to the top.
Social entrepreneurs
Individuals, who focus on developing solutions that benefit the society, are called social entrepreneurs.
The term ‘social innovator’ is used interchangeably with social entrepreneurs.
1
0
knowledge or lack of funding, there are various barriers that can prevent one from pursuing one’s passion for
entrepreneurship.
Personal barriers
How long will the business last? How much profit will it make? Will my customers like my product? Will I have
enough money to support my family? These are the questions that might go through an entrepreneur’s mind
before the person actually starts a business venture. Establishing any new venture is a risk because there is
always a fear of what may go wrong. Secondly, finding a suitable team is also a tedious job. A team of careless
and non-suitable workers may cause damage to a business.
(a). Self-doubt
It is easy to get discouraged when something goes wrong in a business. One starts doubting oneself and
may even feel like giving up. Self-doubt comes when we do not have confidence in ourselves and our
abilities.
(b). Forming a team and teamwork
Finding suitable people and training them to put in their best for the business is a tedious and difficult
exercise. As an entrepreneur, one must find people, who think and feel like the rest of the team. When
new people fit into the culture of the team, work can happen better and faster.
1
1
The greening of economy presents a major opportunity to start new businesses, develop new markets and
lower energy costs. Green jobs that contribute to protecting the environment and reducing carbon footprint
are becoming a key economic driver of the twenty-first century.
Green jobs help:
increase the efficiency of energy and raw material.
reduce greenhouse gas emissions.
control waste and pollution.
protect and restore ecosystems.
Organic fruits and vegetables are free from chemical residues of synthetic fertilisers, and hence, are
good for our health. Farmers’ cooperatives are one of the most effective means of reducing the risk in
agriculture and strengthening the livelihoods of small and marginal farmers.
Some green jobs in the agriculture sector are in organic farming, integrated pest management, farm
mechanisation and agriculture tourism. The Krishi Vigyan Kendras (KVKs) set up by the government, can
be utilised to provide support activities like technology dissemination, training awareness to the local
youth and farmers for collection, storage and reuse of agro waste.
The EESL seeks to create market for electric vehicle, a technology poised to boost e mobility in the
country. The emergence of electric drives as an alternate to internal combustion engines has opened
opportunities for new entrants in the automotive market.
1
2
These do not consume electricity and provide a way for people to exercise. Using bamboo channels for
drip irrigation is an eco-friendly way to irrigate the land. It uses water efficiently without any wastage. It
is cheaper to build, and after 2–3 years when the bamboo rots, it can be added to the soil as manure.
Some common jobs in this sector are roofer, solar panel installation technician and field technician.
1
3
VOCATIONAL SKILLS 40-MARKS
IT/ITES Job Role: Junior Software Developer SUBJECT CODE:- 050 EXAMINATION CODE:- ITE
(iii)Data Inconsistency:-
Data inconsistency occurs when same data maintained in different places do
not match.
(iv)Data Isolation:-
Because data are scattered in various files, and files may be in different
formats, writing new application programs to retrieve the appropriate data is
difficult.
Introduction to DBMS
A database system is basically a computer record keeping system. Limitations
faced in file system can be overcome by storing the data in a database where
data are logically related. We can organise related data in a database so that it
can be managed in an efficient and easy way.
1
4
A database management system (DBMS) or database system in short, is a
software that can be used to create and manage databases. DBMS lets users to
create a database, store, manage, update/modify and retrieve data from that
database by users or application programs.
5.Faster data Access: The Data base management system (DBMS) helps to produce
quick answers to database queries thus making data accessing faster and more
accurate.
6.Better decision making: Due to DBMS now we have Better managed data and
Improved data accessing because of which we can generate better quality
information hence on this basis better decisions can be made. Better Data quality
improves accuracy, validity and time it takes to read data. DBMS does not guarantee
data quality, it provides a framework to make it is easy to improve data quality.
7.Simple: Data base management system (DBMS) gives simple and clear logical view
of data. Many operations like insertion, deletion or creation of file or data are easy to
implement.
1
5
A data model describes the structure of the database, including how data are
defined and represented, relationships among data, and the constraints.
The most commonly used data model is Relational Data Model. Other types of
data models include object-oriented data model, entity-relationship data model,
document model and hierarchical data model.
In relational data model, data is organized into tables (i.e rows and
columns) .These tables are called relations. Each table can have multiple
columns where each column name should be unique. A row in a table represents a relationship
among a set of values.
For example, each row in the table represents a related set of values. Each row
of Table 1 represents a particular guardian and has related values viz.
guardian‘s ID with guardian name, address and phone number. Thus, a table
consists of a collection of relationships.
Similarly, attribute GUID is placed with STUDENT table for extracting guardian
details of a particular student. If linking attributes are not there in appropriate
relations, it will not be possible to keep the database in correct state and
retrieve valid information from the database.
Figure 1 shows the relational database Student Attendance along with the three
relations (tables) STUDENT, ATTENDANCE and GUARDIAN.
1
6
the columns of a relation are the attributes which are also referred as fields. For
GUID, GName, GPhone and GAddress are
example, relation
attributes
of GUARDIAN.
ii. Tuple
Each row of data in a relation (table) is.called
(Row): In a table
a with n columns, a tuple
is a relationship between the n related
tuple
values.
iii.Domain:
It is a set of values from which an attribute can take a value in each row. Usually, a
data type is used to specify domain for an attribute. For example, in STUDENT
relation, the attribute RollNumber takes integer values and hence its domain is a set
of integer values. Similarly, the set of character strings constitutes the domain of the
attribute SName.
iv. Degree:
The number of attributes in a relation is called the Degree of the relation. For
example, relation GUARDIAN with four attributes is a relation of degree 4.
v. Cardinality:
The number of tuples in a relation is called the Cardinality of the relation. For
example, the cardinality of relation GUARDIAN is 5 as there are 5 tuples in the table.
1.Candidate Key:-
A relation can have one or more attributes that takes distinct values. Any of
these attributes can be used to uniquely identify the tuples in the relation. Such
attributes are called candidate keys as each of them are candidates for the
primary key.
As shown in Figure, the relation GUARDIAN has four attributes out of which
GUID and GPhone always take unique values. No two guardians will have same
phone number or same GUID. Hence, these two attributes are the candidate
keys as they both are candidates for primary key.
1
7
2.Primary :-
A primary key is a set of one or more attributes that can uniquely identify tuples
Key
within the
relation.
Out of one or more candidate keys, the attribute chosen by the database
to uniquely identify the tuples in a relation is called theyprimary
designer of that ke
relation.
The remaining attributes in the list of candidate keys are called the alternate
keys.
A candidate key that is not the primary key is called as Alternate Key.
In the relation GUARDIAN, suppose GUID is chosen as primary key, then GPhone
will be called the alternate key.
3.Composite Key:-
If no single attribute in a relation is able to uniquely distinguish the tuples, then
more than one attribute are taken together as primary key. Such primary key
consisting of more than one attribute is called Composite Primary key.
4.Foreign Key:-
A non-key field(attribute) of a table that refers to the primary key of another
table(relation).
A foreign key is used to represent the relationship between two relations. A
foreign key is an attribute whose value is derived from the primary key of
another relation.
1
8
This
co tents
meansfrom
that
another
any attribute
(referenced)
of a relation
relation,(referencing),
becomes foreign
which
key
isifused
it refers
to refer
to
n the
The referencing relation is called Foreign Relation. In some cases, foreign key
can take NULL value if it is not the part of primary key of the foreign table. The
relation in which the referenced primary key is defined is called primary
relation or master relation.
In Figure 5, two foreign keys in Student Attendance database are shown using
schema diagram where the foreign key is displayed as a directed arc (arrow)
originating from it and ending at the corresponding attribute of the primary key
of the referenced table. The underlined attributes make the primary key of that
table.
1
9
Defining a schema includes creating a relation and giving name to a relation,
identifying the attributes in a relation, deciding upon the datatype for each
attribute and also specify the constraints as per the requirements.
Sometimes, we may require to make changes to the relation schema also. SQL
allows us to write statements for defining, modifying and deleting relation
schemas. These are part of Data Definition Language (DDL).
We have already learned that the data are stored in relations or tables in a
database. Hence, we can say that a database is a collection of tables.
The Create statement is used to create a database and its tables (relations).
Before creating a database, we should be clear about the number of tables the
database will have, the columns (attributes) in each table along with the data
type of each column, and its constraint, if any.
Data Types
We know that a database consists of one or more relations and each relation
(table) is made up of attributes (column). Each attribute has a data type. We
can also specify constraints for each attribute of a relation.
Data type of an attribute indicates the type of data value that an attribute can
have or in other words the type of data that a variable can hold. It also decides
the operations that can be performed on the data of that attribute.
For example, arithmetic operations can be performed on numeric data but not
on character data. Commonly used data types in MySQL are numeric types,
date and time types, and string types .
2
0
Query OK, 1 row affected (0.02 sec)
Syntax:
CREATE TABLE tablename ( attributename1 datatype constraint, attributename2
datatype constraint, attributenameN datatype constraint);
Create table STUDENT.
ALTER Table
After creating a table, we may realise that we need to add/remove an attribute
or to modify the datatype of an existing attribute or to add constraint in
attribute. In all such cases, we need to change or alter the structure (schema)
of the table by using the alter statement.
4.Remove An Attribute:-
Syntax:
2
1
ALTER TABLE table_name DROP attribute_name
Example:
ALTER TABLE Guardian DROP Income;
DROP Table
Syntax:
DROP TABLE table_name
Example:
DROP TABLE Guardian;
INSERTION of Records
i.Insertion of records (For all attributes/Fields)
Syntax:
INSERT into Table_Name Values(Value1, Value2,…..)
Example:
INSERT into Guardian Values(4444, ‟Gowhar‟, 7006123456, „Surasyar
Budgam‟); ii.Insertion of records (For Some attributes/Fields) Syntax:
INSERT into Table_Name (Column1, Column4) Values(Value1, Value4)
Example:
INSERT into Guardian (GUID, GAddress) Values(5555, „Magam‟)
SELECT Statement
The SQL Statement SELECT is used to retrieve data from the tables in a database
and the output is also displayed in tabular form.
Syntax:
SELECT Attribute1,Attribute2 FROM Table_Name WHERE condition
Example:
SELECT Sname, SDOB FROM student WHERE RollNumber =1;
To select all the data available in a table
Syntax:
SELECT * from Table_Name
Example:
SELECT * from student:
DATA Updation
Syntax:
2
2
UPDATE Table_Name set attributes1=value1, attribute2= value2,………..where
condition Example:
UPDATE student Set GUID=1010 where RollNumber=3;
DATA Delection
Syntax:
DELETE from table_name WHERE condition;
Example:
Delete from student where RollNumber=2;
UNIT-4 SOFTWARE
ENGINEERING MARKS-12
2
3
Software Engineering is required due to the following reasons:
To manage Large software
For more Scalability
Cost Management
To manage the dynamic nature of software
For better quality Management
SDLC Phases
Phase 1: Requirement collection/Planning and analysis
Phase 2: Feasibility study
Phase 3: System Design
Phase 4: System Implementation/Coding
Phase 5: System Testing
Phase 6: System Installation/Deployment
Phase 7: System Maintenance
2
4
Phase 1: Requirement collection/Planning
and analysis
The requirement is the first stage in the SDLC process. Planning for the quality assurance requirements and
recognization of the risks involved is also done at this stage. Requirements Gathering stage need teams to get
detailed and precise requirements. This helps companies to finalize the necessary timeline to finish the work of
that system.
Phase 2: Design
In this phase, the system and software design documents are prepared as per the requirement
specification document. This helps define overall system architecture. This design phase serves as input
for the next phase of the model. There are two kinds of design documents developed in this phase:
Before you put out the actual software, it is important to know how it will work, perform various
functions and what will be the algorithms used for solving the problems.
The software is then reviewed and alterations can be made based on the feedback of the team and the
partners in the Software Development process.
All of this is covered in the design phase of the Software Development Life Cycle.
Phase 4: Coding/Implementation
Well, it is now time to start with actually building and developing our software. This is the part where
programmers and developers play their role. The design for our software which was previously finalized
and the prototypes which were made before, now take form of the actual software.
In this phase, developers start build the entire system by writing code using the chosen programming
language. In the coding phase, tasks are divided into units or modules and assigned to the various
developers. It is the longest phase of the Software Development Life Cycle process.
In this phase, Developer needs to follow certain predefined coding guidelines. They also need to use
programming tools like compiler, interpreters, debugger to generate and implement the code.
Phase 5: Testing
Now, it is time that we answer the question of ‘Did we succeed in developing what we wanted our
software to be?” To answer this question, we have the testing phase.
Once the software is complete, and it is deployed in the testing environment. The testing team starts
testing the functionality of the entire system. This is done to verify that the entire application works
according to the customer requirement. During this phase, testing team may find some bugs/defects
2
5
which they communicate to developers. The development team fixes the bug and send back to theteam
for a re-test. This process continues until the software is bug-free, stable, and working according to the
business needs of that system.
Phase 6: Installation/Deployment
Once the software testing phase is over and no bugs or errors left in the system then the final deployment
process starts. So, after going through the above phases of the Software Development Life Cycle, we now are
ready to install this software and start using it.
Phase 7: Maintenance
Once the system is deployed, and customers start using the developed system, following 3 activities occur
Bug fixing – bugs are reported because of some scenarios which are not tested at all Upgrade –
Upgrading the application to the newer versions of the Software.
Enhancement – Adding some new features into the existing software.The main focus of this SDLC phase is
to ensure that needs continue to be met and that the system continues to perform as per the
specification mentioned in the first phase.
2
6
We have various types of testing available in the market, which are used to test the application or the software.
Software Testing can be broadly classified into two types:
Unit Testing
It is a software testing technique by means of which individual units of software i.e. group of computer
program modules, usage procedures, and operating procedures are tested to determine whether they
are suitable for use or not. It is a testing method using which every independent module is tested to
determine if there is an issue by the developer himself. It is correlated with the functional correctness
of the independent modules.
Unit Testing is defined as a type of software testing where individual components of a software are
tested. Unit Testing of the software product is carried out during the development of an application. An
individual component may be either an individual function or a procedure. Unit Testing is typically
performed by the developer.
In SDLC Unit testing is the first level of testing done before integration testing. Unit testing is such a
type of testing technique that is usually performed by developers. Although due to the reluctance of
developers to test, quality assurance engineers also do unit testing.
2
7
Black Box Testing:
The technique of testing in which the tester doesn’t have access to the source code of the software and is
conducted at the software interface without any concern with the internal logical structure of the software is
known as black-box testing.
White-Box Testing:
The technique of testing in which the tester is aware of the internal workings of the product, has access to its
source code, and is conducted by making sure that all internal operations are performed according to the
specifications is known as white box testing.
Advantages:
1. White box testing is very thorough as the entire code and structures are tested.
2. It results in the optimization of code removing error and helps in removing extra lines of code. 3. It
can start at an earlier stage as it doesn’t require any interface as in case of black box testing.
4. Easy to automate.
5. White box testing can be easily started in Software Development Life Cycle.
6. Easy Code Optimization.
2
8
The Release Candidate also known as Gamma Delta describes the almost final version of a software.
This Release Candidate can also be made available to selected customers with appropriate
communication. Manufacturers often assume that the testers will at best find smaller errors in the
Release Candidate and ideally no errors at all. Gamma Delta can also run through several cycles. At the
end of the phase, the documentation of the new functions should also be completed.
The Release as a final version of a development or as a status that is offered or made available to all
customers. This is also referred to as Golden Master. The entirety of the functions to be implemented is
defined in release management.
2
9
program statements one by one, first translating and then executing. This
process is continued until an error is encountered or the whole program is
executed successfully. In both the cases, program execution will stop.
Introduction of Iterations:-
A basic building block of all programs is to be able to repeat some code over and over
again. Whether it is updating the bank balances of millions of customers each night,
or sending email messages to thousands of people programming involves instructing
the computer to do many repetitive actions. In computing, we refer to this repetitive
execution as iteration. In this section, we will explore some mechanisms for basic
iteration.
Python programming language provides the following types of loops to handle
looping requirements. Python provides three ways for executing the loops.
While all the ways provide similar basic functionality, they differ in their syntax
and condition-checking time.
Syntax:
while expression:
statement(s)
Output
Hello Geek
Hello Geek
Hello Geek
3
0
# Python program to
# Iterating over range
illustrate -1 0 to
n
n=
for i in range(0,
4
n):print(i
)
Output
0
1
2
3
Q. Explain
Loop Control ?
Loop control statements changefrom their normal sequence. When
Statements
leaves a scope, all automatic objects
execution that were created in that scope are destroyed.
execution
Python supports the following control
statements.
Continue
Th continue
Statement t in Python returns the control to the beginning of the
e statemen loop.
Break Statement
The break statement in Python brings control out of the loop.
3
1
for letter in 'geeksforgeeks':
Output
Current Letter : e
Output
Hello Geek
else:
3
2
Hello Geek
Hello Geek
In Else Block
The syntax for a nested while loop statement in the Python programming language is
as follows: while expression: while expression: statement(s)
statement(s)
A final note on loop nesting is that we can put any type of loop inside of any
other type of loop. For example, a for loop can be inside a while loop or vice
versa.
Output
1
22
333
4444
Python Program:
Using for loop to iterate over a string in
Python string_to_iterate = "Data Science" for
char in string_to_iterate:
print(char)
3
3
Sc
i
e
n
c
e
Python, String operators represent the different types of operations that can be
employed on the program’s string type of variables. Python allows several string
operators that can be applied on the python string are as below: Assignment
operator: “=.”
Concatenate operator: “+.”
String repetition operator: “*.”
String slicing operator: “[]”
String comparison operator: “==” & “!=”
Membership operator: “in” & “not in”
Escape sequence operator: “\.”
String formatting operator: “%” & “{}”
3
4
<= Less than or equal to x <= y Try it »
3
5
swapcase() : Swap the cases of all characters in a string
capitalize(): Convert the first character of a string to uppercase
Output
Converted String:
GEEKS FOR GEEKS
Converted String:
geeks for geeks
Converted String:
Geeks For Geeks
3
6
Converted String:
GEEkS fOR GEeKs
Original String
geeKs For geEkS
3
7
Artificial Intelligence (AI)
Artificial Intelligence AI is the ability of a machine or computer system to copy human intelligence
process, learn experiences and adapt to new information, perform human-like activities. Using these
technologies, computers can be trained to accomplish specific tasks by processing large amounts of
data and recognizing patterns in the data.
Have you ever wondered how maps in your smartphone are able to guide you to take the fastest route
to your
destination by analysing real time data, such as traffic congestion? On uploading a photo on a social
networking site, has it ever happened that your friends in the photograph were recognised and tagged
automatically?
These are some of the examples of application of Artificial Intelligence.
The intelligent digital personal assistants like Siri, Google Now, Cortana, Alexa are all powered by AI. An
intelligent machine is supposed to imitate some of the cognitive functions of humans like learning,
decision-making and problem solving. In order to make machines perform tasks with minimum human
intervention, they are programmed to create a knowledge base and make decisions based on it. AI
system can also learn from past experiences or outcomes to make new decisions.
Machine Learning
Machine learning is an application of artificial intelligence (AI) that provides systems the ability to
automatically learn and improve from experience without being explicitly programmed. Machine
learning focuses on the development of computer programs that can access data and use it learn for
themselves.
These algorithms, called models, are first trained and tested using a training data and testing data,
respectively. After successive trainings, once these models are able to give results to an acceptable level
of accuracy, they are used to make predictions about new and unknown data.
3
8
Figure shows that at the current pace, around 2.5 quintillion bytes of data are created each day, and
the pace is increasing with the continuous evolution of the Internet of Things (IoT).This results in the
generation of data sets of enormous volume and complexity called Big Data. Such data cannot be
processed and analysed using traditional data processing tools as the data is not only voluminous, but
also unstructured like our posts, instant messages and chats, photographs that we share through
various sites, our tweets, blog articles, news items, opinion polls and their comments, audio/video
chats, etc.
Big data not only represents voluminous data, it also involves various challenges like integration,
storage, analysis, searching, processing, transfer, querying and visualisation of such data. Big data
sometimes hold rich information and knowledge which is of high business value, and therefore there is
a keen effort in developing software and methods to process and analyse big data.
3
9
4
0
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
At present, in a typical household, many devices have advanced hardware (microcontrollers) and
software. These devices are used in isolation from each other, with maximum human intervention
needed for operational directions and input data.
IoT tends to bring together these devices to work in collaboration and assist each other in creating an
intelligent network of things. For example, if a microwave oven, an air conditioner, door lock, CCTV
camera or other such devices are enabled to connect to the Internet, we can access and remotely
control them on-the-go using our smartphone.
4
1
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
(A) Infrastructure as a Service
) (IaaS
The IaaS providers
ancoffer different kinds of computing infrastructure, such as servers, virtual
machines (VM), storage and backup facility, network components, operating systems or any other
hardware or software. Using IaaS from the cloud, a user can useastructure
the hardware
located
infr at
a remote location to configure, deploy and execute any software application on that cloud
infrastructure.
They can outsource the hardware and software on demand basis and pay as per the usage, thereby
they can save the cost ofre,
softwa
hardware and other infrastructures as well as the cost of setting up,
maintenance and security. Figure 2.12: Cloud Computing Services
its configuration. It provides a deployment environment for developers at a much reduced cost
lessening the complexity of buying and managing the underlying hardware and software.
Q. Introduction to Cybercrime.
Cybercrime or a computer-oriented crime is a crime that includes a computer and a network. The computer
may have been used in the execution of a crime or it may be the target. Cybercrime is the use of a computer as
a weapon for committing crimes such as committing fraud, identity theft, or breaching privacy. Cybercrime,
especially through the Internet, has grown in importance as the computer has become central to every field
like commerce, entertainment, and government. Cybercrime may endanger a person or a nation’s security and
financial health.
Cybercrime can generally be divided into two categories:
4
2
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
1. Crimes that aim at computer networks or devices. These types of crimes involve different threats (like virus,
bugs etc.) and denial-of-service (DoS) attacks.
2. Crimes that use computer networks to commit other criminal activities. These types of crimes include cyber
stalking, financial fraud or identity theft.
Hacking
Criminal hacking is the act of gaining unauthorized access to data in a computer or network. Exploiting
weaknesses in these systems, hackers steal data ranging from personal information and corporate secrets to
government intelligence. Hackers also infiltrate networks to disrupt operations of companies and governments.
Malware
Malware, or malicious software, refers to any code designed to interfere with a computer's normal functioning
or commit a cyber crime. Common types of malware include viruses, worms, trojans, and various hybrid
programs as well as adware, spyware, and ransomware.
Identity Theft
According to the FBI, identity theft occurs when someone “unlawfully obtains another individual's
personal information and uses it to commit theft or fraud”. Not all identity thefts are a result of cyber
attacks, but malware such as trojans and spyware are often used to steal personal information.
A common method for perpetrating identity theft, phishing refers to a method used by cyber criminals
to obtain confidential information using emails or texts. Scammers pose as a trusted source (often a
bank or well-known company) and trick recipients into providing personal information, such as account
passwords and social security numbers.
Social Engineering
Social engineering is the psychological manipulation of people into performing actions or divulging confidential
information. Cyber criminals use social engineering to commit fraud online. Platforms such as online dating
sites provide opportunities to initiate conversations with potential victims. Once the criminal establishes a
relationship with the target and gains their trust, the criminal asks for money or information.
4
3
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
4
4
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
4
5
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
creations. The creators and inventors are thus allowed to benefit from their creations. IP rights are the
legal rights governing the use of intellectual property.
Q. Define Copyright?
The term ‘copyright’ concerns the rights of the creators/authors of literary and artistic works. A copyright is also
called a ‘literary right’ or ‘author’s right’. Copyright gives an author exclusive rights to his creation and prevents
the copying and unauthorised publishing of his work. Copyright protection begins at the very moment a work is
created and expressed in some tangible form. Copyright protection is granted to a work that is an original
creation.
Copyright protects the following two rights of the author:
1. Economic rights i.e., the right of the owner to derive financial benefit from the use of their works by
others. For instance, the right to prohibit or authorise reproduction of the work in various forms,
the right to prohibit unauthorised translation of the work, etc.
2. Moral rights i.e., protection of non-economic interests of the author. For instance, the right to
oppose changes to work and the right to claim authorship, etc.
Q. Define Patents?
A patent is an exclusive right granted for an invention or innovation, which might be a product, a method or a
process, that introduces a novel way of doing something or offers a new technical solution to a problem. In
other words, it is a right of monopoly granted to a person who has invented:
1. a new and useful article, or
2. improvement of an existing article, or
3. a new process of making an article.
A patent is granted for inventions having industrial and commercial value. It is the exclusive right to
manufacture the new article/manufacture the article with the invented process for a limited period of time
(usually 20 years from the filing date of the application) in exchange for disclosure of the invention. A patent
owner can sell his patent or grant licence to others to exploit the same.
Sleep disorders
We love our devices so much that many of us even sleep with them. One study found that 71 percent of
smartphone owners keep their phone next to their bed at night to ensure they don’t miss a thing.
4
6
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
Another study found that over 40 percent of bedside smartphone users wakeup from noises or lighting
from notifications coming from their device.
National Sleep Foundation and Swedish researchers discovered a link between heavy cell phone use
and increased sleep disorders in both men and women.
Physical inactivity
When we’re using technology like computers, video games or TVs, we generally aren’t exercising. That’s
why there’s an increasing body of research linking the overuse of digital devices to decreasing exercise
and fitness levels.
Logically, spending more time on the couch and watching TV or playing video games reduces the time
you spend staying active. However, the link between obesity and gaming is marginally associated to
weight gain in adults
Mental Health
More than three billion people interact with each other over social media every day. While many of our
exchanges are generally harmless, overusing these services can impact our well-being. Social media
addiction is linked to a rise in mental health disorders like depression suicidal ideation, particularly in
teenagers.
Researchers made that correlation by highlighting how platforms like Facebook, Instagram, and Twitter
place higher social pressures on young people and adults that can lead to instances of cyberbullying,
increased need for approval, and general feelings of discontent.
4
7
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
4
8
Notes Compiled By -----Sehrish Majid Mob.:-7006647085
4
9