0% found this document useful (0 votes)
6 views

IpNotes

The document outlines a curriculum focused on data handling using Pandas, SQL database querying, computer networks, and societal impacts of technology. It includes detailed instructions on creating and manipulating Series and DataFrames in Pandas, as well as SQL functions and network concepts. Additionally, it addresses the societal implications of technology, including digital footprints and cyber laws.

Uploaded by

shadownexus777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

IpNotes

The document outlines a curriculum focused on data handling using Pandas, SQL database querying, computer networks, and societal impacts of technology. It includes detailed instructions on creating and manipulating Series and DataFrames in Pandas, as well as SQL functions and network concepts. Additionally, it addresses the societal implications of technology, including digital footprints and cyber laws.

Uploaded by

shadownexus777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 72

Distribution of Marks

Unit 1: Data Handling using Pandas –I (25)

Introduction to Python libraries- Pandas, Matplotlib. Data structures in Pandas -


Series and Data Frames.

Series: Creation of Series from – array, dictionary, scalar value; mathematical


operations; Head and Tail functions; Selection, Indexing and Slicing.

Data Frames: creation - from dictionary of Series, list of dictionaries, Text/CSV


files; display; iteration; Operations on rows and columns: add, select, delete, rename;
Head and Tail functions; Indexing using Labels, Boolean Indexing;

Importing/Exporting Data between CSV files and Data Frames.

Data Visualization
Purpose of plotting; drawing and saving following types of plots using Matplotlib
– line plot, bar graph, histogram

Customizing plots: adding label, title, and legend in plots.

Unit 2: Database Query using SQL (25)


Math functions: POWER (), ROUND (), MOD ().

Text functions: UCASE ()/UPPER (), LCASE ()/LOWER (), MID ()/SUBSTRING
()/SUBSTR (), LENGTH (), LEFT (), RIGHT (), INSTR (), LTRIM (), RTRIM (), TRIM ().

Date Functions: NOW (), DATE (), MONTH (), MONTHNAME (), YEAR (), DAY (),
DAYNAME ().

Aggregate Functions: MAX (), MIN (), AVG (), SUM (), COUNT (); using COUNT (*).

Querying and manipulating data using Group by, Having, Order by.

Unit 3: Introduction to Computer Networks (10)


Introduction to networks, Types of network: LAN, MAN, WAN.

Network Devices: modem, hub, switch, repeater, router, gateway

Network Topologies: Star, Bus, Tree, Mesh.

Introduction to Internet, URL, WWW, and its applications- Web, email, Chat, VoIP.

Website: Introduction, difference between a website and webpage, static vs dynamic


web page, web server and hosting of a website.

Web Browsers: Introduction, commonly used browsers, browser settings, add-ons and
plug-ins, cookies.
Unit 4: Societal Impacts (10)
Digital footprint, net and communication etiquettes, data protection, intellectual property
rights (IPR), plagiarism, licensing and copyright, free and open source software (FOSS),
cybercrime and cyber laws, hacking, phishing, cyber bullying, overview of Indian IT Act.

E-waste: hazards and management.

Awareness about health concerns related to the usage of technology.

Unit-1

DIFFERENT WAYS TO CREATE A SERIEs

1) SEQUENCE
2) NDARRAY
3) DICTIONARY
4) SCALER VALUES

CREATING A SERIES USING SEQENCE

import numpy as np

import pandas as pd

s1=pd.Series([4,6,8,10])

print(s1)

0 4
1 6
2 8
3 10
dtype: int64

CREATING A SERIES USING DIFFERENT WORDS

s2=pd.Series(["i","am","a","girl"])

print(s2)

0 i
1 am
2 a
3 girl
dtype: object
CREATING A SERIES USING A WORD

s3=pd.Series("hello")

print(s3)
0 hello
dtype: object

USE OF ARANGE FUNCTION


np1=np.arange(3,13,3.5)

print(np1)

[ 3. 6.5 10. ]

CREATING A SERIES USING ARANGE FUNCTION(NDARRAY)


np1=np.arange(3,13,3.5)

s4=pd.Series(np1)

print(s4)
0 3.0
1 6.5
2 10.0
dtype: float64

CREATING A SERIES USING LINSPACE(DISPLAY 6 ELEMENTS WITHIN THE RANGE


OF 24 TO 60 AND DISTANCE WILL BE MAINTAINED ACCORDINGLY

s5=pd.Series(np.linspace(24,60,6))

print(s5)
0 24.0
1 31.2
2 38.4
3 45.6
4 52.8
5 60.0
dtype: float64
CREATING A SERIES HAVING REPETED VALUES N NO NUMBER OF
TIMES USING TILE FUNCTION

s6=pd.Series(np.tile([3,5],2))

print(s6)
0 3
1 5
2 3
3 5
dtype: int64

CREATING A SERIES USING DICTIONARY

s7=pd.Series({'jan':31,'feb':28})

print(s7)
jan 31
feb 28
dtype: int64

CREATING A SERIES USING FIXED VALUE(SCALER VALUES) AND


SPECIFIYING INDEX

s8=pd.Series(15,index=['a','b','c'])

print(s8)
a 15
b 15
c 15
dtype: int64

CREATING A SERIES USING FIXED VALUE AND SPECIFIYING


INDEX

s9=pd.Series("hello",index=['a','b','c'])

print(s9)
a hello
b hello
c hello
dtype: object

CREATING A SERIES USING FIXED VALUE AND SPECIFIYING INDEX


s10=pd.Series(index=['a','b','c'],data="welcome")

print(s10)
a welcome
b welcome
c welcome
dtype: object

CREATING A SERIES USING LIST(SPECIFY DATA AND INDEX)

a=[30,29,38]

b=["j","k","l"]

s11=pd.Series(index=a,data=b)

print(s11)
30 j
29 k
38 l
dtype: object

CREATING A SERIES USING MATHEMATICAL FUNCTION

b1=["j","k","l","m","n","o"]

a=[30,29,38]

s12=pd.Series(index=b1,data=a*2)

print(s12)
j 30
k 29
l 38
m 30
n 29
o 38
dtype: int64

CREATING A SERIES USING DATA WITH THE HELP OF ARANGE FUNCTION AND
SPECIFY THE INDEX AS WELL

a=np.arange(9,12)

b=["j","k","l"]

s13=pd.Series(index=a,data=b)

print(s13)
9 j
10 k
11 l
dtype: object

SERIES ATTRIBUTES

TO GET THE INDEX OF THE SERIES

a=np.arange(9,12)

b=["j","k","l"]

s13=pd.Series(index=a,data=b)

print(s13)
9 j
10 k
11 l
dtype: object

print(s13.index)
Int64Index([9, 10, 11], dtype='int64')

TO GET THE VALUES

print(s13.values)
['j' 'k' 'l']
TO GET THE DATATYEP OF SERIES

print(s13.dtype)
object

TO GET HOW MANY ELEMENTS IN A SERIES

print(s13.shape)
(3,)

TO GET THE NUMBER OF BYTES OCCUPIED BY A SERIES

print(s13.nbytes)
24

TO GET THE NUMBER OF ELEMENTS

print(s13.size)
3

CHECK WHETHER THE SERIES IS EMPTY OR NOT

print(s13.empty)
False

CREATING A SERIES HAVING NAN VALUES

s14=pd.Series([6.5,np.NaN,2.34])

print(s14)
0 6.50
1 NaN
2 2.34
dtype: float64
WORKING/ PERFORMING OPERATIONS WITH SERIES

RETRIEVE PARTICULAR ELEMENT FROM A SERIES METIONING THE INDEX

s14=pd.Series([6.5,np.NaN,2.34])

print(s14)
0 6.50
1 NaN
2 2.34
dtype: float64

print(s14[0])
6.5

RETRIEVE SLICES FROM A SERIES (MENTIONING STARTING AND ENDING INDEX-1

print(s14[0:2])
0 6.5
1 NaN
dtype: float64

RETRIEVE SLICES FROM A SERIES (MENTIONING STARTING AND ENDING INDEX-1

print(s14[0:3])
0 6.50
1 NaN
2 2.34
dtype: float64

RETRIEVE SLICES FROM A SERIES (MENTIONING STARTING INDEX, TILL END,


WITH A GAP OF 2)

print(s14[0::2])
0 6.50
2 2.34
dtype: float64

RETRIVE SLICES FROM A SERIES IN REVERSE ORDER(NO STARTING ,NO ENDING


INDEX)

print(s14[: :-1])
2 2.34
1 NaN
0 6.50
dtype: float64

CHANGE THE VALUE OF A PARTICULAR ELEMENT IN A SERIES

s14[1]=50

print(s14)
0 6.50
1 50.00
2 2.34
dtype: float64

CHANGING THE INDEX OF THE SERIES

s14.index=['a','b','c']

print(s14)
a 6.50
b 50.00
c 2.34
dtype: float64

CHANGING THE ELEMENT FROM THE GIVEN INDEX TILL END

s14[1:]=0

print(s14)
a 6.5
b 0.0
c 0.0
dtype: float64

TO RETRIEVE FIRST 2 ELEMENTS

print(s14.head(2))
a 6.5
b 0.0
dtype: float64

TO RETRIEVE FIRST 5 ELEMENTS(by default head function will retrieve first 5


elements

print(s14.head())
a 6.5
b 0.0
c 0.0
dtype: float64

RETRIEVE LAST 2 ELEMENTS

print(s14.tail(2))

b 0.0
c 0.0
dtype: float64

PRINT THE WHOLE SERIES

print(s14)
a 6.5
b 0.0
c 0.0
dtype: float64

CHECK WHETHER ALL THE ELEMENTS OF A SERIES ARE GREATER THAN 5 OR NOT

print(s14>5)
a True
b False
c False
dtype: bool

RETRIVE THOSE ELEMENTS WHICH ARE GREATER THAN 5

print(s14[s14>5])

a 6.5
dtype: float64

CHANGING A PARTICULAR ELEMENT AFTER MENTIONING INDEX

s14[1]=20

print(s14)
a 6.5
b 20.0
c 0.0
dtype: float64

CHANGING A PARTICULAR ELEMENT AFTER MENTIONING INDEX

s14[2]=3

print(s14)
a 6.5
b 20.0
c 3.0
dtype: float64

performing mathematical operation on a series

a=[30,29,38]

b=["j","k","l"]

s11=pd.Series(index=b,data=a)
print(s11)
j 30
k 29
l 38
dtype: object

print(s11+2)
j 32
k 31
l 40
dtype: object

note;- same way we can do subtraction, multiplication and division

print(s11-2)

print(s11*2)

print(s11/2)

print(s11**2) (IT WILL CALCULATE THE POWER)


j 900
k 841
l 1444
dtype: object

ARRANGING THE ELEMENTS OF A SERIES IN ASCENDING ORDER

print(s14.sort_values())

c 3.0
a 6.5
b 20.0
dtype: float64

ARRANGING THE ELEMENTS OF A SERIES IN DESENCING ORDER

print(s14.sort_values(ascending=False))
b 20.0
a 6.5
c 3.0
dtype: float64

ARRANGING THE INDEX OF A SERIES IN DESCENDING ORDER

print(s14.sort_index(ascending=False))
c 3.0
b 20.0
a 6.5
dtype: float64

different ways to create a dataframe

import pandas as pd

print("creating a dataframe from a 2 D dict having values as dictionary object ")

x2={'yrs1':{'q1':1000,'q2':2000,'q3':3000},'yrs2':{'q1':1500,'q2':1800,'q3':2300}}

df1=pd.DataFrame(x2)

print(df1)

print("\n")

creating a data frame from a 2 D dictionary having


values as dictionary object
yrs1 yrs2
q1 1000 1500
q2 2000 1800
q3 3000 2300

print("creating a dataframe from a list of dictionary")

x5={'yrs1':1000,'yrs2':1500}

x6={'yrs1':2000,'yrs2':1800}

x7={'yrs1':3000,'yrs2':2300}
lst2=[x5,x6,x7]

df3=pd.DataFrame(lst2,index=['q1','q2','q3'])

print(df3)

print("\n")

creating a dataframe from a list of dictionary


yrs1 yrs2
q1 1000 1500
q2 2000 1800
q3 3000 2300

x3={'q1':1000,'q2':1500,'q3':1800}

x4={'q1':1200,'q2':1800,'q3':2000}

lst1=[x3,x4]

df2=pd.DataFrame(lst1)

print(df2)

q1 q2 q3
0 1000 1500 1800
1 1200 1800 2000

dict1={'yrs1':1500,'yrs2':1200}

dict2={'yrs1':800,'yrs4':500}

dict3={'i':dict1,'ii':dict2}

df4=pd.DataFrame(dict3)

print(df4)

i ii
yrs1 1500.0 800.0

yrs2 1200.0 NaN

yrs4 NaN 500.0

print("\n")

print("creating a dataframe from a 2 D dict having values as list ")

x5={'name':['nidhi','kavita','sarita'],'section':['a','b','c']}

df4=pd.DataFrame(x5)

print(df4)

print("\n")

creating a dataframe from a 2 D dict having values as


list
name section
0 nidhi a
1 kavita b
2 sarita c

creating a datafram from a 2 D list

lst1=[[2,3],[3,4],[5,6]]

df7=pd.DataFrame(lst1,index=['row1','row2','row3'])

print(df7)

0 1

row1 2 3

row2 3 4

row3 5 6
print("creating a dataframe from a 2 D dict having values as list and given the
index as per user requirement")

x5={'name':['nidhi','kavita','sarita'],'section':['a','b','c']}

df5=pd.DataFrame(x5,index=[1001,1002,1003])

print(df5)

creating a dataframe from a 2 D dict having values as


list and given the index as per user requirement
name section
1001 nidhi a
1002 kavita b
1003 sarita c

print("\n")

print("creating a dataframe from a 2 D list ")

lst6=[[1,2],[3,4],[5,6]]

df6=pd.DataFrame(lst6)

print(df6)

print("\n")
creating a dataframe from a 2 D list
0 1
0 1 2
1 3 4
2 5 6

print("\n")

print("creating a dataframe from a 2 D dict with values as series object")

s1=pd.Series([10,20,30])

s2=pd.Series([30,60,70])

x8={'yrs1':s1,'yrs2':s2}
df7=pd.DataFrame(x8)

print(df7)

print("\n")

creating a dataframe from a 2 D dict with values as


series object
yrs1 yrs2
0 10 30
1 20 60
2 30 70

creating a datafram from another dataframe

s1=pd.Series([10,20,30])

s2=pd.Series([14,15,16])

df9={'section 1':s1,'section 2':s2}

df10=pd.DataFrame(df9)

print(df10)

section 1 section 2

0 10 14

1 20 15

2 30 16

DATAFRAME ATTRIBUTES

import pandas as pd

lst1=[1500,1800,1200]

lst2=[1000,2000,3000]

lst3=[lst1,lst2]
df1=pd.DataFrame(lst3,columns=['yrs1','yrs2','yrs3'],index=['half','annual'])

print(df1)
yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

print('\n')

print('indexs are')

print(df1.index)
indexs are
Index(['half', 'annual'], dtype='object')

print('\n')

print('columns are')

print(df1.columns)

columns are
Index(['yrs1', 'yrs2', 'yrs3'], dtype='object')

print('\n')

print('axes are')

print(df1.axes)
axes are
[Index(['half', 'annual'], dtype='object'),
Index(['yrs1', 'yrs2', 'yrs3'], dtype='object')]

print('\n')

print('datatypes are')
print(df1.dtypes)
datatypes are
yrs1 int64
yrs2 int64
yrs3 int64
dtype: object

print('\n')

print('length is= no of rows')

print(len(df1))
length is= no of rows
2

print('\n')

print('no of columns are=count the non nan vlaures')

print(df1.count())

no of columns are=count the non nan vlaures


yrs1 2
yrs2 2
yrs3 2
dtype: int64

print('\n')

print('count non nan values for each row')

print(df1.count(1))
count non nan values for each row
half 3
annual 3
dtype: int64

print('\n')
print('cols become rows and rows becomes cols')

print(df1.T)
cols become rows and rows becomes cols
half annual
yrs1 1500 1000
yrs2 1800 2000
yrs3 1200 3000

print('\n')

print('retrieve a particular column')

print(df1.yrs1)

retrieve a particular column


half 1500
annual 1000
Name: yrs1, dtype: int64

print('another way to retrieve a particular column')

print(df1['yrs1'])

another way to retrieve a particular column


half 1500
annual 1000
Name: yrs1, dtype: int64

print('\n')

print('retrieve multiple columns')

print(df1[['yrs1','yrs2']])

retrieve multiple columns


yrs1 yrs2
half 1500 1800
annual 1000 2000

print('\n')

print('retrieve a particular row AND ALL COLUMNS')

print(df1.loc['half',:])
retrieve a particular row
yrs1 1500
yrs2 1800
yrs3 1200
Name: half, dtype: int64

print('\n')

print('retrieve multiple row' FROM HALF TO ANNUAL AND ALL COLUMNS)

print(df1.loc['half':'annual',:])

retrieve multiple row


yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

print('\n')

print(df1)
yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

print('\n')

print('retrieve all rows and selected columns')

print(df1.loc[:,'yrs1':'yrs2'])

retrieve all rows and selected columns


yrs1 yrs2
half 1500 1800
annual 1000 2000

create a dataframe as shown below

yrs1 yrs2 yrs3


half 1500 1800 1200
annual 1000 2000 3000

import pandas as pd

lst1=[1500,1800,1200]

lst2=[1000,2000,3000]

lst3=[lst1,lst2]

df1=pd.DataFrame(lst3,columns=['yrs1','yrs2','yrs3'],index=['half','annual'])

print(df1)

print('\n')

WORKING WITH DATAFRAME

import pandas as pd

dict1={'Name':['somya','dharana','ishika'],'RollNo.':[20,25,30],'Section':['x','y','z']}

df1=pd.DataFrame(dict1,index=["qtr1","qtr2","atr3"])

print(df1)

Name RollNo. Section

qtr1 somya 20 x

qtr2 dharana 25 y

atr3 ishika 30 z

retrieve a particular column


print("\n")

print(df1.Section)

qtr1 x

qtr2 y

atr3 z

Name: Section, dtype: object

retrieve multiple column

print("\n")

print(df1[['Section','Name']])

Section Name

qtr1 x somya

qtr2 y dharana

atr3 z ishika

retrieve a particular row

print(df1.loc["qtr1"])

print("\n")

Name somya

RollNo. 20

Section x

Name: qtr1, dtype: object


retrieve specific rows as starting and ending index and all the columns

print(df1.loc["qtr1":"atr3",:])

print("\n")

Name RollNo. Section

qtr1 somya 20 x

qtr2 dharana 25 y

atr3 ishika 30 z

print(df1.loc["qtr1":"atr3"])

print("\n")

Name RollNo. Section

qtr1 somya 20 x

qtr2 dharana 25 y

atr3 ishika 30 z

retrieve all rows and all the specific columns as starting and ending column

print(df1.loc[:,"Name":"RollNo."])

print("\n")

Name RollNo.

qtr1 somya 20

qtr2 dharana 25
atr3 ishika 30

retrieve specific rows and specific columns

print(df1.loc["qtr1":"atr3","Name":"RollNo."])

print("\n")

Name RollNo.

qtr1 somya 20

qtr2 dharana 25

atr3 ishika 30

retrieve specific rows and specific columns using index

print(df1.iloc[0:2,1:3])

print("\n")

RollNo. Section

qtr1 20 x

qtr2 25 y

retrieve specific rows

print(df1[0:2])

print("\n")

Name RollNo Section

qtr1 somya 20 x

qtr2 dharana 25 y

retrieve the value of a particular cell (row and column)


print(df1.Name['atr3'])

print("\n")

ishika

print(df1.Name[1])

print("\n")

dharana

print(df1.at['atr3','Name'])

print("\n")

ishika

LIST THE STUDENTS HAVING THE MAX ROLLNO.

df1[df1[‘rollno’]==df1[‘rollno].max()]

to get the maximum rollno

print(df1[‘rollno].max())

list the rows having rollno more than 10.

print(df1[df[‘rollno’]>20])

retrieve the value of a particular cell using index (row and column)

print(df1.iat[2,2])

print("\n")

z
changing the value in a dataframe

df1['Name']="nidhi"

print(df1)

Name RollNo. Section

qtr1 nidhi 20 x

qtr2 nidhi 25 y

atr3 nidhi 30 z

print("\n")

changing the values in a dataframe

df1["Name"]=["nidhi","kavita","sarita"]

print(df1)

print("\n")

Name RollNo. Section

qtr1 nidhi 20 x

qtr2 kavita 25 y

atr3 sarita 30 z

df1.loc[:,"Name"]=["ni","ki","sa"]

print(df1)

print("\n")

Name RollNo. Section


qtr1 ni 20 x

qtr2 ki 25 y

atr3 sa 30 z

changing the value of a particular row of all columns

df1.loc['qtr1',:]=[1,2,3]

print(df1)

print("\n")

Name RollNo. Section

qtr1 1 2 3

qtr2 ki 25 y

atr3 sa 30 z

changing the value of a particular cell

df1.loc['qtr1','Section']=0

print(df1)

print("\n")

Name RollNo. Section

qtr1 1 2 0

qtr2 ki 25 y

atr3 sa 30 z

removing a particular column

print("\n")

del df1['Section']

print(df1)
print("\n")

Name RollNo.

qtr1 1 2

qtr2 ki 25

atr3 sa 30

df2=df1.drop(['Name'],axis=1)

print(df2)

print("\n")

RollNo.

qtr1 2

qtr2 25

atr3 30

df2=df1.drop(['atr3'])

print(df2)

print("\n")

Name RollNo.

qtr1 1 2

qtr2 ki 25

changing the name of a column

df3=df2.rename(index={'qtr2':"full"})
print(df3)

Name RollNo.

qtr1 1 2

full ki 25

df2.rename(index={'qtr1':"name"},inplace=True)

print(df2)

Name RollNo.

name 1 2

qtr2 ki 25

retrieve the rows one by one from dataframe

for (row,rowseries) in df1.iterrows():

print(row)

print(rowseries)

print('\n')

half
yrs1 1500
yrs2 1800
yrs3 1200
Name: half, dtype: int64
annual
yrs1 1000
yrs2 2000
yrs3 3000
Name: annual, dtype: int64

Retrieve the columns one by one from dataframe

for (col,colseries) in df1.iteritems():

print(col)

print(colseries)

print('\n')
yrs1
half 1500
annual 1000
Name: yrs1, dtype: int64
yrs2
half 1800
annual 2000
Name: yrs2, dtype: int64
yrs3
half 1200
annual 3000
Name: yrs3, dtype: int64

Perform binary operations on a dataframe

print('binary operation on a dataframe')

lst1=[1500,1800,1200,1]

lst2=[1000,2000,3000,2]

lst3=[lst1,lst2]

df2=pd.DataFrame(lst3,columns=['yrs1','yrs2','yrs3','yrs4'],index=['half','annual'])

print('dataframe df1 is')

print('\n')

print(df1)
print('dataframe df2 is')

print(df2)

print('\n')

print(df1+df2)

binary operation on a dataframe


dataframe df1 is
yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

dataframe df2 is
yrs1 yrs2 yrs3 yrs4
half 1500 1800 1200 1
annual 1000 2000 3000 2

yrs1 yrs2 yrs3 yrs4


half 3000 3600 2400 NaN
annual 2000 4000 6000 NaN

print('binary operation on a dataframe')

lst1=[1500,1800,1200,1]

lst2=[1000,2000,3000,2]

lst3=[1,2,3,4]

lst4=[lst1,lst2,lst3]

df3=pd.DataFrame(lst4,columns=['yrs1','yrs2','yrs3','yrs4'],index=['half','annual','p
re'])

print('dataframe df1 is')

print('\n')

print(df1)

print('dataframe df2 is')


print(df3)

print('\n')

print(df1+df3)

yrs1 yrs2 yrs3


half 1500 1800 1200
annual 1000 2000 3000

dataframe df2 is
yrs1 yrs2 yrs3 yrs4
half 1500 1800 1200 1
annual 1000 2000 3000 2
pre 1 2 3 4

yrs1 yrs2 yrs3 yrs4


annual 2000.0 4000.0 6000.0 NaN
half 3000.0 3600.0 2400.0 NaN
pre NaN NaN NaN NaN

print('binary operation on a dataframe')

lst1=[1500,1800,1200,1]

lst2=[1000,2000,3000,2]

lst3=[1,2,3,4]

lst4=[lst1,lst2,lst3]

df3=pd.DataFrame(lst4,columns=['yrs1','yrs2','yrs3','yrs4'],index=['half','annual','p
re'])

print('dataframe df1 is')

print('\n')

print(df1)
print('dataframe df2 is')

print(df3)

print('\n')

print(df1.add(df3))

print('\n')

print('one more another way to add ')

print('binary operation on a dataframe')

lst1=[1500,1800,1200,1]

lst2=[1000,2000,3000,2]

lst3=[1,2,3,4]

lst4=[lst1,lst2,lst3]

df3=pd.DataFrame(lst4,columns=['yrs1','yrs2','yrs3','yrs4'],index=['half','annual','p
re'])

print('dataframe df1 is')

print('\n')

print(df1)

print('dataframe df2 is')

print(df3)

print('\n')

print(df1.radd(df3))

perform other operations on a dataframe

print('same way we can do subtaction, multiplication and division')

print(df1-df2)
print(df1.sub(df2))

print(df1.rsub(df2))
same way we can do subtaction, multiplication and
division
yrs1 yrs2 yrs3 yrs4
half 0 0 0 NaN
annual 0 0 0 NaN
yrs1 yrs2 yrs3 yrs4
half 0 0 0 NaN
annual 0 0 0 NaN
yrs1 yrs2 yrs3 yrs4
half 0 0 0 NaN
annual 0 0 0 NaN
print('\n')

find out mean(average)

print('dataframe df1 is')

print(df1)

print("\n")

print('do the average value column wise')

print(df1.mean())

dataframe df1 is
yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

do the average value column wise


yrs1 1250.0
yrs2 1900.0
yrs3 2100.0
dtype: float64
print('\n')

print('dataframe df1 is')

perform the mean(average) row wise

print(df1)

print("\n")

print('do the average value row wise')

print(df1.mean(1))
dataframe df1 is
yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

do the average value row wise


half 1500.0
annual 2000.0
dtype: float64

print('\n')

print('dataframe df1 is')

print(df1)

print("\n")

print('another way to do the average value row wise')

print(df1.mean(axis=1))

dataframe df1 is
yrs1 yrs2 yrs3
half 1500 1800 1200
annual 1000 2000 3000

another way to do the average value row wise


half 1500.0
annual 2000.0
dtype: float64

find the mode

lst1=[1000,1500,1200]

lst2=[1000,1500,1200]

lst3=[lst1,lst2]

df1=pd.DataFrame(lst3,columns=['yrs1','yrs2','yrs3'],index=['half','annual'])

print(df1)

print('dataframe df1 is')

print(df1)

print("\n")

print('find the repeted value column wise')

print(df1.mode())

dataframe df1 is
yrs1 yrs2 yrs3
half 1000 1500 1200
annual 1000 1500 1200

find the repeted value column wise


yrs1 yrs2 yrs3
0 1000 1500 1200

print('\n')

lst1=[1000,1500,1200]
lst2=[1000,1800,1200]

lst3=[lst1,lst2]

df1=pd.DataFrame(lst3,columns=['yrs1','yrs2','yrs3'],index=['half','annual'])

print(df1)

print('dataframe df1 is')

print(df1)

print("\n")

print('find the repeted value column wise')

print(df1.mode())

dataframe df1 is
yrs1 yrs2 yrs3
half 1000 1500 1200
annual 1000 1800 1200

find the repeted value column wise


yrs1 yrs2 yrs3
0 1000.0 1500 1200.0
1 NaN 1800 NaN

print('\n')

print(df1)

print('\n')

print('print the medium value column wise')

print(df1.median())
print the medium value column wise
yrs1 1000.0
yrs2 1650.0
yrs3 1200.0
dtype: float64
print('\n')

print(df1)

print('\n')

print('print the medium value row wise')

print(df1.median(1))

yrs1 yrs2 yrs3


half 1000 1500 1200
annual 1000 1800 1200

print the medium value row wise


half 1200.0
annual 1200.0
dtype: float64

print('\n')

print(df1)

print('\n')

print('print the sum')

print(df1.sum())

print(df1.sum(1))

print(df1.count())

print(df1.count(1))

yrs1 yrs2 yrs3


half 1000 1500 1200
annual 1000 1800 1200

print the sum


yrs1 2000
yrs2 3300
yrs3 2400
dtype: int64

half 3700
annual 4000
dtype: int64

yrs1 2
yrs2 2
yrs3 2
dtype: int64

half 3
annual 3
dtype: int64

working with line chart

import matplotlib.pyplot as pl

import numpy as np

a=[1,2,3,4]

b=[10,20,30,40]

pl.plot(a,b)

pl.show()

import matplotlib.pyplot as pl

import numpy as np

a=[1,2,3,4]

b=[10,20,30,40]
pl.plot(a,b,'r',linestyle='dashed',linewidth=5,marker='+',markeredgecolor='green',
markersize=10)

pl.xlabel('rollno')

pl.ylabel('marks')

pl.grid(True)

pl.title('class xii')

pl.show()

import matplotlib.pyplot as pl

import numpy as np

a=[1,2,3,4]

b=[10,20,30,40]

pl.bar(a,b)

pl.xlabel('rollno')

pl.ylabel('marks')

pl.grid(True)

pl.title('class xii')

pl.show()

import matplotlib.pyplot as pl

import numpy as np

a=[1,2,3,4]
b=[10,20,30,40]

pl.bar(a,b,color=['red','green','blue','black'],width=[0.5,1.0,1.0,0.5])

pl.xlabel('rollno')

pl.ylabel('marks')

pl.grid(True)

pl.title('class xii')

pl.show()

import matplotlib.pyplot as pl

import numpy as np

a=[1,2,3,4]

b=[10,20,30,40]

c=[5,8,4,5]

pl.bar(a,b)

pl.bar(a,c)

pl.xlabel('rollno')

pl.ylabel('marks')

pl.grid(True)

pl.title('class xii')

pl.show()

import matplotlib.pyplot as pl

import numpy as np
a=np.arange(4)

b=[10,20,30,40]

c=[5,8,4,5]

pl.bar(a+0.00,b,width=0.25)

pl.bar(a+0.25,c,width=0.25)

pl.xlabel('rollno')

pl.ylabel('marks')

pl.grid(True)

pl.title('class xii')

pl.show()

import matplotlib.pyplot as pl

import numpy as np

a=np.arange(4)

b=[10,20,30,40]

c=[5,8,4,5]

pl.bar(a+0.00,b,width=0.25,label='weekly1')

pl.bar(a+0.25,c,width=0.25,label='weekly2')

pl.xlabel('rollno')

pl.ylabel('marks')

pl.grid(True)

pl.title('class xii')

pl.legend()

pl.show()
Pandas:
• It is a package useful for data analysis and manipulation.

• Pandas provide an easy way to create, manipulate and wrangle the data.

• Pandas provide powerful and easy-to-use data structures, as well as the means to quickly perform
operations on these structures.

DATA STRUCTURE IN PANDAS


A data structure is a way to arrange the data in such a way that so it can be accessed quickly and we can
perform various operation on this data like- retrieval, deletion, modification etc.

Pandas deals with 3 data structure


1. Series

2. Data Frame

3. Panel

Series-
Series is a one-dimensional array like structure with homogeneous data, which can be used to handle
and manipulate data. It has two parts

1. Data part (An array of actual data)

2. Associated index with data (associated array of indexes or data labels)

✓ We can say that Series is a labeled one-dimensional array which can hold any type of data.

✓ Data of Series is always mutable, means it can be changed.

✓ But the size of Data of Series is always immutable, means it cannot be changed.

DATAFRAME-

It is a two-dimensional object that is useful in representing data in the form of rows and columns.

This is the most commonly used pandas object.

Once we store the data into the Dataframe, we can perform various operations that are useful in
analyzing and understanding the data.

1. A Dataframe has axes (indices)- ➢ Row index (axis=0) ➢ Column index (axes=1)
2. It is similar to a spreadsheet , whose row index is called index and column index is called column
name.

3. A Dataframe contains Heterogeneous data.

4. A Dataframe Size is Mutable.

5. A Dataframe Data is Mutable.

A data frame can be created using any of the following

1. Series

2. Lists

3. Dictionary

4. A numpy 2D array

DIFFERENCE BETWEEN SERIES AND DATAFRAME (M.IMP)

SERIES DATAFRAEME
1 DIMENSIONAL 2 DIMENSIONAL

ALL THE ELEMENTS MUST BE OF SAME DATA TYPE DATAFRAME OBJECTS CAN HAVE ELEMENTS OF
DIFFERENT DATATYEPE

VALUES ARE MUTUABLE VALUES ARE MUTUABLE(CAN CHANGE)

SIZE IS IMMUTABLE(CAN’T CHANGE) SIZE IS MUTUABLE (CAN CHANGE)

DIFFERENCE B/W NUMPY AND SERIES OBECT

NUMPY SERIES
IN NUMPY ARITHEMATIC OPERARTIONS ARE PERFORMED IN SERIES WE CAN PERFORM

ONLY WHEN BOTH THE NUMPY ARE SAME OPERATIONS ON THEM

IN NDARRARY INDEXES ARE ALWAYS NUMERIC IN SERIES WE CAN SPECIFY THE INDEX
AS PER OUR REQUIREMENT

Data Visualisation: - Data visualisation basically refers to the graphical or visual


representation of information and data using visual elements like charts, graphs and maps etc.
Using Pyplot of MATPLOT LIBRARY:-

Pyplot is a collection of methods within MATPLOT library (of Python) which allows user to
construct 2D plots easily and interactively

Is pyplot a python library

Pyplot is an interface not a library.

Line chart;-

A type of chart which displays information as a series of data points called


markers connected by straight line segment.

Histogram:-

A histogram is a statistical tool used to summarize continuous data. It provides a


visual interpretation of numerical data by showing the number of data points that
fall within a specified range of values.

Bar chart;-

A graphical display of data using bars of different heights


SQL Functions
A function is a set of predefined commands that performs specific operation and returns a single
value.
The functions used in SQL can be categorised into two categories namely single row or scalar
functions and multiple row or group or aggregate functions.
1. Single Row Functions
The single row functions work with a single row at a time and return one result per row. e.g.
String, Number, Date, Conversion and General function are single row functions.
(i) String Functions
The string functions of MySQL can manipulate the text string in many ways.
Mathematical Functions
Mathematical functions are also called number functions that accept numeric input and return
numeric values.

Sign()

Sqrt()

(iii) Date and Time Functions


Date functions operate on values of the DATE data type:

2. Multiple Row Functions


Such types of functions work with the data from more than one rows. Such type of
functions are returning aggregate values. Examples of aggregate functions are sum( ),
count( ), max( ), min( ), avg( ), etc.

Aggregate Functions in MySQL


MySQL also supports and provides group functions or aggregate functions. As you can
make out that the group functions or aggregate functions work upon groups of rows,
rather than on single rows. That is why, these functions are also called multiple row
functions.
GROUP (Aggregate) Functions
There are following aggregate or group functions available in MySQL:

(i) String Functions examples

Select char(65); A

Select char(65.3) A

Select char(65.9); B (ROUND OFF TO NEXT VALUE)

Select char(65,66); AB

Select char(97); a

Select char(‘65.9’); A ( NO ROUND OFF IF GIVEN IN QUOTES)

SELECT CONCAT(‘NIDHI’,’JAIN’); NIDHIJAIN

SELECT CONCAT(CONCAT(‘NIDHI’,’ ’),’JAIN’); NIDHI JAIN

SELECT UCASE(‘nidhi’); NIDHI

OR

SELECT UPPER(‘nidhi’); NIDHI

SELECT lcase(‘NIDHI’); nidhi

OR

SELECT LOWER(‘NIDHI’) ; nidhi

Select substr(‘raunaq’,2,3); aun( from 2 position next 3 letters)

Select substr(‘raunaq’,-5,2); au( count 5 position from back and retrieve


next 2 letters from left to right)
Select length(‘nidhi’); 5

Select length(‘ nidhi’); 8( 3 spaces before n so it will also be


counted

Select ltrim(‘ nidhi‘); nidhi (REOMOVE LEADING/LEFT SPACES)

Select length(‘ nidhi’); 8

Select length(ltrim(‘ nidhi‘)); 5(first ltrim will remove the left spaces and
then length will be counted)

Select rtrim(‘ nidhi ‘); nidhi (REOMOVE trailing/right SPACES)

Select length(‘nidhi ’); 8

Select length(rtrim(‘nidhi ‘)); 5(first rtrim will remove the right spaces
and then length will be counted)

Select trim(‘ nidhi ‘); nidhi (REOMOVE both LEADING/LEFT and


trailing/right SPACES)

Select length(‘ nidhi ’); 11

Select length(trim(‘ nidhi ‘)); 5(first trim will remove the left and right
spaces and then length will be counted)

Select left(‘informatics’,2); in( RETRIVE 2 CHARACTRERS FROM LEFT

Select RIGHT(‘informatics’,2); CS( RETRIVE 2 CHARACTRERS FROM RIGHT)

SELECT INSTR(‘INCORPORATION’,’OR’); 4 (FIND OUT THE LOCATION OF FIRST


OCCURANCE OF OR)
Mathematical Functions examples

Select mod(3,2) 9

Select sqrt(16) 4

Select sign(13) 1

Select sign(-13) -1
Select sign(0) 0

Select pow(3,2) 9

Select power(3,2) 9

Select round(13.74,1) 13.7

Select round(13.78,1) 13.8

Select round(13.897,2) 13.90

Select round(13.567) 14

Select round(13.223) 13

Select round(13.74,-1) 10

Select round(13.74,-2) 0

Select round(13.74,-3) 0

Select round(165.77,-2) 200

Select round(145.74,-2) 100

Select truncate(13.73,1) 13.7

Select truncate(13.32,1) 13.3

Select truncate(13.563,2) 13.56

Select truncate(16.81,-1) 10

Select truncate(187.53,-2) 100

Select truncate(187.53,-1) 180

(iii) Date and Time Functions

Select curdate(); 2022-04-09

Select current_date(); 2022-04-09

Select current_date()+10; 2022-04-19

Select date(“2022-04-09 11:23:54”); 2022-04-09


Select month(“2022-04-09’); 04

Select monthname(“2022-04-09”); april

Select day(“2022-04-09”); 09

Select year(“2022-04-09”); 2022

Select dayname(“2022-04-09”); Monday

Select dayofmonth(“2022-04-09”); 09

Select dayofweek(“2022-04-09”); 02

Select dayofyear(“2022-04-09”); 99

Select now() 2022-04-09 11:23:54

Select sysdate() 2022-04-09 11:23:54

GROUP (Aggregate) Functions

Emp

Ename Sal city

X 1000 ganaur

Y - ganaur

Z 1200 sonipat

Select avg(sal) from emp; 1100 (null will not be counted )

Select avg(sal) “average” from emp average

1100

Select avg(sal) as average from emp average

1100

Select count(*) from emp 3(no of records in a table)

Select count(sal) from emp 2(no of salaries entered, nul will not be
counted)

Select max(sal) from emp 1200

Select min(sal) from emp 1000

Select sum(sal) from emp 2200

Select count(city) from emp 3

Select count(all city) from emp 3


Select count(distinct city) from emp 2(count unique values)

Emp1

Ename Sal dept

X 1000 accounts

Y 2000 accounts

Z 3000 sales

M 4000 marketing

Select sum(sal) from emp1 group by dept; 3000

3000

4000

Select sum(sal),min(sal) from emp1 group by dept; 3000 1000

3000 3000

4000 4000

Select dept,sum(sal) from emp1 group by dept; accounts 3000

Sales 3000

Marketing 4000

Select dept,count(sal) from emp1 group by dept; accounts 2

Sales 1

Marketing 1

Select dept,count(sal) from emp1 group by dept having count(dept)>1; accounts 2


Select * from emp1 order by name;

Select * from emp1 order by name asc;

Select * from emp1 order by name desc,sal;

Select * from emp1 order by name,sal desc;

SUBSTRING/SUBSTR/MID;- ALL THE THREE FUNCTIONS ARE SAME

Significance of group by

The group by clause combines all those records that have identical values in a
particular field or a group of fields. This grouping results into one summary record
per group if group functions are used with it.

Difference between where clause and a having clause

The difference between where and having clause is that where conditions are
applicable on individual rows whereas having conditions are applicable on groups
as formed by group by clause.

Societal impact ofIT


https://techtipnow.in/societal-impact-notes-societal-impact-ip-class-12/

1) What do you mean by digital footprints


2) What are the types of digital footprints
3) How to manage the digital footprints
4) What do you mean by net etiquettes
5) Do’s and don’ts in net etiquettes
6) Define digital communication etiquettes
7) Define data protection
8) What is intellectual property right
9) Explain- copyright, patent and trademark
10) Digital property right
11) Threats and protection to digital property right
12) What is Plagiarism and how to avoid it
13) Define copyright infringement
14) Trademark infringement
15)
16) Difference b/w copyright and license
17) Define software license
18) Types of software license
19) Free software and open source software
20) Define GNU, general public licence
21) Cyber crime and its type
22) Define social engineering or pretexting
23) Define cyber trolls and bullying
24) Define cyber stackling
25) Define scam, illegal downloads and child pornography
26) Hacking and how to prevent hacking
27) Phishing and how to prevent phishing
28) Define identity theft and its types
29) How to prevent cyber crime
30) Define Indian it act
31) Define cyber law
32) What do you mean digital signature
33) E-waste and its hazard
34) E-waste management
35) Health concerns due to overuse of digital technology
36) Define all Worms/ Trojans/spyware/adware/spamming/pc intrusion
37) DAMAGE CAUSED BY VIRUSES
38) DEFINE EVASEDROPPING
39) COOKIES
40) PHISHING AND PHARMING
41) WHAT ARE THE SOLUTIONS TO VIRUSUS, ADWARE AND SPYWARE
42) DIFFERENCE B/W DATA PRIVACY AND DATA PROTECTION
43) FIREWALL AND ITS TYPES

VALUE BASED QUESTIONS

1) After practicals, Atharv left the computer laboratory but forgot to sign off from his
email account. Later, his classmate Revaan started using the same computer.
He is now logged in as Atharv. He sends inflammatory email messages to few of
his classmates using Atharv’s email account. Revaan’s activity is an example of
which of the following cyber crime? Justify your answer.

a. Hacking
b. Identity theft – As he used someone’s account and sent inflammatory
email messages.
c. Cyber bullying
d. Plagiarism

2) Rishika found a crumpled paper under her desk. She picked it up and opened it.
It contained some text which was struck off thrice. But she could still figure out
easily that the struck-off text was the email ID and password of Garvit, her
classmate. What is ethically correct for Rishika to do?

 Inform Garvit so that he may change his password.


 Give the password of Garvit’s email ID to all other classmates.
 Use Garvit’s password to access his account.

3) Suhana is down with fever. So, she decided not to go to school tomorrow. Next
day, in the evening she called up her classmate, Shaurya and enquired about the
computer class. She also requested him to explain the concept. Shaurya said,
“Mam taught us how to use tuples in python”. Further, he generously said, “Give
me some time, I will email you the material which will help you to understand
tuples in python”. Shaurya quickly downloaded a 2-minute clip from the Internet
explaining the concept of tuples in python. Using video editor, he added the text
“Prepared by Shaurya” in the downloaded video clip. Then, he emailed the
modified video clip to Suhana. This act of Shaurya is an example of —

o Fair use
o Hacking
o Copyright infringement
o Cybercrime
4) After a fight with your friend, you did the following activities. Which of these
activities is not an example of cyberbullying?

o You sent an email to your friend with a message saying that “I am


sorry”.
o You sent a threatening message to your friend saying “Do not try to
call or talk to me”.
o You created an embarrassing picture of your friend and uploaded
on your account on a social networking site.

5) Sourabh has to prepare a project on “Digital India Initiatives”. He decides to get


information from the Internet. He downloads three web pages (webpage1,
webpage 2, webpage 3) containing information on Digital India Initiatives. Which
of the following steps taken by Sourabh is an example of plagiarism or copyright
infringement? Give justification in support of your answer.

o He read a paragraph on “ Digital India Initiatives” from webpage 1 and


rephrased it in his own words. He finally pasted the rephrased
paragraph in his project. – Paraphrasing, using someone’s ideas from
the internet and writing them in their own words by citing original
source.
o He downloaded three images of “ Digital India Initiatives” from the
webpage He made a collage for his project using these images.
– Copyright Infringement, as he downloaded and used the images
which may be copyrighted materials.
o He downloaded the “Digital India Initiative” icon from web page 3 and
pasted it on the front page of his project report. – Copyright
Infringement

6) You got the below shown SMS from your bank querying a recent transaction.
Answer the following —
a) Will you SMS your pin number to the given contact number? – No, we should not
provide any confidential information like pin number or password to anyone.
b) Will you call the bank helpline number to recheck the validity of the SMS received? –
If it is required then otherwise ints not neccasary.
7) Preeti celebrated her birthday with her family. She was excited to share the
moments with her friend Himanshu. She uploaded selected images of her birthday
party on a social networking site so that Himanshu can see them. After few days,
Preeti had a fight with Himanshu. Next morning, she deleted her birthday
photographs from that social networking site, so that Himanshu cannot access
them. Later in the evening, to her surprise, she saw that one of the images which
she had already deleted from the social networking site was available with their
common friend Gayatri. She hurriedly enquired Gayatri “Where did you get this
picture from?”. Gayatri replied “Himanshu forwarded this image few minutes
back”.

Help Preeti to get answers for the following questions. Give justification for your
answers so that Preeti can understand it clearly.

a) How could Himanshu access an image which I had already deleted? – When you
perform any transaction on the internet it leaves a digital footprint. There few
websites and resources that can be access to get the deleted items.
b) Can anybody else also access these deleted images? Yes, all marked friends and
tagged individuals can see them.
c) Had these images not been deleted from my digital footprint? There are certain
data which remain in digital footprint even files are deleted, cannot be deleted from
my digital footprint.

8) The school offers wireless facility (wifi) to the Computer Science students of Class XI.
For communication, registered URL schoolwifi.edu. On 17 September 2017, the
following email was mass distributed to all the Computer Science students of Class XI.
The email claimed that the password of the students was about to expire. Instructions
were given to go to URL to renew their password within 24 hours.

a) Do you find any discrepancy in this email? – The general email format contains
sender information on top. This information contains sender’s name and sender’s e-mail
id. Then Subject line is missing.

b) What will happen if the student will click on the given URL? – It will redirect the user
to change the password. This is now a secure URL so the information can be open to
anyone so it can be hacked or stolen from the database.
c) Is the email an example of cybercrime? If yes, then specify which type of cybercrime
is it. Justify your answer. – Yes, it can be an example of cybercrime as it is a phishing
activity.

9) You are planning to go for a vacation. You surfed the Internet to get
answers for the following queries, Which of your above-mentioned actions
might have created a digital footprint?
a) Weather conditions – Weather conditions do not store the information related
to the user so do not create any digital footprint.
b) Availability of air tickets and fares – It will create a digital footprint because it
collects data related to customer and ticket details.
c) Places to visit – The places to visit on google map is creating a digital footprint
in your profile.
d) Best hotel deals – This will also ask data from user and create a digital
footprint.

10. How would you recognize if one of your friends is being cyberbullied?
a) Cite the online activities which would help you detect that your friend is being
cyberbullied? – If someone is causing humiliation to my friend through hateful
comments on the social networking sites then we know that he/she is being
bullied
b) What provisions are in IT Act 2000, (amended in 2008) to combat such
situations. – Section 66A in the amended IT Act deals with these crimes

11. If you plan to use a short text from an article on the web, what steps must
you take in order to credit the sources used?

You need to put citation specifying the website name from where the content has
been used.

12. Describe why it is important to secure your wireless router at home. Search
the Internet to find the rules to create a reasonably secure password.
Create an imaginary password for your home router. Will you share your
password for a home router with the following people. Justify your answer.

a) Parents
b) Friends
c) Neighbours
d) Home tutors

Other than parents the password should not be shared with anyone Rules to create
secure password:

1. Should not be nick names of family member or pet names


2. Must be a combination of alphanumeric with special symbols too
3. Should not include dob/ date of anniversary or things which can be commonly
guessed

13 List down the steps you need to take in order to ensure —


a) Your computer is in good working condition for a longer time. – Regular antivirus
updates, update software and do regular maintenance,
keep it clean it dustfree, keep in normal temperatures, switching it off once a day etc.

b) smart and safe Internet surfing. – Visit only https sites, don’t remain login at all times,
antivirus updates, use of strong passwords, think twice before feeding in your personal
details on any web sites, do not open any mail from unknown sender etc

14 In the computer science class, Sunil and Jagdish were assigned the
following task by their teacher.
a) Sunil was asked to find information about “India, a Nuclear power”. He was asked to
use Google Chrome browser and prepare his report using Google Docs.
b) Jagdish was asked to find information about “Digital India”. He was asked to use
Mozilla Firefox browser and prepare his report using Libre Office Writer. What is the
difference between technologies used by Sunil and Jagdish?

Chrome and google docs are freewares Whereas Mozilla Firefox browser and libre
office are open source softwares. Refer the deferentiate question for more.

15 Cite examples depicting that you were a victim of following cyber crime.
Also, cite provisions in IT Act to deal with such a cyber crime.
a) Identity theft
b) Credit card account theft – Both Under section 66C of the IT Act 2000 Q20.

16Sumit got good marks in all the subjects. His father gifted him a laptop. He
would like to make Sumit aware of health hazards associated with inappropriate
and excessive use of laptop. Help his father to list the points which he should
discuss with Sumit.

4. Sumit must be made aware of the following points regarding the aftermath of
excessive use of technology:
a) Strained Vision
b) Muscle and joint pain
c) Too much co-dependence
d) Failing memory
e) Sleep deprivation
f) Internet is very distracting, eats away lot of time

Notes of networking

1) What is computer network


2) Advantages/usage of computer network
3) Types of computer network
4) CHARACTERISTICS OF LAN,WAN,MAN
5) TOPOLOGIES AND ITS TYPES
6) ADVANTAGES AND DISADVANTAGES OF STAR TOPOLOGY
7) ADVANTAGES AND DISADVANTAGES OF BUS(LINEAR) TOPOLOGY
8) ADVANTAGES AND DISADVANTAGES OF RING(CIRCULAR) TOPOLOGY
9) ADVANTAGES AND DISADVANTAGES OF TREE TOPOLOGY
10) ADVANTAGES AND DISADVANTAGES OF MESH TOPOLOGY
11) DEFINE HUB
12) DEFINE SWITCH
13) DEFINE ROUTER
14) DEFINE GATEWAY
15) DEFINE REPEATER
16) DEFINE ETHERNET CARD
17) DEFINE MODEM
18) DEFINE NODE, SERVER,CLIENT
19) DEFINE INTERNET
20) WWW
21) EMAIL
22) WEB PAGE AND WEB SITE
23) SPAM AND JUNK MAIL
24) IM
25) IRC
26) WEB BASED CHAT
27) CHAT
28) VoIP
29) HTML
30) URL
31) CHATTING OR IM(INSTANT MASSAGING)
32) WEBSITE AND ITS PURPOSE
33) STATIC VS DYNAMIC WEBPAGE
34) WEBSERVER
35) STEPS TO HOST A WEBSITE
36) BROWSER
37) PLUG IN
38) ADD ON
39) COOKIES

NIC- NETWORK INFERFACE UNIT/CARD


TAP- TERMINAL ACCESS POINT

DNS- DOMAIN NAME SYSTEM

VOIP- VOICE OVER INTERNET PROTOCOL

LAN- LOCAL AREA NETWORK

WAN- WIDE AREA NETWORK

MAN- METROPOLITAN AREA NETWORK

WWW-WORLD WIDE WEB

PDA- PERSONAL DIGITAL ASSITANT

MODEM- MODULATOR/ DEMOULATOR

AM- AMPLITUDE MODULATION

FM- FREQUENCY MODULATION

PM- PHASE MODULATION

ARPANET- ADVANCE RESEARCH PROJECT AGENCY OF NETWORK

NSF- NATIONAL SCIENCE FOUNDATION

URL- UNIFORM RESOURCE LOCATOR

TCP/IP- TRANSMISSION CONTROL PROTOCOL/ INTERNET PROTOCOL

HTTP- HYPERTEXT TRANSFER PROTOCOL

POP-POST OFFICE PROTOCOL

SMTP- SIMPLE MAIL TRANSFER PROTOCOL

HTML- HYPERTEXT MARKUP LANGUAGE

NNTP- NETWORK NEWS TRANSFER PROTOCOL

DHTML- DYNAMIC HYPERTEXT TRANSFER PROTOCOL

MSIE- MICROSOFT INTERNET EXPLORER

NCSA- NATIONAL CENTRE FOR SUPERCOMPUTING APPLICATION


EMAIL- ELECTRONIC MAIL

SPAM- SEND PEOPLE ALLOTTA MAIL

IMAP- INTERNET MESSAGE ACCESS PROTOCOL

POP- POST OFFICE PROTOCOL

IM- INSTANT MSSAGING

ICQ- I SEEK YOU

IRC- INTERNET RELAY CHAT

Question 60.
Freshminds University of India is starting its first campus Anna Nagar of South India
with its centre admission office in Kolkata. The university has three major blocks
comprising of Office Block, Science Block and Commerce Block in the 5 km area
campus.

As a network expert, you need to suggest the network plan as per (i) to (iv) to the
authorities keeping in mind the distance and other given parameters.

Expected wire distances between various locations:


Expected number of computers to installed at various locations in the university are as follows:

(i) Suggest the authorities, the cable layout amongst various blocks inside
university campus for connecting the blocks.
(ii) (Suggest the most suitable place (i.e. block) to house the server of this
university with a suitable reason.
(iii) Suggest an efficient device from the following to be installed in each of the
blocks to connect all the computers.
(a) Switch
(b) Modem
(c) Gateway
(iv) Suggest the most suitable (very high speed) service to provide data
connectivity between Admission Office located in Anna Nagar from the
following options:
(a) Telephone lines
(b) Fixed line dial-up connection
(c) Co-axial cable network
(d) GSM
(e) Leased lines
(f) Satellite connection (Delhi 2009)

Answer:
(i) The suggested cable layout amongst various blocks inside university campus for
connecting the blocks will be as follow:
Using Star Network:

Using Bus Network:

(ii) The most suitable place (i.e. block) to house the server of this university is Science
Block, because in this block there are maximum number of computer and according to
80-20 rule 80% of traffic should be local.
(iii) The efficient device to be installed in each of the blocks to connect all the computers
is switch.
(iv) For very high-speed connectivity between Admission office located in Kolkata and
the campus office in Anna Nagar is satellite connection.

2)Eduminds University of India is starting its first campus in a small town Parampur of
central India with its centre admission office in Delhi. The university has three major
buildings comprising of Admin Building, Academic Building and Research Building in the
5 km area campus. As a network expert, you need to suggest the network plan as per
(i) to (iv) to the authorities keeping in mind the distances and other given parameters.

Expected wire distances between various locations:

Expected number of computers to be installed at various locations in the university are


as follows:

(i) Suggest the authorities, the cable layout amongst various buildings inside the
university campus for connecting the building.
(ii) Suggest the most suitable place (i.e. building) to house the server of this
organisation, with a suitable reason.

III) Suggest an efficient device from the following to be installed in each of the buildings
to connect all computers.
(a) Gateway
(b) Modem
(c) Switch
(iv) Suggest the most suitable (very high speed) service to provide data connectivity
between Admission Building located in Delhi and the campus located in Parampur from
the following options:
(a) Telephone line
(b) Fixed line dial-up connection
(c) Co-axial cable network
(d) GSM
(e) Leased line
(f) Satellite connection. (All India 2009; HOTS)

Answer:
(i) The suggested cable layout is as follows: Using Bus/Star Network

(v)

(ii) The most suitable place (i.e. block) to house the server of this university is
Academic Block, because there are maximum number of computers in this
block and according to 80-20 rule 80% of traffic in a network should be local.
(iii) The efficient device to be installed in each of the blocks to connect all the
computers is switch.
(iv) For very high-speed connectivity between Admission Building located in
Delhi and campus located in Parampur is satellite connection.

Question 62.
Bias Methodologies is planning to expand their network in India starting with
three cities in India to build infrastructure for research and development of
their chemical products. The company has planned to setup their main office
in Pondicherry at three different locations and have named their offices as
Back Office, Research Lab and Development Unit. The company has one
more research office namely Corporate Unit in Mumbai. A rough layout of the
same is as follows:

Approximate distance between these offices is as follows:


In continuation of the above, the company experts have planned to install the
following number of computers in each of these offices.

(i) Suggest the kind of network required (out of LAN, MAN, WAN) for
connection each of the following office unit
(a) Research Lab and Back Office
(b) Research Lab and Development Unit

(ii) Which of the following devices will you suggest for connecting all the
computers with each of their office units?
(a) Switch/Hub
(b) Modem
(c) Telephone
(iii) Which of the following communication media, will you suggest to be
procured by the company for connecting their local office units in Pondicherry
for very effective (high speed) communications?
(a) Telephone cable
(b) Optical fiber
(c) Ethernet cable
(iv) Suggest a cable/wiring layout for connecting the company’s local office
units located in Pondicherry. Also, suggest an effective method/technology for
connecting the company’s office located in Mumbai. (Delhi 2008)
Answer:

i) The type of network between the Research Lab and the Back Office is LAN
(Local Area Network). The type of network between Research Lab and Development
Unit is MAN (Metropolitan Area Network).
(ii) The suitable device for connecting all the computers within each of their office units
is switch/hub.
(iii) For connecting the local office units in Pondicherry for very effective (high speed)
communication is optical fiber.
(iv) The cable/wiring layout for connection is as follows:

Question 63.
China Middleton Fashion is planning to expand their network in India, starting with two
cities to provide infrastructure for distribution of their products. The company has
planned to setup their main office in Chennai at three different locations and have
named their offices as Production Unit, Finance Unit and Media Unit. The company has
its Corporate Unit in Delhi.
A rough layout of the same is as follows:

Approximate distance follows: between these units is as follows:

In continuation of the above, the company experts have planned to install the following
number of computers in each of their offices

(i) Suggest the kind of network required (out of LAN, MAN, WAN) for each of the
following units:
(a) Production Unit and Media Unit
(b) Production Unit and Finance Unit
(ii) Which of the following devices will you suggest for connecting all computers with
each of their office units?
(a) Switch/Hub
(b) Modem
(c) Telephone
(iii) Which of the following communication media, will you suggest to be procured by the
company for connecting their local office units in Chennai for very effective (high speed)
communication?
(a) Telephone cable
(b) Optical fiber
(c) Ethernet cable
(iv) Suggest a cable/wiring layout for connecting the company’s local office units located
in Chennai.
Also, suggest an effective method/technology for connecting the company’s office unit
located in Delhi. (All India 2008)
Answer:

(i) The type of network between the Production Unit and Media Unit is MAN
(Metropolitan Area Network). The type of network between Production Unit and Finance
Unit is LAN (Local Area Network).
(ii) The suitable device for connecting all the computers within each of their office units
is switch/hub.
(iii) For connecting the local office units in Chennai for very effective (high speed)
communication is optical fiber.
(iv) The cable/wiring layout for connection is as follows:

Question 64.
Bhartiya Connectivity Association is planning to spread their offices in four major cities
of India to provide regional IT infrastructure support in the field of education and culture.
The company has planned to setup their head office in New Delhi in three locations and
have named their New Delhi offices as Front Office, Back Office and Work Office. The
company has three more regional offices as three major cities of India. A rough layout of
the same is as follows:

Approximate distances between these offices as per network survey team is as follows:

In continuation of the above, the company experts have planned to install the following
number of computers in each of their offices:

i) Suggest the network type (out of LAN, MAN, WAN) for connecting each of the
following set of the their offices:
(a) Back Office and Work Office
(b) Back Office and South Office
(ii) Which device will you suggest to be procured by the company for connecting all the
computers with each of their offices out of the following devices?
(a) Switch/Flub
(b) Modem
(c) Telephone South Office, East Office and West Office located in other
(iii) Which of the following communication medium will you suggest to be procured by
the company for connecting their local offices in New Delhi for very effective and fast
communication?
(a) Telephone cable
(b) Optical fiber

c) Ethernet cable
(iv) Suggest the cable/wiring layout for connecting the company’s local offices located in
New Delhi. Also, suggest an effective method for connecting the company’s regional
offices East Office, West Office and South Office with offices located in New Delhi.
Answer:
(i) The type of network between the Back Office and the Work Office is LAN (Local Area
Network). The type of network between the Back Office and the South Office is WAN
(Wide Area Network).
(ii) The suitable device for connecting all the computers in each of their offices is
switch/hub.
(iii) For connecting local offices in New Delhi for very effective and fast communication
is optical fiber.
Question 66.
University of correspondence in Allahabad is setting up the network between its
different wings. There are four wings named as Science (S), Journalism (J), Arts (A)
and Home science(H). Distance between various wings are given below.

Number of computers:

Number of computers:

(i) Suggest a suitable topology for networking the computers of all wings.
(ii) Name the wing, where the server to be installed, justify your answer.
(iii) Suggest the placement of hub/switch in the network.
(iv) Mention an economic technology to provide Internet accessibility to all wings.
Answer:
(i) For connecting all the computers of all wings star topology can be used, because it is
most reliable. We can also set a bus network, if economy is main factor, because it is
most economical.
(ii) The server should be installed in Wing A, because there are maximum number of
computers. According to 80-20 rule 80% of the traffic should be local. By installing
server in Wing A, network traffic could be reduced.
(iii) The hub/switch must be placed in all the wings to connect all the computers of the
network.
(iv) To provide Internet accessibility to all wings economically, we can use a proxy
server in Wing A and we should connect the Internet through a dial-up network.

Define domain name.


Answer:
Domain Name
Domain name is a unique name or identification that helps to create the path to open a
particular website. All the domain names have IP addresses. IP address can be
remembered by the computer, but it is difficult to remember for a human being. If you
know that URL (Uniform Resource Locator) of a website, you can access it. The URL is
actually the domain name of website, so the domain name is unique name of a website.
Every time we enter a domain name it will be converted into an IP address and the
website will be opened,

E.g., www.Mybook.com
A domain name contains three parts:

 Hostname as, www


 Name describing the website purpose as, Mybook
 Top level domain as .com, .net, .edu, etc.

You might also like