Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

Click Here to Buy Main Book Online

Computer Science with Python Programming is a textbook designed for the students of Class XI, CBSE. It covers complete course of
Computer Science. The book has been written in easy to understand language and contain ample examples. However, every attempt has
been made to keep the text as precise as possible.
The code has been tested in Python 3.x on a machine with Windows 10.
Each chapter of the book includes a variety of end-chapter exercises in the form of MCQs with answers, review questions, and
programming exercises to help readers test their knowledge. It may be stated here that the topics in the book have been written considering
the fact that some of the readers may opt Computer Science as their career.
Key Features:
Ÿ The book has sections dedicated to Computer System and Organization to help the students to understand the basics.
Ÿ Offers in-depth treatment of topics such as List, Tuples and Dictionaries.
Ÿ The book introduces Database Management System and NoSQL.
Ÿ Provides points to remember and a Glossary with definitions of the key terms at the end of each chapter which will help readers to
quickly recollect the important concepts.
Questions, given at the end of each chapter and the appendices would help students during viva and examinations.
Harsh Bhasin has done his B Tech. in Computer Science and M Tech. in Computers and is currently pursuing PhD. He qualified UGC
NET in 2012 and received the Visvesvaraya Fellowship from DIETY in 2016. He was awarded the Young Researcher’s Award by ErNet in
2012. Mr. Bhasin has authored a few papers, including those published in journals like Soft Computing. He has also authored
“Programming in C#” (2014), “Algorithm Analysis and Design” (2015) and “Theory of Computation”. He has been actively involved in
research both as an author and reviewer for ACM, Pearson, Oxford University Press, Springer etc. Mr. Bhasin was the editor in chief of the
special issue on “Applicability of Soft Computing Techniques in NP Problems,” SciEp, USA.
Professionally, Mr. Bhasin is a programmer and has been involved in the development of many Enterprise Resource Planning Systems
while being the proprietor of a firm based in Faridabad, Haryana, India. He has a vast industrial experience. He was an Assistant Professor
in Department of Computer Science, FMIT, Jamia Hamdard. He has also taught as visiting faculty in many colleges including Delhi
Technological University.
His areas of interest include Genetic Algorithms, Theory of Computation, C#, Python, Algorithms, Cellular Automata and Machine
Learning.
His personal interests include Hindi poetry and Hindustani Classical Music. Mr. Bhasin is also a blogger. You can reach him at his
Facebook page DTU Computation or via email at i_harsh_bhasin@yahoo.com.

LONDON • NEW DELHI • NAIROBI


Bangalore • Chennai • Cochin • Guwahati • Hyderabad • Kolkata • Lucknow • Mumbai
NEW AGE
Visit us at www.newagepublishers.com
COMPUTER SCIENCE
WITH

PYTHON
SUPPLEMENT
For the new topics introduced by CBSE in
the latest Syllabus issued in July, 2020

CLASS XI

Committed to Educate the Nation

IN INDIA

NEW AGE INTERNATIONAL (P) LIMITED, PUBLISHERS


LONDON • NEW DELHI • NAIROBI

Visit us at www.newagegolden.com
Dear Students
Use this free Supplement
along with the
Main Book

Click Here to Buy Main Book Online

LONDON • NEW DELHI • NAIROBI


Bangalore • Chennai • Cochin • Guwahati • Hyderabad • Kolkata • Lucknow • Mumbai
NEW AGE
Visit us at www.newagepublishers.com
COMPUTER SCIENCE WITH PYTHON
CLASS XI
New topics introduced in the Latest Syllabus Issued by CBSE for Academic Year 2020-21
Dear Teachers/Students
Please note that the CBSE has introduced new topics in the syllabus for the academic year 2020-21 in
Computer Science with Python. We have therefore added these new topics as per the latest syllabus.
TOPICS ADDED:
Unit 1: Additional Matter
• Mobile system, CPU, memory
• Types of software: Application software, System software and Utility software.
• Memory Units: bit, byte, MB, GB, TB, and PB.
Unit 2: Computational Thinking and Programming
Introduction to Problem solving: Problem solving cycle - Analysing a problem, designing algorithms
and representation of algorithm using flowchart and pseudo-code.
• Execution of a program, errors- syntax error, run-time error and logical error.
• Sort 3 numbers and divisibility of a number.
• Counting the frequency of elements in a tuple
• Dictionary: get(), update(), del(), del, clear(), fromkeys(), copy(), pop(), popitem(),
setdefault()
• Counting the frequency of elements in a list.
• Suggested programs: count the number of times a character appears in a given string
using a dictionary
• Create a dictionary with names of employees, their salary and access them.
• Introduction to Python modules: Importing math module (pi, e, sqrt, ceil, floor, pow,
fabs, sin, cos, tan); random module (random, randint, randrange), statistics module (mean,
median, mode)
Unit 3: Society, Law and Ethics
• Identity protection, confidentiality
• Intellectual property rights, plagiarism, digital rights management, and licensing
(Creative Commons, GPL and Apache), open source, open data, privacy.
• Privacy laws, fraud; cyber-crime-phishing, illegal downloads, child pornography, scams;
cyber forensics, IT Act, 2000. E-waste management: proper disposal of used electronic
gadgets.
• Identity theft, unique ids and biometrics.
• Understanding of societal issues and cultural changes induced by technology. Gender and
disability issues while teaching and using computers.
Author
(i)
CONTENTS
Class XI, CBSE, Computer Science, Revised Syllabus (2020-2021) iii
Syllabus v

UNIT 1: ADDITIONAL MATTER


Additional Matter 2
1. Sort 3 numbers 2; 2. Divisibility of a number 2; 3. Counting the frequency
of elements in a tuple 2; 4. Counting the frequency of elements in a list 3;
5. Count the number of times a character appears in a given string 3;
6. Using a dictionary, create a dictionary with names of employees, their
salary and access them 3; 7. Dictionary Functions 4; 8. Math Module 4;
9. Random module 6; 10. Statistics module 6; 11. Memory Unit 7;
12. Application Software 7; 13. System Software 7; 14. Utility Software 8

UNIT 2: COMPUTATIONAL THINKING AND PROGRAMMING


Chapter 1: Algorithmic Efficiency 10

UNIT 3: SOCIETY, LAW AND ETHICS


Chapter 2: Society, Law and Ethics 24
Chapter 3: Technology and Society 40

DEDUCTED
COMPUTER SCIENCE - 083
CLASS XI
Topic reduced
Unit I: Computer Systems and Organisation
• Encoding Schemes : UTF8, UTF32
• Concept of cloud computing and cloud services (SaaS, IaaS, PaaS), cloud (public/
private), Blockchain technology
Unit II: Computational Thinking and Programming-1
Decomposition – concept, need for decomposing a problem, examples of problem solving using
decomposition.
• Sorting algorithm: bubble and insertion sort; count the number of operations while
sorting.
Suggested Practical List Input a list of elements, sort in ascending/ descending order using
Bubble/ Insertion sort.

(ii)
CLASS XI, CBSE, COMPUTER SCIENCE,
REVISED SYLLABUS (2020-2021)

Unit I: Computer Systems and Organisation


Already in the book
Basic computer organisation: description of a computer system Section 1.1
I/O 1.2, 1.3
hard disk, battery Appendix 5
Number System: numbers in base 2, 8, 16 and binary addition Chapter 2, Appendix 3
Boolean logic: NOT, AND, OR, NAND, NOR, XOR, NOT, truth tables and De Chapter 3
Morgan’s laws, Logic circuits
Encoding Schemes : ASCII, ISCII and Unicode Chapter 4
Operating System (OS)-need for an operating system, brief introduction to Appendix 2
functions of OS, user interface

Unit II: Computational Thinking and Programming–1


Familiarization with the basics of Python programming: a simple “hello Chapter 5, 6 and 7
world" program, the process of writing a program (Interactive & Script
mode), running it and print statements; simple data-types: integer, float
and string.
• Features of Python, Python Character Set, Token & Identifiers,
Keywords, Literals, Delimiters, Operators.
• Comments: (Single line & Multiline/Continuation statements),
Clarity & Simplification of expression, Knowledge of data types
and operators: accepting input from the console, assignment
statement, expressions, operators and their precedence.
• Operators & types: Binary operators-Arithmetic, Relational
Operators, Logical Operators, Augmented Assignment Operators
Conditional statements: if, if-else, if-elif-else; simple programs: Chapter 8
e.g.: absolute value
Notion of iterative computation and control flow: for(range(),len()), Chapter 9
while, using flowcharts, suggested programs: calculation of simple and
compound interests, finding the factorial of a positive number etc.
Strings: Traversal, operations – concatenation, repetition, membership; Chapter 13
functions/methods– len(), capitalize(), title(), upper(), lower(), count(),
find(), index(), isalnum(), islower(), isupper(), isspace(), isalpha(),
isdigit(), split(), partition(), strip(), lstrip(), rstrip(), replace(); String
slicing

(iii)
Lists: Definition, Creation of a list, Traversal of a list. Operations on a Chapter 10
list - concatenation, repetition, membership; functions/methods– len(),
list(), append(), extend(), insert(), count(), index(), remove(), pop(),
reverse(), sort(), min(), max(), sum(); Lists Slicing; Nested lists; finding
the maximum, minimum, mean of numeric values stored in a list; linear
search on list of numbers
Tuples: Definition, Creation of a Tuple, Traversal of a tuple. Operations Chapter 11
on a tuple - concatenation, repetition, membership; functions/methods
– len(), tuple(), count(), index(), sorted(), min(), max(), sum(); Nested
tuple; Tuple slicing; finding the minimum, maximum, mean of values
stored in a tuple; linear search on a tuple of numbers
Dictionary: Definition, Creation, Accessing elements of a dictionary, Chapter 12
add an item, modify an item in a dictionary; Traversal, functions/
methods – len(), dict(), keys(), values(), items(), , max(), min(), count(),
sorted() copy()

Unit III: Society, Law and Ethics


Cyber safety: safely browsing the web, social networks, cyber trolls and Chapter 20
bullying
Appropriate usage of social networks: spread of rumours, and common social Section 20.3
networking sites (Twitter, LinkedIn, and Facebook) and specific usage rules.
Safely accessing web sites: adware, malware, viruses, trojans Chapter 19
• Safely communicating data: secure connections, eavesdropping,
phishing and identity verification.

(iv)
SYLLABUS
Computer Science (Revised)–[CLASS-XI, Code No. 083, 2020-21]
1. Learning Outcomes
• Ability to understand and apply basic computational thinking.
• Ability to understand the notion of data types and data structures and apply in different situations.
• Ability to appreciate the notion of an algorithm and apply its structure including how algorithms handle corner cases.
• Ability to develop a basic understanding of computer systems-architecture, operating system, mobile and cloud computing.
• Ability to work in the cyber world with understanding of cyber ethics, cyber safety and cybercrime
• Ability to make use the value of technology in societies, gender and disability issues and the technology behind biometric ids.
2. Distribution of Marks
Unit Unit Name Theory Periods
No. Marks Theory Practical
I Computer Systems and Organisation 10 10 5
II Computational Thinking and Programming-1 45 50 35
III Society, Law and Ethics 15 20 ----
Total 70 80 40
Unit I: Computer Systems and Organisation
• Basic computer organisation: description of a computer system and mobile system, CPU, memory, hard disk, I/O, battery.
• Types of software: Application software, System software and Utility software.
• Memory Units: bit, byte, MB, GB, TB, and PB.
• Boolean logic: NOT, AND, OR, NAND, NOR, XOR, NOT, truth tables and De Morgan’s laws, Logic circuits
• Number System: numbers in base 2, 8, 16 and binary addition.
• Encoding Schemes : ASCII, ISCII and Unicode
• Concept of Compiler and Interpreter
• Operating System (OS) - need for an operating system, brief introduction to functions of OS, user interface
Unit II: Computational Thinking and Programming-1
Introduction to Problem solving: Problem solving cycle - Analysing a problem, designing algorithms and representation of
algorithm using flowchart and pseudo-code.
Familiarization with the basics of Python programming: a simple “hello world" program, the process of writing a program
(Interactive & Script mode), running it and print statements; simple data-types: integer, float and string.
• Features of Python, Python Character Set, Token & Identifiers, Keywords, Literals, Delimiters, Operators.
• Comments: (Single line & Multiline/ Continuation statements), Clarity & Simplification of expression
• Introduce the notion of a variable and methods to manipulate it (concept of L-value and R-value even if not taught explicitly).
• Knowledge of data types and operators: accepting input from the console, assignment statement, expressions, operators and
their precedence.
• Operators & types: Binary operators-Arithmetic, Relational Operators, Logical Operators, Augmented Assignment
Operators.
• Execution of a program, errors- syntax error, run-time error and logical error.
• Conditional statements: if,if-else,if-elif-else;simple programs:e.g.:absolute value, sort 3 numbers and divisibility of a number.
• Notion of iterative computation and control flow: for(range(),len()), while, using flowcharts, suggested programs:
calculation of simple and compound interests, finding the factorial of a positive number etc.
• Strings: Traversal, operations – concatenation, repetition, membership; functions/methods–len(), capitalize(), title(), upper(),
lower(), count(), find(), index(), isalnum(), islower(), isupper(), isspace(), isalpha(), isdigit(), split(), partition(), strip(),
lstrip(), rstrip(), replace(); String slicing.
• Lists: Definition, Creation of a list, Traversal of a list. Operations on a list - concatenation, repetition, membership;
functions/methods–len(), list(), append(), extend(), insert(), count(), index(), remove(), pop(), reverse(), sort(), min(), max(),
sum(); Lists Slicing; Nested lists; finding the maximum, minimum, mean of numeric values stored in a list; linear search on
list of numbers and counting the frequency of elements in a list.
• Tuples: Definition, Creation of a Tuple, Traversal of a tuple. Operations on a tuple - concatenation, repetition, membership;
functions/methods – len(), tuple(), count(), index(), sorted(), min(), max(), sum(); Nested tuple; Tuple slicing; finding the

(v)
minimum, maximum, mean of values stored in a tuple; linear search on a tuple of numbers, counting the frequency of
elements in a tuple.
• Dictionary: Definition, Creation, Accessing elements of a dictionary, add an item, modify an item in a dictionary; Traversal,
functions/methods – len(), dict(), keys(), values(), items(), get(), update(), del(), del, clear(), fromkeys(), copy(), pop(),
popitem(), setdefault(), max(), min(), count(), sorted() copy(); Suggested programs : count the number of times a character
appears in a given string using a dictionary, create a dictionary with names of employees, their salary and access them.
• Introduction to Python modules: Importing math module (pi, e, sqrt, ceil, floor, pow, fabs, sin, cos, tan); random module
(random, randint, randrange), statistics module (mean, median, mode).
Unit III: Society, Law and Ethics
• Cyber safety: safely browsing the web, identity protection, confidentiality, social networks, cyber trolls and bullying.
• Appropriate usage of social networks: spread of rumours, and common social networking sites (Twitter, LinkedIn, and
Facebook) and specific usage rules.
• Safely accessing web sites: adware, malware, viruses, trojans
• Safely communicating data: secure connections, eavesdropping, phishing and identity verification.
• Intellectual property rights, plagiarism, digital rights management, and licensing (Creative Commons, GPL and Apache),
open source, open data, privacy.
• Privacy laws, fraud; cyber-crime- phishing, illegal downloads, child pornography, scams; cyber forensics, IT Act, 2000.
• Technology and society:
• understanding of societal issues and cultural changes induced by technology.
• E-waste management: proper disposal of used electronic gadgets.
• Identity theft, unique ids and biometrics.
• Gender and disability issues while teaching and using computers.
3. Practical
S.No. Area Marks (Total=30)
1. Lab Test (12 marks)
Python program (60% logic + 20% documentation + 20% code quality) 12
2. Report File + Viva (10 marks)
Report file: Minimum 20 Python programs 7
Viva voce 3
3. Project (8 marks)
(that uses most of the concepts that have been learnt See CS-XII for the rules regarding the projects)

4. Suggested Practical List


Python Programming
• Input a welcome message and display it.
• Input two numbers and display the larger/smaller number.
• Input three numbers and display the largest/smallest number.
• Given two integers x and n, compute cI.
• Write a program to input the value of x and n and print the sum of the following series:
 1 + x + x2 + x3 + x4 + ............xn
 1 – x + x2 – x3 + x4 + ......... xn
 x + x2 – x3 + x4 + ........... xn
2 3 4 n
 x + x2 – x3 + x4 + ............ xn
2! 3! 4! n!
• Determine whether a number is a perfect number, an armstrong number or a palindrome.
• Input a number and check if the number is a prime or composite number.
• Display the terms of a Fibonacci series.
• Compute the greatest common divisor and least common multiple of two integers.
• Count and display the number of vowels, consonants, uppercase, lowercase characters in string.
• Input a string and determine whether it is a palindrome or not; convert the case of characters in a string.
• Find the largest/smallest number in a list/tuple
• Input a list of numbers and swap elements at the even location with the elements at the odd location.
• Input a list/tuple of elements, search for a given element in the list/tuple.
• Input a list of numbers and test if a number is equal to the sum of the cubes of its digits. Find the smallest and largest such
number from the given list of numbers.
• Create a dictionary with the roll number, name and marks of n students in a class and display the names of students who have
marks above 75.

(vi)
Additional Matter
Additional Matter

1. Sort 3 numbers
num1=int(input('Enter the first number\t:'))
num2=int(input('Enter the second number\t:'))
num3=int(input('Enter the third number\t:'))
if(num1>num2):
if(num1>num3):
max1=num1
else:
max1=num3
else:
if(num2>num3):
max1=num2
else:
max1=num3
print('The max of the three numbers is ',max1)

2. Divisibility of a number
num1=int(input('Enter the first number\t:'))
num2=int(input('Enter the second number\t:'))
if(num1%num2==0):
print('The first number is divisible by the second number')
else:
print('The first number is not divisible by the second number')

3. Counting the frequency of elements in a tuple
L=[]
n=int(input('Enter the number of elements\t:'))
for i in range(n):
item=int(input('Enter item\t:'))
L.append(item)

2 Computer Science with Python–XI: Supplement


T=tuple(L)
item1=int(input('Enter item to be searched\t:'))
count=0
for i in T:
if i==item1:
count+=1
print(item1, ' is present ', count,' times.')

4. Counting the frequency of elements in a list.
L=[]
n=int(input('Enter the number of elements\t:'))
for i in range(n):
item=int(input('Enter item\t:'))
L.append(item)
item1=int(input('Enter item to be searched\t:'))
count=0
for i in L:
if i==item1:
count+=1
print(item1, ' is present ', count,' times.')

5. Count the number of times a character appears in a given string.


str1=input('Enter the string\t:')
item1=input('Enter the char to be searched\t:')
count=0
for i in str1:
if i==item1:
count+=1
print(item1, ' is present ', count,' times.')

6. Using a dictionary, create a dictionary with names of employees, their salary and access
them.
d1={}
n=int(input('Enter the number of employees'))
for i in range(n):
key=input(‘Enter the name\t:’)
value-int(input(‘Enter the salary\t:’))
d1[key]=value
name=input(‘Enter the name of the person whom salary you want to
access\t:’)
print(d[‘name’])

Additional Matter 3
7. Dictionary Functions
get(), update(), del(), clear(), fromkeys(), copy(), pop(), popitem(),
setdefault().
clear()
This function removes all items from the dictionary.
copy()
This function returns a shallow copy of the dictionary.
get(key[, default])
This function returns the value for key if key is in the dictionary,
else default is returned. The default value is NONE.
pop(key[, default])
If key is in the dictionary, this function removes it and returns its
value, else it returns default. If default is not given and key is
not in the dictionary, the KeyError is raised.
popitem()
This function removes and returns a (key, value) pair from the
dictionary. The pairs are returned in the LIFO order.
setdefault(key[, default])
If key is in the dictionary, this function returns its value. If not,
the insert key with a value of default is returned. It defaults to
None.
update([other])
This function updates the dictionary with the key/value pairs from
other. It overwrites the existing keys.
fromkeys(iterable[, value])
This function creates a new dictionary with keys from iterable and
values set to value.
del d[key]
This function removes d[key] from d. It raises a KeyError if key is
not in the map.

8. Math Module
The math module provides the mathematical function which are define by C standards. However
these functions cannot return a complex number. Some of the most important functions of this
module are as follows.
_____________________________________________________________________________
To run the following codes import the math module
import math
_____________________________________________________________________________

4 Computer Science with Python–XI: Supplement


math.srt(x)
This function finds the square root of x. However, you cannot pass a negative number in this
function. For example, math.sqrt(-1) will return a domain error.

math.ceil(x)
This function returns the number greater than or equal to the argument. For example,
ceil(2.67) will return 3
ceil(2.001) will return 3
ceil(-4,90) will return -4

math.floor(x)
This function returns the number less than or equal to the argument. For example,
floor(2.67) will return 2
floor(2.001) will return 2
floor(-4,90) will return -5.

math.fabs(x)
This function returns the absolute value of x. for example,
fbs(-5) returns 5
fabs(4) returns 4

math.factorial(x)
This function returns the factorial of the argument. It raises the ValueError if the argument is not
an integral or is negative.

math.pow(x, y)
This function returns x raised to the power y. It converts both its arguments to float. For
example,
pow(3,4) returns 81
pow(5,3) returns 125

sin, cos, tan


These functions find the sin, cosine and tan of the given argument. For example, in the following
functions, the argument 3.14/2 is passed and the sin, cos and tan of this value is found using the
functions.
Code:
ans_sin=math.sin(3.14/2)
ans_cos=math.cos(3.14/2)
ans_tan=math.tan(3.14/2)
print(ans_sin, ans_cos, ans_tan)

Additional Matter 5
Output:
0.9999996829318346 0.0007963267107332633 1255.7655915007897
Constants: e and pi
The math module also provides us with e and pi constants.
Code:
print(math.pi)
print(math.e)
Output:
3.141592653589793
2.718281828459045

9. Random module
This module implements pseudo-random number generators for various distributions. Some of
the most important functions of this module are as follows.
_____________________________________________________________________________
To run the following codes import the random module
import random
_____________________________________________________________________________
random.random()
This function produces a random number between 0 and 1.
random.ranrange(start, stop)
This function returns an integer between start and stop.
random.randrange(start, stop, step)
This function returns an integer between start and stop with a step. Here stop is not included.
random.randrange(start, stop, step)
This function returns an integer between start and stop. Here stop is included.
The following examples demonstrate the use of these functions.
Code:
ans1=random.random()
ans2=random.randrange(3,8)#3,4,5,6,7
ans3=random.randrange(3,56,2)#3,5,7,...
ans4=random.randint(5,9)#5,6,7,8,9
print(ans1,ans2, ans3, ans4)
Output:
0.564352337835268 6 47 6

10. Statistics module
This module helps us to find statistical metrics like mean, median and mode of a given list or
array. Some of the most important functions of this module are as follows.

6 Computer Science with Python–XI: Supplement


_____________________________________________________________________________
To run the following codes import the statistics module
import statistics
_____________________________________________________________________________
mean, median, mode
These functions find the mean, median and mode of the given list respectively.
Code:
L=[2,3,3,4,5,6,7,7,9,8,10,1,2,2,5]
ans1=statistics.mean(L)
ans2=statistics.median(L)
ans3=statistics.mode(L)
print(ans1, ans2, ans3)
Output:
4.933333333333334 5 2

11. Memory Unit
The various units of memory are as follows:
NAME EQUAL TO IN BYTES
Bit 1 bit 1/8
Byte 8 bits 1
Kilobyte 1024 bytes 1024
Megabyte 1,024 kilobytes 1,048,576
Gigabyte 1,024 megabytes 1,073,741,824
Terabyte 1,024 gigabytes 1,099,511,627,776
Petabyte 1,024 terabytes 1,125,899,906,842,624

12. Application Software


As per Techopedia
“Application software is commonly defined as any program or number of programs designed
for end-users. In that sense, any end user program can be called “application software”. People
often use the term “application software” to talk about bundles or groups of individual software
applications, using a different term, “application program,” to refer to individual applications.

13. System Software
As per Wikipedia
“System software is software designed to provide a platform for other software. Examples of
system software include operating systems like macOS, GNU/Linux, Android and Microsoft
Windows, computational science software, game engines, industrial automation, and software as
a service applications.”

Additional Matter 7
The Operating System Software and the Utility Software also come under the ambit of System
Software.

14. Utility Software
As per Wikipedia
“Utility software is software designed to help to analyze, configure, optimize or maintain a
computer. It is used to support the computer infrastructure - in contrast to application software,
which is aimed at directly performing tasks that benefit ordinary users.”
Some examples of Utility Software are as follows:
• File Management tools
• Disk Management Tools
• Tools for Compression
• The defragmenter and cleaning tools

8 Computer Science with Python–XI: Supplement


UNIT 2
Computational Thinking and Programming

Algorithmic Efficiency 9
1 Algorithmic Efficiency

LEARNING OBJECTIVES
After reading this chapter, the reader will be able to
• Understand the importance of Algorithms
• Understand the features of a good algorithm
• Understand the ways of writing an algorithm
• Understand Asymptotic notations
• Differentiate between recursive and iterative algorithms

1.1 INTRODUCTION
This chapter introduces algorithms and discusses the idea of computational complexity. Let us
begin our discussion with the meaning of the term ‘algorithm’. The word algorithm comes from
algorithmi from the tile “Algoritmi de numeroIndorum,” a book written by “Muhammad ibn
Musa al-Khwarizmi”, who was a Persian mathematician. The word was corrupted and became
“Algorism”. Finally, in the 19th century, it became algorithm. Interestingly, the book, stated
above, was on Indian numerals. Lately, the word algorithm is identified with any procedure
applied to accomplish a given computing task.
Algorithm directs how to solve a problem and there can be many algorithms to solve the same
problem. However, not all of them are equally effective and efficient. Here, the term effective is
used in the sense of correctness and efficient in terms of the memory requirement and time of
execution. Given a problem, we should aim at developing an algorithm which is correct, takes
lesser time and memory space.
Also, it is desirable that in the sequence of steps for accomplishing a task, each step should be
as basic as possible and the task should be accomplished in a finite number of steps. So, a good
algorithm should be finite and each instruction should be unambiguous.
Algorithms are implemented using programming languages. So, we first design an algorithm
and then implement it in some programming language. However, designing an algorithm cannot
be automated. It is, rather, an art. Art cannot be automated, but you can at least learn procedures
like Divide and Conquer, Backtracking, Branch and Bound, Dynamic programming, Greedy
approaches etc. Learning these approaches would not only help you in Computer Science but
would also help in other disciplines like Computational Biology, Finance etc.

10 Computer Science with Python–XI: Supplement


Algorithms are used everywhere, right from your set-top box to the machine that gathers
biometric data. The advancements in the field of algorithms has changed the life of millions. The
page rank algorithm of Larry Page has helped in the creation of Google, which is a part of our
life. The routing algorithms allowed packets to be transferred from one computer to another via
shortest paths, and helped in the advancement of communication. Likewise, the pre-processing
algorithms for MRI (Magnetic Resonance Imaging) has helped scientists to develop computer
aided techniques for the diagnosis of diseases. The conventional techniques clubbed together with
the latest advancements like Deep Learning have been able to solve many problems of the society.
This chapter has been organized as follows. Section 1.2 presents the definition and
characteristics of an Algorithm. Section 1.3 discusses pseudo-code and flow chart. Section 1.4
differentiates between recursive and iterative algorithms. Asymptotic notations and complexity
have been discussed in Sections 1.5 and 1.6 respectively. Section 1.7 presents some illustrations.
The best-case, worst-case and average-case have been discussed in section 1.8 and the last section
concludes.

1.2 ALGORITHMS: DEFINITION AND CHARACTERISTICS


Having seen the importance of algorithms, let us now move to the formal definition of Algorithms
and understand the features of a good algorithm. Algorithm is a sequence of steps used to
accomplish a given task. Some input is given to the algorithm, the algorithm processes the input
and gives some output. The most essential elements of an algorithm are:
• Input,
• Output,
• Correctness,
• Efficiency and
• Definiteness
In a given algorithm, the number of input arguments can even be zero. For example, some of
the pseudo random number generators, do not take any argument to generate a random number.
However, there must be at least one output. The first thing that should be taken care of while
designing an algorithm is its correctness. An algorithm which is not correct, is of no use. No
amount of fancy controls or sophisticated techniques can replace the correctness. Although, there
can be numerous ways to solve a given problem, not all of them are equally efficient.
The efficiency of an algorithm is also important. The algorithm should be efficient both in
terms of time and space. That is, it should take minimum possible time and minimum space. For
example, linear search and binary search are the two most important techniques of searching.
The first takes O(n) time, while the second takes O(log n) time. That is, a list having 1024
element would take time of order of 1024 units, in the case of linear search and would take time
proportional to 10 units, in the case of Binary Search. Hence, the choice of efficient algorithm is
immensely important to make an effective model.
The above discussion can be summarised as follows.

Algorithmic Efficiency 11
• Input: An algorithm takes zero or more input.
• Output: It produces at least one output.
• Correctness: It must be correct.
• Efficient: It should be efficient, both in terms of memory and space and
• Unambiguous: It should not be ambiguous.

1.3 NOTATIONS: PSEUDOCODE, FLOW CHART


In order understand the ways of writing how to write an algorithm; let us come back to the
example of Linear Search. In Linear Search, a list is searched for an item by looking for the item
iteratively, at each position of the list. The algorithm for Linear Search can, be stated as follows
(Algorithm 1). The algorithm can also be represented as a flow chart as shown in Figure 1.1.
These are the two ways of representing an algorithm. The third way of writing an algorithm can
be English like. However, this is not preferred, as it can be ambiguous.

Algorithm: Linear Search


Input: List: L
Length of the list: n
Item to be searched: item
Algorithm: Insert Item
Set i=0;
Set Flag=1;
While (i<n)
{
if (L[i]==item)
{
Print(“Item found at “,i);
Flag=1;
}
i++;
}
if(Flag==0)
{
Print(“Not found”);
}
}

12 Computer Science with Python–XI: Supplement


Linear Search: Flow Chart

Figure 1.1: Flow chart for Linear Search

Linear Search: English Like


1. Set Flag=0
2. Set the position of i to 0 and start scanning the items of the list. If the item to be searched is
found, set Flag to 1.
3. At the end of the scanning, if the element is not found set Flag to 1.
4. If Flag==0, then print “Not Found”.

1.4 STRATEGIES FOR PROBLEM SOLVING: RECURSION VERSUS ITERATION


Algorithms can be recursive or iterative. Recursion is the invocation of a function inside that
function. In order to develop a code using recursion, one must express a function in terms of itself
(with reduced values of the parameters) and should specify the base conditions.

Algorithmic Efficiency 13
For example, the nth Fibonacci term can be expressed as the sum of the (n–1)th and
(n–2)th Fibonacci terms. Since, the evaluation of nth Fibonacci term requires two previous results
of evaluation, two base conditions must be specified. The first and the second terms of this
sequences are 1 and 1. Therefore the function can be written as follows.
fib(n) = fib(n – 1) + fib(n – 2)
fib(1) = 1
fib(2) = 1
That is, to find the 5th Fibonacci term, we need to find the sum of the 4th and the 3rd term.
The 4th Fibonacci term can be found by adding the 3rd and the 2nd term. The 3rd Fibonacci term
can be found by adding the 2nd and the first term, both of which are 1. The process has been
depicted in Figure 1.2.

Figure 1.2: The evaluation of the 5th Fibonacci Term.


Though recursion provides graceful solutions and a way to define a function mathematically,
it is hard to get hold of the way problem is solved using recursion. As a matter of fact, debugging
an intricate program, that uses recursion, is difficult. Moreover, recursion is inefficient as
recursion uses function calls and hence passing parameters, transferring control etc.
However, some problems like the in-order, the pre-order and the post-order traversals of trees;
the Depth First Search (DFS) and Breadth First Search (BFS) of graphs; Binary Search, Quicksort
and Merge sort etc. can be easily solved using recursion. It may be stated here that a problem
which can be solved using recursion can also be solved iteratively.
Recursion uses run-time-stack, which provides a Last-In-First-Out (LIFO) access. In order to
understand the concept, let us consider the example of calculating factorial using recursion. The
factorial of a number can be calculated using the following formula.
fac(n) = n*fac(n – 1)
fac(1) = 1

14 Computer Science with Python–XI: Supplement


Evaluating fac(3) would require multiplying fac(2) with 3. The evaluation of fac(2) would
require multiplying fac(1) with 2. The value of fac(1) is 1. So, in the above example, fac(3) calls
fac(2) which calls fac(1). When fac(1) ends, the run-time-stack stores the location of fac(2) to
return to. Likewise, when fac(2) ends the run-time-stack stores the location of fac(3) to return to.
The run-time-stack makes backtracking easy. This is required when recursion is used.
Another example of recursion is the calculation of power of a given number. The power of
a number can be calculated using iterative algorithms as shown in program 1. In the program
the variable ‘p’ is initialized to 1. It may be stated here, that the syntax and the nitty-gritty of
programming has been introduced in the following chapters. However, the used can revisit this
section after completing the next two units. The program for finding ab is as follows:
Program
a=int(input('Enter the first number\t'))
b=int(input('Enter the second number\t:'))
p=1
i=1
while (i<=b):
p=p*a
i+=1
print(a, ' to the power of ', b, 'is ',p)
Output:
Enter the first number 2
Enter the second number :10
2 to the power of 10 is 1024
The above task can also be accomplished using recursion. The following formula can be uses
to find ‘a’ to the power of ‘b’.
ab = (ab/2)2, if b is even and
ab = (a(b–1)/2)2 × b, if b is odd
The logic has been implemented in the following program. The output follows.
Program
def pow (a, b):
if b==1:
return a
elif b%2==0:
return (pow(a, b/2)**2)
else:
return ((pow(a, int(b/2))**2)*a)
pow(5,1)
pow(5,2)

Algorithmic Efficiency 15
pow(5,3)
pow(5,4)
Output
5
25
125
625
3125

1.5 ASYMPTOTIC NOTATION


The algorithm can be analysed by considering its best and the worst case. For example, in linear
search, the best case would be finding the element at the very first position of the list. The worst
case of this algorithm would be the case where the element is found at the last position, or is not
found.
The asymptotic growth of a function can be defined in terms of its input size, for a
sufficiently large value of the input size, n. The asymptotic notations can be used to compare
the running time or the space requirement of an algorithms. The best-case running time of an
algorithm can be depicted by its lower bound and the worst-case running time can be depicted by
its upper bound. The lower bound would be henceforth represented by big omega, that is, Ω(). The
upper bound would be henceforth represented by big Oh, that is, O(). The formal definition of the
two follows.
Big O: O()
The worst-case behaviour of an algorithm is depicted by the asymptotic upper bound notation.
For any two functions f(n) and g(n)
O(g(n) ) = f(n),for all n > 0 and
f(n) ≤ c × g(n)
Omega: Ω()
The best-case behaviour of an algorithm is depicted by the asymptotic lower bound notation.
For any two functions f(n) and g(n)
Ω(g(n) ) = f(n),for all n > 0 and
f(n) ≥ c × g(n)
Theta: Θ()
The asymptotically tight bound for a function f(n) can be defined as follows. For any two
functions f(n) and g(n).
θ(g(n) ) = f(n), for all n > 0 and
c1 × g(n) ≤ f(n) ≤ c2 × g(n)
It may also be noted that,
f(n) = O(g(n)) and
f(n) = Ω(g(n))
then f(n) = θ(g(n))

16 Computer Science with Python–XI: Supplement


1.6 COMPLEXITY
The algorithm should be efficient both in terms of memory and time. That is, an algorithm should
take the least amount of space and time. In order to understand the concept, let us consider five
different algorithms to solve the same problem. Assume that the number of elements given as
input to the algorithm is n.The first algorithm takes time proportional to n to accomplish the given
task (O(n)), the second algorithm takes time proportional to n2 to do the same task (O(n2)), the
third takes time proportional to n3(O(n2)), the fourth takes time proportional to log(n) (O(log n))
and the fifth takes time proportional to n log(n) that is O(n log n). This implies that, if the number
of elements double, the time taken by the first algorithm to accomplish the given task would
double, by the second algorithm would be four times, the third algorithm 8 times, the increase in
time of the fourth would be less than the increase in the first and the increase in the time by the
fifth would be less than the increase in the second. Therefore, the order of the time complexity
would be as follows.
O(log n) < O(n) < O(n log n) < O(n2) < O(n3)
For example, linear search described in the following section takes O(n) time whereas
BinarySearch, explained in later, takes O(log n) time. Therefore, Binary Search takes lesser time
as compared to Linear Search. Likewise, the Merge-Sort takes O(n log n) time and Bubble Sort
takes O(n2) time. Therefore, Merge-sort has lesser time complexity vis-à-vis the Bubble sort and
is hence better.

1.7 ILLUSTRATIONS
In order to find the complexity of a given program, the following steps must be followed.
1. Find how many times a statement executes.
2. Find the sum of the above.
Find the upper bound, that is, O of the expression obtained in step 2.
The following illustration would help the readers to understand the process of finding
complexity.
Illustration 1.1: Write a program to find the sum of first n natural numbers. Also find its
complexity.
Solution:
Statement Frequency
n=int(input('Enter n\t:')) 1
sum1=0 1
i=1 1
while(i<=n): (n+1)
sum1+=I n
i+=1 n
print('The sum of the first ',n,' terms is \t:',sum1) 1
Total = 3n+5 = O(n)

Algorithmic Efficiency 17
Illustration 1.2: Write a program to find the sum of squares of first n natural numbers. Also
find its complexity.
Solution:
Statement Frequency
n=int(input('Enter n\t:')) 1
sum1=0 1
i=1 1
while(i<=n): (n+1)
sum1+=i*I n
i+=1 n
print('The sum of squares of the first ',n,' terms is \t:',sum1) 1
Total = 5+3n = O(n)
Illustration 1.3: Write a program to find the sum ∑ni = 1 ∑ni = 1 i × j. Also find its complexity.
Solution:
Statement Frequency
n=int(input('Enter n\t:')) 1
i=1 1
sum1=0 1
while(i<=n): (n+1)
j=1 n
while(j<=n): n×(n+1)
sum1+=i*j n×n
j+=1 n×n
i+=1 n
print(sum1) 1

Total = 6+4n + 3n2 = O(n2)


Illustration 1.4: Write a program to find 5n. Also find its complexity.
Solution:
Statement Frequency
n=int(input('Enter n\t:')) 1
f=1 1
a=5 1
pow1=1 1
i=1 1

18 Computer Science with Python–XI: Supplement


while(i<=n): (n+1)
pow1*=n n
i+=1 n
print(pow1) 1
Total = 7 + 3 × n
Illustration 1.5: Write a program to find sum ∑ni = 1 ∑nj = 1 ∑nk = 1 i × j × k. Also find its
complexity.
Solution:
Statement Frequency
n=int(input('Enter n\t:')) 1
i=1 1
sum1=0 1
while(i<=n): (n+1)
j=1 n
while(j<=n): n×(n+1)
k=1 n×n
while(k<=n): n×n×(n+1)
sum1+=i*j*k n×n×n
k+=1 n×n×n
j+=1 n×n
i+=1 n
print(sum1) 1
Complexity = O(n3)
Having learned how to find the complexity, let us move to the Best case, worst case and the
average case complexity.

1.8 BEST-CASE, WORST-CASE AND AVERAGE-CASE COMPLEXITY


Let us begin with defining the best-case, worst-case and average-case complexity.
Worst-Case Complexity
If an instance of size n is given, the maximum number of steps taken depicts the worst-case
complexity of the algorithm.
Best-Case Complexity
If an instance of size n is given, the minimum number of steps taken depicts the best-case
complexity of the algorithm.
Average-Case Complexity
If an instance of size n is given, the average number of steps taken depicts the best-case
complexity of the algorithm.

Algorithmic Efficiency 19
In order to understand the above definitions let us take an example of Linear Search. The
running time of Linear Search depends on the input. If the element to be searched is found at
the first location, the number of steps taken to accomplish the task of searching the element
in the given list is least, hence it can be considered as the best case. On the other hand, if the
element to be searched is found at the last location or is not found at all, the number of steps
taken to accomplish the task of searching the element in the given list is maximum; hence it can
be considered as the worst-case. The best-case complexity of Linear Search, is therefore O(1) and
worst-case complexity is O(n).
Another example can be that of selection sort. Note that if a sorted list is given as an input to
the program that implement Selection Sort, no swaps are required, hence such input would lead to
best-case where as an input in which maximum swaps are required, would be the worst-case, in
terms of number of swaps.

1.9 CONCLUSION
Algorithms are the set of steps used to accomplish a given task, efficiently and effectively. An
algorithm must be definite and each instruction should be unambiguous. There are many ways
of representing the steps to accomplish the given task: by simply writing the instruction in
English, by drawing the flow-chart or by writing the pseudocode. An algorithm must generate at
least one output. Moreover, a good algorithm should be efficient both in terms of memory and
computation time. The asymptotic complexity helps us to ascertain the efficiency of an algorithm.
Problem solving using algorithms is an involved process. It requires due deliberation and an
intricate analysis. Some algorithms like linear search, binary search etc. have been presented
in this chapter. Readers, new to programming, may find it difficult to get hold of some of the
procedures presented in this chapter. This chapter is a door to the fascinating world of algorithms
and problem solving and Python would be your friend in this long journey. So, let us meet our
new friend “Python”.

VERY SHORT ANSWER QUESTIONS


1. Define an algorithm
Ans. The sequence of steps required to accomplish a given task is called an algorithm.
2. What are the characteristics of an algorithm?
Ans. The characteristics of an algorithm are as follows.
(a) The algorithm should be correct.
(b) Each statement of a given algorithm must be unambiguous.
(c) The algorithm must be efficient both in terms of time and memory.
(d) It must produce an output.
(e) It should be finite.
3. What is the difference between Iterative and recursive algorithm?
Ans. A recursive algorithm calls an (or many) instance of itself. It must have a base case. The
iterative algorithm, on the other hand, does not call itself. Each recursive algorithm can be
solved iteratively also.

20 Computer Science with Python–XI: Supplement


4. What is the difference between a program and an algorithm?
Ans. An algorithm is finite whereas a programme can be infinite.
5. Define worst case complexity of an algorithm.
Ans. The worst case complexity gives the upper bound of the resources needed by the algorithm. It
finds the resources used by the algorithm in the worst case.
6. Define best case complexity.
Ans. The best case complexity gives the lower bound of the resources needed by the algorithm. It
finds the resources used by the algorithm in the best case.
7. What is the complexity of Linear Search?
Ans. The complexity of Linear Search is O(n).
8. What is the complexity of Binary Search?
Ans. The complexity of Binary Search is O(log n).
9. What is the complexity of Bubble Sort?
Ans. The complexity of Bubble Sort is O(n2).
10. What is the complexity of Selection Sort?
Ans. The Complexity of Selection Sort is O(n2).
11. What is the complexity of finding the maximum element in an array?
Ans. The complexity is O(n).
12. What is the complexity of finding the minimum element in an array?
Ans. The complexity is O(n)
13. Define O(n).
Ans. f(n) = O(g(n)), if c × g(n) ≥ f(n), n ≥ n0 .

MULTIPLE CHOICE QUESTIONS


1. An algorithm should be
(a) Definite (b) Unambiguous
(c) Both (d) None of the above
2. In which of the following algorithms, an input argument may not be required?
(a) Linear Search (b) Binary Search
(c) Pseudo Random Number Generator (d) None of the above
3. Which of the following is more efficient, if the input list is sorted?
(a) Linear Search (b) Binary Search
(c) Both are equally efficient (d) Depends on the input constraints
4. Which of the following would not work if the input array is not sorted?
(a) Linear Search (b) Binary Search
(c) Both (d) None of the above
5. In a recursive algorithm
(a) The function needs to be expressed in terms of itself
(b) The base case must be stated
(c) Both of the above
(d) None of the above

Algorithmic Efficiency 21
6. Generally, which of the following has more time complexity?
(a) Recursive algorithm (b) Iterative algorithm
(c) Both (d) None of the above
7. Which of the following represents upper bound?
(a) Big Oh notation (b) Omega notation
(c) Theta notation (d) None of the above
8. If an algorithm is O(n) then it is
(a) O(n2) (b) O(n3)
(c) O(2n) (d) All of the above
9. If an algorithm is O(n2) then it is not
(a) O(n) (b) O(n3)
(c) O(2n) (d) All of the above
10. Who was the brain behind the famous page rank algorithm?
(a) Larry Page (b) Alan Turing
(c) Trump (d) None of the above

THEORY
1. Define the term algorithm. Also state the features of a good algorithm.
2. What is space and time complexity. Also discuss the importance of the two.
3. Define the following asymptotic notations.
(a) Big Oh (b) Omega (c) Theta
4. What are the different ways of writing an algorithm?
5. Differentiate between an algorithm and a program.
6. Why should design precede implementation.
7. What are the various design approaches?
8. Discuss time memory trade off.

APPLICATION
1. Write an algorithm for Linear Search.
2. If the given list is a sorted list, an element can be searched as follows. We start with looking
at the first, last and the middle position of the list. If the element is not found at these
positions, the list is divided into two halves. If the element to be searched is less than the
element present at the mid, then the process is repeated on the left part of the list; otherwise
the process is applied on the right part. At the end a single element is left, which can be easily
checked. Write a formal algorithm for this process.
3. In the above case, if the list is divided into four parts, instead of two, write the algorithm.
4. Write an algorithm to sort a given list.
5. Write an algorithm to find the minimum element from a given list.
6. Write an algorithm to find the maximum element from a given list.
7. Write an algorithm to find the second maximum element from a given list.
8. Write an algorithm to find the sum of the elements of a given list. Also find the average,
standard deviation and the quartile deviation of the elements in the list.
9. Write an algorithm to find if a list contains repeated elements.
10. Write an algorithm to reverse a given list.

22 Computer Science with Python–XI: Supplement


Click Here to Buy Main Book Online
Computer Science with Python Programming is a textbook designed for the students of Class XI, CBSE. It covers complete course of
Computer Science. The book has been written in easy to understand language and contain ample examples. However, every attempt has
been made to keep the text as precise as possible.
The code has been tested in Python 3.x on a machine with Windows 10.
Each chapter of the book includes a variety of end-chapter exercises in the form of MCQs with answers, review questions, and
programming exercises to help readers test their knowledge. It may be stated here that the topics in the book have been written considering
the fact that some of the readers may opt Computer Science as their career.
Key Features:
Ÿ The book has sections dedicated to Computer System and Organization to help the students to understand the basics.
Ÿ Offers in-depth treatment of topics such as List, Tuples and Dictionaries.
Ÿ The book introduces Database Management System and NoSQL.
Ÿ Provides points to remember and a Glossary with definitions of the key terms at the end of each chapter which will help readers to
quickly recollect the important concepts.
Questions, given at the end of each chapter and the appendices would help students during viva and examinations.
Harsh Bhasin has done his B Tech. in Computer Science and M Tech. in Computers and is currently pursuing PhD. He qualified UGC
NET in 2012 and received the Visvesvaraya Fellowship from DIETY in 2016. He was awarded the Young Researcher’s Award by ErNet in
2012. Mr. Bhasin has authored a few papers, including those published in journals like Soft Computing. He has also authored
“Programming in C#” (2014), “Algorithm Analysis and Design” (2015) and “Theory of Computation”. He has been actively involved in
research both as an author and reviewer for ACM, Pearson, Oxford University Press, Springer etc. Mr. Bhasin was the editor in chief of the
special issue on “Applicability of Soft Computing Techniques in NP Problems,” SciEp, USA.
Professionally, Mr. Bhasin is a programmer and has been involved in the development of many Enterprise Resource Planning Systems
while being the proprietor of a firm based in Faridabad, Haryana, India. He has a vast industrial experience. He was an Assistant Professor
in Department of Computer Science, FMIT, Jamia Hamdard. He has also taught as visiting faculty in many colleges including Delhi
Technological University.
His areas of interest include Genetic Algorithms, Theory of Computation, C#, Python, Algorithms, Cellular Automata and Machine
Learning.
His personal interests include Hindi poetry and Hindustani Classical Music. Mr. Bhasin is also a blogger. You can reach him at his
Facebook page DTU Computation or via email at i_harsh_bhasin@yahoo.com.

LONDON • NEW DELHI • NAIROBI


Bangalore • Chennai • Cochin • Guwahati • Hyderabad • Kolkata • Lucknow • Mumbai
NEW AGE
Visit us at www.newagepublishers.com
UNIT 3
Society, Law and Ethics

Algorithmic Efficiency 23
2 Society, Law and Ethics

LEARNING OBJECTIVES
After reading this chapter, the reader will be able to
• Appreciate the importance of Intellectual Property Rights
• Understand plagiarism
• Understand the following cyber crimes
 Identity Thefts,
 Phishing,
 Credit Card Frauds,
 Cyber Stalking,
 Cyber Bullying and
 Illegal Downloading
• Understand the importance of e-waste management.

2.1 INTRODUCTION
Having studied programming, database and networking, let us shift our focus to society, law
and ethics. This chapter introduces you to the ethical considerations, cybercrimes and the law
dealing with such crimes. The chapter ends with the most important topics of our times: e-waste
management.
As a Computer Science student, you must understand the importance of not copying other’s
works and respect and understand Intellectual Property. You are expected to have a working
knowledge of cyber crimes and the law that deals with such crimes. Lastly, you are expected to
appreciate the problem of e-wastes and know what can be done to deal with them.
The chapter has been organized as follows. Section 2.2 discusses Plagiarism and section 2.3
introduces Intellectual Property. Section 2.4 introduces Licensing and discusses various licences.
Section 2.5 discusses Cyber Crimes. Sections 2.6 to 2.11 discusses the cyber crimes like Identity
Thefts, Phishing, Credit Card Frauds, Cyber Stalking, Cyber Bullying and Illegal Downloading.
Section 2.12 introduces the Information Technology Act 2000, its features and the 2008
amendment to the act. Section 2.13 discusses Electronic Waste Management and the last section
concludes.

24 Computer Science with Python–XI: Supplement


2.2 PLAGIARISM
Copying someone’s work or ideas is referred to as Plagiarism. According to Collins English
Dictionary (Complete and Unabridged, 12th Edition 2014 © Harper Collins Publishers)
Plagiarism is
“to appropriate ideas, passages, etc. from another work or author.”
It is equivalent to a theft. It may be noted that copying someone work on as-it-is basis is
serious but taking ideas from someone is equally problematic. As per the law “the expression of
ideas” is protected by Intellectual Property rights.
The following scenarios may lead to Plagiarism
• If you have used someone’s work and not cited it.
• If you have just paraphrased the content
• If you have copied too many words from a source
• If you are using someone’s idea without giving due acknowledgement
The reader may also note that even citing someone’s work may lead to plagiarism. In doing so,
ensure the following
• Give the quotations in quotation marks
• Do not copy many words from the source, even if it is cited
• Your work should not be only a collection of copied phrases
There is a fine line between research and plagiarism. To summarize, try to be original and cite
sources whenever used. Also, do not copy many words from a source.

2.3 INTELLECTUAL PROPERTY


According to the World Intellectual Property Organization (WIPO) website
“Intellectual Property (IP) refers to creations of the mind, such as inventions; literary and artistic
works; designs; and symbols, names and images used in commerce.”
It is protected by the law. IP helps an individual or organization get fame and other benefits
from their creations. IP can be classified as follows (Figure 2.1).

Intellectual
patent

Industrial
Copyright Patent Trademark design

Figure 2.1: Types of intellectual property.


2.3.1 Copyright
Copyright means that the owner of the work has the right to reproduce it. Copyright can be
applied to books, music, paintings, sculpture and films, to computer programs, databases,
advertisements, maps and technical drawings.

Society, Law and Ethics 25


2.3.2 Trademarks
It is a distinguishable sign for goods and services. The trademark helps the manufacturer to mark
his product.

2.3.3 Patents
It is the right given to the inventor to decide whether the invention can be used by others and the
terms of doing so.
Except for the above, Industrial designs etc. also come under the preview of IP.

2.4 LICENSING
The literal meaning of licence is to authorize the use of a thing. This section discusses some of the
most common Software Licences.

2.4.1 FOSS
FOSS is Free and Open Source Software Licence. The licence does not have any universal
definition. Different organizations define FOSS in different ways. Open Source Initiative (OSI)
is one of the organization that keeps the list of licences. Likewise, the Free Software Foundation
(FSF) keeps the list of what is free. It may be noted that there are some which are accepted by
OSI but are not free as per FSF. The OSI also keeps track of
• Price
• Type of contribution
• Origin
Different licences can be compared by the following features:
• Trademark: Whether trademark can be used
• Distribution: If it can be distributed
• Modification: Whether it can be modified
• Private Use: Whether any change in the code should be shared with the community
• Patent Grant: It guarantees the protection of licensees from patent claims by contributors
• Linking: It is the linking of code to an already licensed one.
• Sub-licensing: If signifies whether a code can be licensed under some other licence
Some of the most common licences are as follows.

2.4.2 Academic Free License


• Date of Publication: 2002
• Linking, Distribution and modification: Permissive
• Patent Grant and Private use: Yes
• Trademark Grant: No

26 Computer Science with Python–XI: Supplement


2.4.3 Apache Licence
• Date of Publication: 2002
• Linking, Distribution and modification: Permissive
• Patent Grant and Private use: Yes
• Trademark Grant: No
2.4.4 Berkeley Software Distribution (BSD)
• Date of Publication: _
• Linking, Distribution and modification: Permissive
• Patent Grant and Private use: Manually, Yes
• Trademark Grant: Manually

2.4.5 Creative Common Zero


• Date of Publication: 2009
• Linking, Distribution and modification: Public Domain
• Patent Grant and Private use: Public Domain, No
• Trademark Grant: Public Domain

2.4.6 General Public Licence (GNU)


• Date of Publication: 2007
• Linking, Distribution and modification: Copylefted
• Patent Grant and Private use: Yes
• Trademark Grant: Yes

2.5 CYBER CRIMES


The Cyber Crime involves a network and is carried out in cyber space. They include the
following:
• Identity Thefts
• Phishing
• Credit Card Frauds
• Cyber Bullying
• Stalking
• Illegal Download
• Child Pornography
• Creation of viruses
Some of the most important ones have been explained in the following sections.

2.6 IDENTITY THEFTS


Consider the following scenarios:
• Someone gets the username and password of a person and uses these credentials to pose
as the said person

Society, Law and Ethics 27


• Someone creates an account of another person and pose as the other person
• Someone uses others existing account, to pose as the person
All the above cases are referred to as Identity thefts. Identity theft is a crime in many countries. A
huge amount is stolen every year using identity thefts. It is important to spot identity thefts. One
can avoid identity thefts by taking some precautions. The hacker may get your information from
various sources: your unique ID, your stolen or thrown bank account papers, from spywares, from
websites and even from you. This information may include the details like
• Full name
• Address
• Birth date
• Unique ID
• Bank account details
• Your mother’s maiden name etc.
Your mother’s maiden name or your home town are generally used to recover passwords.

2.6.1 Types of Identity Theft


Primarily, Identity thefts can be classified as follows:
• Criminal Identify Thefts
• Employment Identity Theft
• Tax Identity Thefts
In case of a Criminal Identify Theft, the hacker commits a crime using the identity of the
other person. In the Employment Identity Theft, the hacker poses as an employee of some
organization. In Tax Identity Theft, the hacker walks off with your refund. Then there are other
types like Child Identity Thefts, Senior Identity Thefts etc.
The identity thieves use offline and online means to get your data. These include shoulder
surfing and dumpster diving. The former technique requires them to be in your vicinity. The latter
requires them to scan your garbage, including the digital one.
The primary sources of identity thefts are as follows:
• The Public Wi-Fi, which is not secure
• The websites that are not encrypted
• You may get an e-mail asking for account details, or any other personal information. In
such cases you must contact the entity from which the mail is supposedly send.
Warning signs of identity theft are as follows:
• If you do not get the mails you expect
• If you get messages from your bank regarding changes in the account information
• If you get messages from dept collectors
• From the Income Tax Department stating that you filed more than one return

28 Computer Science with Python–XI: Supplement


2.6.2 Recovery
In case of an Identity theft, the following measures would be helpful.
• Contact the organization where your data was misused and inform them about it
• File a police complaint
• Consider freezing your credit card etc., if you are sure that it is being misused.
• Change your passwords

2.6.3 Precautions
• Protect your personal information.
• Do not respond to unsolicited requests by phone, email, or online for your name,
birthdates, Social Security, or bank account number.
• Collect your mail promptly.
• Enable the security features on your mobile devices.
• Review your credit card and financial statements.
• Install firewalls and virus-detection software on your home computer.
• Use good passwords and change them periodically.

2.7 PHISHING
This technique is used to walk off with important information like the credit card numbers,
credentials and data. In this attack, the hacker poses as a trusted entity and sends e-mail, messages
etc. to lure the victim to click a link or enter his details.
This may lead to
• Identity thefts
• Installation of malware
• Ransomware attack
• Leakage of sensitive information.
The above may help the hacker to carry out purchases, get into a network or even commit a crime
by using your credentials. Though financial losses incurred by such attacks may be huge, the
access to the private network may pose a bigger challenge.

2.7.1 Phishing Techniques


Phishing can be classified as e-mail Phishing or Spear Phishing.
E-mail Phishing
In such attacks a fraudulent mail is sent to thousands of people and even if a very small amount of
recipients click on the mail, the hackers may achieve what they desired.
Spear Phishing
This type of phishing targets a specific entity. Such attacks require planning and knowledge about
organization

Society, Law and Ethics 29


2.7.2 How to Prevent Phishing
In order to prevent Phishing, one must be vigilant. One must not click on any link in a mail which
claims that your password has expired or which says that you need to enter your account details.
One must look for signs like spelling mistakes, difference in the logo of the organization from
which the mail is supposed to have come etc. in such mails.
For an organization the Two-Factor Authentication (2FA) is one of the most effective methods
for countering phishing. The employees of an organization must be trained to identify such attacks
and not clicking on external email links.

2.8 CREDIT CARD FRAUDS


In the recent past, the volume of online transactions has increased considerably. Online
transactions help us in numerous ways but there is a flip side. These make the person susceptible
to online frauds, primarily credit card frauds. Suppose a hacker gets your personal information
or bank details and using this information use your credit card. This use may involve paying for
something expensive or even using it for crimes. The hacker may get this information by various
means like phishing etc. Some of the ways to prevent these frauds are as follows.
• Do not share your pin or bank details with others
• Change your pin periodically.
• If you get a message stating that some transaction was attempted using your card and you
have not initiated the transaction, inform the competent authority
• It is better to have more credit card with lesser limit rather than having a card of larger
limit

2.9 CYBER STALKING


Cyber stalking means tracking or pestering a person or even an organization. People may gather
information which they generally use to harass the person being stalked.
Even if someone keeps track of your social media profiles with some ulterior motive, it
comes under the preview of cyber stalking. The stalker may use this information to carry out other
cyber crimes. Cyber stalking is immoral, unethical and is also a crime in some countries. This has
become a menace and needs to be taken seriously.

2.10 CYBER BULLYING


Cyber bullying or online bullying is a type of bullying using electronic means. It involves
harassing others on the internet by posting rumours or threats. It is generally repeated with intent
to harm. It has become problematic in the recent past as bullying has become systemized and the
victims generally start experiencing negative emotional responses.

30 Computer Science with Python–XI: Supplement


Cyber bullying can be classified
(a) Cyber-bantering  (b) Cyber-trickery  (c) Cyber-bulling  (d) domination
If someone says something in the heat of discussion but regrets, it is called cyber-bantering.
If he does not regret it is cyber-trickery. Cyber bullying has already been defined. If you find
facebook posts (or content on an online platform) targeting some freedom fighter or stating
something just to malign him or her, it is domination.
To summarize
• Cyber-bantering: Momentary but the person quickly regrets
• Cyber-trickery: Momentary but the person does not regret
• Cyber bullying: They go out of the way to malign someone. However, a long term
planning is missing
• Domination: They also go out if the way but with a long term planning in order to target
individuals or organizations

2.11 ILLEGAL DOWNLOADING AND DIGITAL PIRACY


Have you ever downloaded games, movies, media, TV shows etc.? In most of the cases these
downloads are illegal. Even sharing them with others or getting them from unauthorized sites is
a problematic. The above come under what is referred to as digital piracy. It may also be stated
that the mp3 files, that we download from unauthorized sites, books (which are not free) that we
download also come under piracy.
There are many files on the internet for which we do not have the permission to use. These
files come under the preview of copyright laws. The copyright laws forbid the downloading
and forwarding of such material. In general you must legally purchase the software/book or any
martial which is not free. Such laws help in preventing digital piracy also.
Downloading illegal content creates problems for the producers and artists as they are not
able to recover the cost of production, not to talk about making profits. Hence, their effort goes
unrewarded. There are legal consequences
• You may have to pay fine
• In some cases there is a provision of imprisonment
• Your computer may be exposed to harmful software

2.12 INFORMATION TECHNOLOGY ACT 2000


The Information Technology Act was notified on October, 2000. It gave recognition to
transactions done through electronic mediums. It also amended the Indian Evidence Act, 1872 and
the Bankers’ Books Evidence Act 1891. The act recognized digital signatures. The structure of the
act is as follows:
• Sections : 94
• Chapters : 13
• Schedules :4

Society, Law and Ethics 31


The act gave recognition to
• Transactions done via electronic means of communication
• Digital signatures for the authentication of any information or matters requiring legal
authentication
• Facilitate the electronic filing of documents with Government agencies
• Facilitate the electronic storage of data
• Grant legal recognition to bankers under the Evidence Act, 1891 and the Reserve Bank of
India Act, 1934, for keeping the books of accounts in electronic form.

2.12.1 Features
The main features of the act are as follows.
• All electronic contracts made through secure electronic channels are legally valid.
• Legal recognition for digital signatures.
• A procedure for the appointment of adjudicating officers for holding inquiries under the
Act is finalized
• Provision for establishing a Cyber Regulatory Appellant Tribunal under the Act.
• An appeal against the order of the Cyber Appellant Tribunal is possible only in the High
Court
• Digital Signatures will use an asymmetric cryptosystem and also a hash function
• The Act also applies to offences or contraventions committed outside India
• Senior police officers and other officers can enter any public place and search and arrest
without warrant

2.12.2 Non-applicability
The act is not applicable in the following cases
• Execution of a Power of Attorney
• Creation of Trust under the Indian Trust Act, 1882.
• Execution of a Will
• Entering into a contract for the sale of conveyance

2.12.3 Amendment 2008


The major amendments to the act were the addition of Sections 66A and 69. Section 66A was
added to the act which penalized sending “offensive messages” and Section 69 gave authorities
the power of “interception or monitoring or decryption of any information through any computer
resource”.
The amendment, passed in October 2008, also added provisions addressing the following
• Voyeurism
• Child porn
• Cyber terrorism
The details of the offences and the corresponding penalty of this act are as follows (Table 2.1).

32 Computer Science with Python–XI: Supplement


Table 2.1: The offences and penalties in the IT Act
Section Offence Details Penalty
65 Tampering with computer If the code is required to be Imprisonment up to three years,
source documents maintained by the law and a or/and with fine up to ` 200,000
person alters, destroys or hides
the code, he is liable to the
penalties
66 Hacking with computer This section applies in case of Imprisonment up to three years,
system intentional attempt to hack a or/and with fine up to `500,000
system
66B Receiving stolen computer This section applies if the person Imprisonment up to three years,
or communication device is in possession of a stolen or/and with fine up to `100,000
system
66C Using password of another This section is applicable if a Imprisonment up to three years,
person person uses others password or/and with fine up to `100,000
66D Cheating using computer This section is applicable if a Imprisonment up to three years,
resource person cheats using electronic or/and with fine up to `100,000
medium
66E Publishing private images of If images are published without Imprisonment up to three years,
others consent, this section is applicable or/and with fine up to `200,000
66F Acts of cyberterrorism This section is applicable in case Imprisonment up to life.
of cyberterrorism.
67 Publishing information which If a person publishes any Imprisonment up to five years, or/
is obscene in electronic form. material which is lascivious, this and with fine up to `1,000,000
section is applicable
67A Publishing images containing If a person publishes or transmits Imprisonment up to seven years,
sexual acts images containing a sexual or/and with fine up to `1,000,000
explicit acts.
67B Publishing child porn or If a person captures, publishes Imprisonment up to five years,
predating children online inappropriate material pertaining or/and with fine up to `1,000,000
to anyone under 18. on first conviction. Imprisonment
up to seven years, or/and with
fine up to `1,000,000 on second
conviction.
67C Failure to maintain records It is mandatory for the interme- Imprisonment up to three years,
diatory to maintain required records or/and with fine.
68 Failure/refusal to comply The refusal to comply with Imprisonment up to three years,
with orders the orders of the competent or/and with fine up to `200,000
authority. Any person who fails
to comply with any such order
shall be guilty of an offence.
69 Failure/refusal to decrypt It is mandatory to decrypt data, is Imprisonment up to seven years
data required and possible fine.
70 Securing access or This may also attract penalties. Imprisonment up to ten years, or/
attempting to secure access and with fine.
to a protected system
71 Misrepresentation Imprisonment up to three years,
or/and with fine up to `100,000

Society, Law and Ethics 33


2.13 ELECTRONIC WASTE MANAGEMENT
In the recent past we have switched to electronic devices for practically all our needs. These
devices are efficient and effective. However, there is a flip side of this development. When these
devices become unusable, they may create hazardous wastes. The waste created by electronic
devices, when they become unusable is called electronic waste. According to Waste Electrical
and Electronic Equipment Directive, which is a European community directive on waste
electrical and electronic equipment, these e-wastes can be classified as follows:
• Large household appliances
• Small household appliances
• IT and telecommunications equipment
• Consumer equipment
• Lighting equipment
• Electrical and electronic tools
• Toys, leisure and sports equipment
• Medical devices
• Monitoring and control instruments and
• Automatic dispensers
Attempts are being made all over the world to collect, recycle and refurbish the e-wastes.
However, it may be stated that not all the e-wastes can be recycled. For example, it is practically
impossible to completely reuse a Cathode Ray Tube. The problem is real. According to reports,
every year 15 million tons of e-waste is produced, out of which only 15–20 percent gets recycled.
The process of recycle may include breaking, removal of some parts, shredding, low
temperature melting, depending upon the device. Table 2.2 shows the processes used in disposing
of e-wastes.
Table 2.2: E-waste management
Device Process
Plastics from devices like keyboards, printers, etc. • Shredding
• Low temp
• Breaking
Cathode Ray Tubes (CRT) • Removal of yoke
• Dumping
• De-soldering
Printed Circuit Board (PCB) • Removal of computer chips
• Open burning
Wires • Open burning
• Chemical stripping
Chips
• Burning

34 Computer Science with Python–XI: Supplement


The e-wastes pose threat to
• The environment
• People working in e-waste management plants
• The regions in which they are dumped.

2.14 CONCLUSION
This chapter introduced plagiarism and IP. The students must make sure that they do not copy
their assignments ever in the lives. This will help them in being innovative and develop their
writing skills from the very beginning. This chapter also discussed various cyber crimes and their
effects. These are dealt-with in the Information Technology act. The act and its amendments are
also discussed in the chapter. Lastly, this chapter discussed the menace of e-wastes.
It may be stated that the Chapter 3 takes the discussion forward. The following topic has been
discussed in the Chapter 3.
Chapter 3: Technology and Society

VERY SHORT ANSWER QUESTIONS


1. What is Plagiarism?
Ans. According to Collins English Dictionary Plagiarism is “to appropriate ideas, passages, etc.
from another work or author.”
2. What is Intellectual Property?
Ans. According to the World Intellectual Property Organization (WIPO) website “Intellectual
Property (IP) refers to creations of the mind, such as inventions; literary and artistic works;
designs; and symbols, names and images used in commerce.”
3. What is FOSS?
Ans. FOSS is Free and Open Source Software Licence.
4. What is OSI in reference to IP?
Ans. OSI is Open Source Initiative.
5. What is FSF in reference to IP?
Ans. FSF is Free Software Foundation
6. What are the major types of IP?
Ans. Some of the most important types of IP are
(a) Copyright
(b) Patent
(c) Trademark
(d) Industrial Design

Society, Law and Ethics 35


7. Does Apache Licence Provide trademark grant?
Ans. Yes it does.
8. What type of Trademark grant is provided by Creative Commons Zero?
Ans. It provides grant of the type Public Domain.
9. Does GNU general Public licence provide the right of modification?
Ans. Yes it does.
10. When the Information Technology Act was first notified?
Ans. The Information Technology Act was notified on October, 2000.
11. What was the purpose of the IT Act?
Ans. It gave recognition to transactions done through electronic mediums. The act also recognized
digital signatures.
12. How many sections are there in the IT Act?
Ans. The IT Act has 94 sections.
13. State the cases where in the IT Act is not applicable.
Ans. The act is not applicable in the following cases:
• Execution of a Power of Attorney
• Creation of Trust under the Indian Trust Act, 1882.
• Execution of a Will
• Entering into a contract for the sale of conveyance
14. All the e-wastes can be managed. True/ False?
Ans. False. There are many types of e-wastes which cannot be completely destroyed.
15. What are the most effective ways to handle e-wastes?
Ans. Recycle and reuse are the two most important ways to handle e-wastes.
16. Define Cyber Crimes and give examples.
Ans. The Cyber Crime involves a network and is carried out in cyber space. They include the
following:
• Identity thefts
• Phishing
• Credit card frauds
• Cyber Bullying
• Stalking
• Illegal Download
• Child Pornography
• Creation of viruses
17. What is Phishing?
Ans. This technique is used to walk off with important information like the credit card numbers,
credentials and data. In this attack, the hacker poses as a trusted entity and sends e-mail,
messages etc. to lure the victim to click a link or enter his details.

36 Computer Science with Python–XI: Supplement


18. What is E-mail Phishing?
Ans. In such attacks a fraudulent mail is sent to thousands of people and even if a very small
amount of recipients click on the mail, the hackers may achieve what they desired.
19. What is Spear Phishing?
Ans. This type of phishing targets a specific entity. Such attacks require planning and knowledge
about organization.
20. Downloading an unauthorized copy of a movie is illegal. True/ False?
Ans. True.

MULTIPLE CHOICE QUESTIONS


1. Which of the following constitute plagiarism?
(a) If you have used someone’s work and not cited it.
(b) If you have just paraphrased the content
(c) If you have copied too many words from a source
(d) If you are using someone’s idea without giving due acknowledgement
(e) All of the above
2. Which of the following gives the owner right to reproduce it?
(a) Copyright (b) Trademark
(c) Patent (d) All of the above
3. Which of the following is not maintained by FSF?
(a) Code (b) Content
(c) Price (d) None of the above
4. How many chapters are there in the IT Act?
(a) 94 (b) 13
(c) 4 (d) None of the above
5. How many schedules are there in the IT Act?
(a) 94 (b) 13
(c) 4 (d) None of the above
6. The IT Act gave recognition to
(a) transactions done via electronic means of communication
(b) digital signatures for the authentication of any information or matters requiring legal
authentication
(c) electronic storage of data
(d) All of the above
7. When was the IT Act amended?
(a) 2004 (b) 2008
(c) 2014 (d) 2019

Society, Law and Ethics 37


8. Which sections were added to the IT Act in 2008?
(a) 66A (b) 69
(c) both (d) None of the above
9. Which of the following does not come under the category of Cyber Crime?
(a) Identity Theft
(b) Phishing
(c) Cyber Bullying
(d) All of the above are cyber crimes
10. Which of the following does not come under the category of Cyber Crime?
(a) Stalking
(b) Child Pornography
(c) Spreading viruses
(d) All of the above are cyber crimes

THEORY
1. Define Plagiarism. Write a note on the types of Plagiarism.
2. How can you avoid Plagiarism?
3. Define IP and state its types.
4. What does OSI cover?
5. What is the difference between OSI and FSF?
6. Compare Apache, GNU and Creative Commons.
7. State the features of IT Act.
8. When was IT Act modified and what were the amendments?
9. Explain the structure of the IT Act.
10. Explain sections 66A and 69 of the 2008 amendments to the IT Act.
11. What is Electronic Waste management?
12. How are e-wastes classified?
13. State the motivation behind e-waste management. What are the steps being taken to handle
the problem of e-wastes?
14. State how are the following e-wastes handled?
(a) Plastics (b) CRT
(c) Wires (d) PCB
(e) Chip
15. State the problems posed by e-waste management?
16. Explain recycle, reuse and refurbish.

38 Computer Science with Python–XI: Supplement


17. What is Phishing? Write a short note on its implications.
18. Write a short note on how to prevent phishing.
19. What are Credit Card Frauds? How can you prevent them?
20. What is Cyber Stalking? Is it illegal? Write a short note on the menace of Cyber Stalking.
21. Define Cyber Bullying. Write a short note on the implications of Cyber Bullying.
22. Differentiate between Cyber-bantering, Cyber-trickery, Cyber bullying and Domination.
23. What is Digital Piracy?
24. What is the problem with downloading content illegally?
25. What is Identity theft?

Society, Law and Ethics 39


Click Here to Buy Main Book Online
Computer Science with Python Programming is a textbook designed for the students of Class XI, CBSE. It covers complete course of
Computer Science. The book has been written in easy to understand language and contain ample examples. However, every attempt has
been made to keep the text as precise as possible.
The code has been tested in Python 3.x on a machine with Windows 10.
Each chapter of the book includes a variety of end-chapter exercises in the form of MCQs with answers, review questions, and
programming exercises to help readers test their knowledge. It may be stated here that the topics in the book have been written considering
the fact that some of the readers may opt Computer Science as their career.
Key Features:
Ÿ The book has sections dedicated to Computer System and Organization to help the students to understand the basics.
Ÿ Offers in-depth treatment of topics such as List, Tuples and Dictionaries.
Ÿ The book introduces Database Management System and NoSQL.
Ÿ Provides points to remember and a Glossary with definitions of the key terms at the end of each chapter which will help readers to
quickly recollect the important concepts.
Questions, given at the end of each chapter and the appendices would help students during viva and examinations.
Harsh Bhasin has done his B Tech. in Computer Science and M Tech. in Computers and is currently pursuing PhD. He qualified UGC
NET in 2012 and received the Visvesvaraya Fellowship from DIETY in 2016. He was awarded the Young Researcher’s Award by ErNet in
2012. Mr. Bhasin has authored a few papers, including those published in journals like Soft Computing. He has also authored
“Programming in C#” (2014), “Algorithm Analysis and Design” (2015) and “Theory of Computation”. He has been actively involved in
research both as an author and reviewer for ACM, Pearson, Oxford University Press, Springer etc. Mr. Bhasin was the editor in chief of the
special issue on “Applicability of Soft Computing Techniques in NP Problems,” SciEp, USA.
Professionally, Mr. Bhasin is a programmer and has been involved in the development of many Enterprise Resource Planning Systems
while being the proprietor of a firm based in Faridabad, Haryana, India. He has a vast industrial experience. He was an Assistant Professor
in Department of Computer Science, FMIT, Jamia Hamdard. He has also taught as visiting faculty in many colleges including Delhi
Technological University.
His areas of interest include Genetic Algorithms, Theory of Computation, C#, Python, Algorithms, Cellular Automata and Machine
Learning.
His personal interests include Hindi poetry and Hindustani Classical Music. Mr. Bhasin is also a blogger. You can reach him at his
Facebook page DTU Computation or via email at i_harsh_bhasin@yahoo.com.

LONDON • NEW DELHI • NAIROBI


Bangalore • Chennai • Cochin • Guwahati • Hyderabad • Kolkata • Lucknow • Mumbai
NEW AGE
Visit us at www.newagepublishers.com
3 Technology and Society

LEARNING OBJECTIVES
After reading this Chapter, the reader will be able to
• Appreciate the relation between Technology and Society
• Understand how technology affects society
• Understand how society affects technology

3.1 INTRODUCTION
Technology impacts society and vice-versa. The importance of technological advancements can
be understood by the following examples (Figure 3.1(a) and (b)).
• The technological advancements in medicine helped us in our fight against diseases.
• The advancements in robotics and AI have helped us in making things easy, efficient and
effective.
• The advancements in printing technology has helped in the spread of education.
• The advent of internet and internet working has helped us in numerous ways.

The The
invention of Internet
the wheel

Neolithic The
Revolution telephone

Development of Printing press


basic tools.

Figure 3.1(a): Technological advancements I Figure 3.1(b): Technological advancements II

40 Computer Science with Python–XI: Supplement


So, technological advancements help the society. However, there is another side of the
story. The technological advancements are due to conducive atmosphere, respect for science and
a desire to grow. These are facilitated by the society. So technology and society are dependent
(Figure 3.2). There is an academic discipline called Science and Technology Studies dedicated to
understanding the relationship between the two.

Society Technology

Figure 3.2: Science and Technology are Related


Technological advancement has some other benefits also. These include
Ease: Technological advancements make this easy. For example, the development of
e-market has provided the customers with a wide-variety of choices, availability and opportunity
to buy things at great discounts.
Business: Now a person can sell his products anywhere in the world. This has facilitated
business.
Easy and secure transactions: The e-commerce web sites and some apps have facilitated
easy and secure transactions.
The advancement in technology has its flip side also. Some of the problems include:
• Technology has permitted the rise of a leisure class.
• Technological processes may produce unwanted by-products
• Most of the processes deplete natural resources.
• Rise of the notion of efficiency in terms of human productivity, and the challenges of
bioethics.
This Chapter introduced the reader to technology and society.

Technology and Society 41


Click Here to Buy Main Book Online
Computer Science with Python Programming is a textbook designed for the students of Class XI, CBSE. It covers complete course of
Computer Science. The book has been written in easy to understand language and contain ample examples. However, every attempt has
been made to keep the text as precise as possible.
The code has been tested in Python 3.x on a machine with Windows 10.
Each chapter of the book includes a variety of end-chapter exercises in the form of MCQs with answers, review questions, and
programming exercises to help readers test their knowledge. It may be stated here that the topics in the book have been written considering
the fact that some of the readers may opt Computer Science as their career.
Key Features:
Ÿ The book has sections dedicated to Computer System and Organization to help the students to understand the basics.
Ÿ Offers in-depth treatment of topics such as List, Tuples and Dictionaries.
Ÿ The book introduces Database Management System and NoSQL.
Ÿ Provides points to remember and a Glossary with definitions of the key terms at the end of each chapter which will help readers to
quickly recollect the important concepts.
Questions, given at the end of each chapter and the appendices would help students during viva and examinations.
Harsh Bhasin has done his B Tech. in Computer Science and M Tech. in Computers and is currently pursuing PhD. He qualified UGC
NET in 2012 and received the Visvesvaraya Fellowship from DIETY in 2016. He was awarded the Young Researcher’s Award by ErNet in
2012. Mr. Bhasin has authored a few papers, including those published in journals like Soft Computing. He has also authored
“Programming in C#” (2014), “Algorithm Analysis and Design” (2015) and “Theory of Computation”. He has been actively involved in
research both as an author and reviewer for ACM, Pearson, Oxford University Press, Springer etc. Mr. Bhasin was the editor in chief of the
special issue on “Applicability of Soft Computing Techniques in NP Problems,” SciEp, USA.
Professionally, Mr. Bhasin is a programmer and has been involved in the development of many Enterprise Resource Planning Systems
while being the proprietor of a firm based in Faridabad, Haryana, India. He has a vast industrial experience. He was an Assistant Professor
in Department of Computer Science, FMIT, Jamia Hamdard. He has also taught as visiting faculty in many colleges including Delhi
Technological University.
His areas of interest include Genetic Algorithms, Theory of Computation, C#, Python, Algorithms, Cellular Automata and Machine
Learning.
His personal interests include Hindi poetry and Hindustani Classical Music. Mr. Bhasin is also a blogger. You can reach him at his
Facebook page DTU Computation or via email at i_harsh_bhasin@yahoo.com.

LONDON • NEW DELHI • NAIROBI


Bangalore • Chennai • Cochin • Guwahati • Hyderabad • Kolkata • Lucknow • Mumbai
NEW AGE
Visit us at www.newagepublishers.com

You might also like