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

Python Revision Tour-I

Q1.What are tokens in python? How many types of tokens are allowed in python?
Exemplify your answer.

Ans: The smallest individual unit in a program is known as a Token or a lexical unit.
Python has following tokens:
1.Keywords
2.Identifiers
3.Literals
4.operators
5.punctuators

Q.2. How are keywords different from identifiers?


Answer:
Keyword are predefined words with special meaning to the language to interpreter. They
are reserved for special purpose and must not be used as normal identifier name.
Identifiers are the names given to different parts of the program like variable, objects,
classes, functions, list.
Q.3. What are literals in Python? How many type of literals are allowed in python?
Answer:
Literals are data items that have a fixed/constant value.
Four type of literal are allowed in python.
a)string literals
b)Numeric literals
c)Boolean Literals
d)Special literal None
Q,4. Can non graphic characters be used and processed in Python? How? Give
examples to support your answer.
Answer:
yes, Non graphic characters be used and processed in python.
print(“good /n morning”) its output is
good
morning #here /n is new-line character.
Q.5. Out of the following, find those identifiers, which cannot be used for naming
variable or Function in a Python program:
Price*Qty,class,for,do,
4thCol, totally, Row31, _Amount
Ans:
Price*Qty cannot be used because ‘*’ is not allowed in as identifier name
class can’t be used because it is a keyword
For can be used
do can be used
4thCol can’t be used because it starts with a number
totally can be used
Row31 can be used
__Amount can be used
Q.6. How are floating constants represented in Python? Give example to support
your answer.
Ans:
Represent real numbers and are written with a decimal point dividing the integer and
fractional parts. floating constant can be written in fractional as well as in exponent form.
Q.7. How are string-literals represented and implement in Python?
Ans:
Single line string Text1= “Hello World”
Mutiline strings with backslash Text2=
“Hello\
World”
Triple quote Text3 =
”’Hello
World”’
Q.8.What are operators ? what is their function? Give examples of some unary and
binary operators.
Ans:
Operators are token that trigger some computational / action when applied to variables
and other objects in an expression.
The operators can be arithmetic operators(+,-,*,/,//), bitwise operators, shift operators,
identity operators, relational operators, assignment operator. Uniary operator that
applies on one operator like -5. Binary operator that works on two operators like a+b,
c-d.
Q.9. What is an expression and a statement?
Ans:
An expression is any valid combination of operators, literals and variables. e.g. x>y, x+y
A statement is an instruction that the Python interpreter can execute, e.g. x = 5
Q.10. What all components can a python program contains ?
Ans:
Expressions , functions , comments , statement , Block.
Q.11. What are variable? How are they important for a program?
Ans:
Variable represent labelled storage locations, whose values can be manipulated during
program run.
As they are manipulated from input to output and do much things in the program
during runtime , That’s why they are important.
Q.12. Describe the concepts of block or suite and body. What is indentation and
how it is related to block and body ?
Ans:
There are various statements in same indentation level which is called block or suite.
Body is for all of the program but due to use for loop , if else case different indentation
from next line is required.Body whole program and block same indentation code.
Q.13. What are data types? How are they important.
Ans:
Data types are means to identify type of data and set of valid operations for it. They are
important as they are manipulated in program to give useful data.
Q.14. How many integer types are supported by python? Name them.
Ans:
There are two types of integers in Python:
i. Integers. It is the normal integer representation of whole numbers.
ii.Booleans. These represent the truth values False and True.
Q.15.What are immutable and mutable types? List immutable and mutable types of
Python.
Ans:
The immutable types are those that can never change their value in place. Example-
Integers, Floating point numbers, Booleans, strings, tuples.
Mutability means that in the same memory address, new value can be stored as and
when we want. Example- Lists, dictionaries and sets.
Q.16.What is the difference between implicit type conversion and explicit type
conversion?
Ans:
Implicit type – Where no one need to especially link a data type to a variable . Example –
a=6 #int
b=1.0 #float
c=a+b #float
Explicit type- where the system forces to be of a data type . Example-
a=6.3
int(a)
Now a has become integer type.
Q.17.An immutable data type is one that cannot change after being created. Give
three reasons to use immutable data.
Ans:
Three reasons to use immutable data types are:
· Immutable objects improve correctness and clarity. It provides a logical way to reason
about the code. As the value of the object won’t change throughout the execution of the
program, we can freely pass around objects without the fear of modification.
· They are better to be used when it is certain that no changes will be made to the
variable afterwards.
· They are more faster than their mutable counterparts, e.g. tuples are faster than lists.
18. What is entry controlled loop? Which loop is entry controlled loop in Python?
Ans:
In entry controlled loop first the statement is checked if the statement is positive then
the loop starts. While loop is entry controlled loop in Python.
19. Explain the use of the pass statement. Illustrate it with an example.
Ans:
Pass statement is an empty statement which passes the statement to the next statement.
Example-
def sub() #you will be writing the code afterwards but for the interpretation to happen
you need to write pass in next line
pass.
20. Below are seven segments of code, each with a part coloured. Indicate the data
type of each coloured part by choosing the correct type of data from the following
type.
Ans:
i) boolean
ii)string
iii)List of string
iv)integer
v)Boolean
vi)List of string
vii)String

Application Based Questions : Python Revision Tour Class 12 Solved


Assignment
Q.1: Fill in the missing lines of code in the following code. The code reads in a limit
amount and a list of prices and prints the largest price that is less than the limit.
You can assume that all prices and the limit are positive numbers. When a price 0 is
entered the program terminates and prints the largest price that is less than the
limit.
# Read the limit
limit = float(input(“Enter the limit”))
max_price = 0
# Read the next price
next_price = float(input(“Enter a price or 0 to stop:”))
while next_price > 0:
<write your code here>
#read the next price
<write your code here>
if max_price>0:
<write your code here>
else :
<write your code here>
Answer:
limit = float(input(“Enter the limit”))
max_price = 0
# Read the next price
next_price = float(input(“Enter a price or 0 to stop:”))
while next_price > 0:

if next price < limit and max_price > next price :


max_price = next price
#read the next price

if max_price>0:

print( max_price )
else :
Pass
Q: 2.Predict the outputs of the following programs :
Q:2.a)
count=0
while count<10:
print(“hello”)
count +=1
Answer:
hello
hello
hello
hello
hello
hello
hello
hello
hello
hello
Q:2.b)
x=10
y=0
while x>y:
print(x,y)
x=x-1
y=y+1
Answer:
10 0
91
82
73
64
Q:2.c)
Keepgoing= True
x=100
while keepgoing:
print(x)
x=x-10
if x<50:
keepgoing=false
Answer:
100
90
80
70
60
50
Q:2.d)
x=45
while x<50:
print(x)
Answer:
45
45
45…..print like this infinite times
Q:2.e)
for x in [1,2,3,4,5]:
print(x)
Answer:
1
2
3
4
5
Q:2.f)
for p in range (1,10):
print(p)
Answer:
1
2
3
4
5
6
7
8
9
Q:2.g)
for z in range (-500,500,100):
print(z)
Answer:
-500
-400
-300
-200
-100
0
100
200
300
400
Q:2.h)
x=10
y=5
for x in range (x-y*2):
print(“%”,i)
Answer:
No output

Q:2. i)
c=0
for x in range (10):
for y in range(5):
c+=1
print(c)
Answer:
50

Q:2. j)
x=[1,2,3]
counter=0
while counter < len(x):
print(x[counter]*”%”)
for y in x:
print(y*’*’)
counter +=1
Answer:
%
*
**
***
%%
*
**
***
%%%
*
**
***
Q:2. k)
for x in ‘lamp’:
print(str.upper(x))
Answer:
L
A
M
P
Q:2. l)
x=’one’
y=’two’
counter=0
while counter < len(x):
print(x[counter],y[counter])
counter +=1
Answer:
ot
nw
eo
Q:2. m)
x=”apple,pear,peach”
y=x.split(“,”)
for zin y:
print(z)
Answer:
apple
pear
peach
Q:2. n)
x=’apple,pear,peach,grapefruit’
y=x.split(“,”)
for z in y:
if z<‘m’:
print(str.lower(z))
else:
print(str.upper(z))
Answer:
apple
PEAR
PEACH
grapefruit
Q: 3.Find and write the output of the following python code:
for Name in [‘jayes’,’ramya’,’Taruna’,’suraj’]:
print(Name)
if Name[0]==’T’:
break
else:
print(‘Finished!’)
print(‘Got it ! ‘)
Answer:
jayes
Finished!
ramya
Finished!
Taruna
Got it !
Q: 4.How many times will the following for loop execute and what’s the output?
(i)
for i in range(-1,7,-2):
for j in range(3):
print(1,j)
Answer:
No output
Q: 4 (ii)
for i in range(1,3,1):
for j in range(i+1):
print(‘*’)
Answer:
*
*
*
*
*
Q: 5. Is the loop in the code below infinite? How do you know before you run it?
m=3
n=5
while n<10:
m=n-1
n=2*n-m
print(n,m)
Answer:
The code is finite.
we can find whether the code is infinite by checking the while condition . Which changes
or remain the same and always all time according to that condition is checked it comes
out true.

Programming practice knowledge based questions :


Python Revision Tour Class 12 Solved Assignment
Q: 1. Write a program to print one of the words negative, zero, or positive,
according to whether variable x is less than zero, zero or greater than zero,
respectively.
Answer:
a=int(input("Enter the number"))
if a>0 :
print("greater than zero")
if a==0:
print("zero")
if a<0:
print("less than zero")
Q: 2. Write a program that returns True if the input number is an even number,
False otherwise.
Answer:
a=int(input("Enter the number"))
if a%2==0:
print("number is even")
else:
print("false")
Q: 3. Write a Python program that calculates and prints the number of seconds in a
year.
Ans:
a=606024*365
print(a)
Q: 4. Write a Python program that accepts two integers from the user and prints a
message saying if first number is divisible by second number or if it is not.
Answer:
a=int(input(“enter the first number”))
b=int(input(“enter the second number”))
if (a%b)==0:
print(“First number is divisible by second number”)
else:
print(“it is not divisible”)
Q: 5. Write a program that asks the user the day number in a year in the range 2 to
365 and asks the first day of the year- sunday or Monday or Tuesday etc. Then the
program should display the day on the day number that has been input.
Answer:
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday", "Sunday"]

firstday = input("Enter the first day of the year: ")

index = days.index(firstday)

day = int(input("Enter a number between 2-365: "))

print(days[index+(day%7)])
Q: 6. One foot equals 12 inches. Write a function that accepts a length written in
feet as an argument and returns this length written in inches. Write a second
function that asks the user for a number of feet and returns this value. Write a
third function that accepts a number of inches and displays this to the screen. Use
these three functions to write a program that asks the user for a number of feet
and tells them the corresponding number of inches.
Answer:
ft=float(input(“Enter the ft”))
inch=ft*12
print(inch, “this is the number of inches”)
Q: 7. Write a program that reads an integer N from the keyboard computes and
displays the sum of the numbers from N to (2*N) if N is nonnegative. If N is a
negative number, then it’s the sum of the numbers from (2*N) to N. The starting
and ending points are included in the sum.
Answer:
n = int(input(“Enter a number: “))
m=2*n
if n > 0:
sum = 0
for i in range(n, m+1):
sum += i
print(sum)
elif n < 0:
sum = 0
for i in range(m, n+1):
sum += i
print(sum)
else:
print(“Enter a valid no. “)
Q: 8. Write a program that reads a date as an integer in the format MMDDYYYY.
The program will call a function that prints print out the date in the format
<Month Name><day>, <year>.
Answer:
dt = input(“Enter date in the format MMDDYYYY: “)
if dt[0] == “0”:
if dt[1] == “1”:
a = “January”
elif dt[1] == “2”:
a = “February”
elif dt[1] == “3”:
a = “March”
elif dt[1] == “4”:
a = “April”
elif dt[1] == “5”:
a = “May”
elif dt[1] == “6”:
a = “June”
elif dt[1] == “7”:
a = “July”
elif dt[1] == “8”:
a = “August”
elif dt[1] == “9”:
a = “September”
elif dt[1] == “10”:
a = “October”
elif dt[0] == “1”:
if dt[1] == “2”:
a = “November”
elif dt[1] == “12”:
a = “December”
print(a,” “, dt[2],dt[3],”,”, ” “, dt[4:], sep = “”)
Q.9.Write a program that prints a table on two columns – table that helps
converting miles into kilometers.
Ans:
mile = []

kilometer = []

choice = 1

while choice != 0:
a = int(input("Enter the distance in miles: "))

mile.append(a)

kilometer.append(a*1.6)

print(a, "miles is", a*1.6, "kilometers")

choice = int(input("Enter 1 to continue or 0 to quit: "))


print(" Miles|Kilometers ")

for i in range(len(mile)):

print(" ",mile[i],"|",kilometer[i]," ")


Q.10. Write another program printing a table with two columns that helps convert
pounds in kilograms.
Ans:
pound = []

kilogram = []

choice = 1

while choice != 0:

a = int(input("Enter mass in pounds: "))

pound.append(a)

kilogram.append(a*0.45)

print(a, "pounds is", a*0.45, "kilograms")


choice = int(input("Enter 1 to continue or 0 to quit: "))

print(" Pounds|Kilograms")

for i in range(len(pound)):

print(" ",pound[i],"|",kilogram[i]," ")


Q.11.Write a program that reads two times in military format (0900, 1730) and
prints the number of hours and minutes between the two times.
Answer:
a = int(input("Please enter the 1st time: "))

b = int(input("Please enter the 2nd time: "))

c = b - a

if c > 1000:

c = str(c)

print(c[0],c[1], " ", "hours", " ", c[3],c[4]," ", "minutes",


sep = "")
else:

c = str(c)

print(c[0], " ", "hours", " ", c[1],c[2]," ", "minutes", sep
= "")

Python Revision Tour 2 Solutions


Short Answer Questions
Q.1.What is the internal structure of python strings?
Answer:
Strings in python are stored by storing each character separately in contiguous(next or
together in sequence) locations. The characters are given two-way indices:
0,1,2,… size-1 in the forward direction and
-1,-2,-3,…., -size in the backward direction.
Q.2. Write a Python script that traverses through an input string and prints its
characters in different lines- two characters per line.
Answer:
s=input(“Enter the string”)
for i in range(0,len(s),2) :
print(“/n”,s[0+i],s[1+i])
Q.3.Discuss the utility and significance of lists, Briefly.
Answer:
A list is a standard data type of Python that can store a sequence of values belonging to
any type.
The size of a list is not needed to be preset.
Often we need to store a group of values to use them later in the program, this is done
using lists, e.g.
L = [‘c’, 5, 67.5, False]
Q.4.What do you understand by mutability? What does “in place” task mean?
Answer:
Mutability means that in the same memory address, new value can be stored as and
when we want. Mutable types are those values can be changed in place means the
changes can occur at the same memory location.
Q.5.Start with the list [8,9,10].Do the following:
a) Set the second entry (index 1) to 17
b) Add 4, 5 and 6 to the end of the list
c) Remove the first entry from the list
d) Sort the list
e) Double the list
f) Insert 25 at index 3
Ans:
l = [8, 9, 10]
a) Set the second entry (index 1) to 17
l[1] = 17
b) Add 4, 5 and 6 to the end of the list
l.extend( [4, 5, 6] ) # extend function can extend the list with the list given in the
argument
c) Remove the first entry from the list
del l[0] # del to remove an element
d) Sort the list
l.sort( ) # sorts the original list
e) Double the list
l = 2 * l # this will be equal to l + l
f) Insert 25 at index 3
l[3] = 25
Q.6. What’s a[1:1] if a is a string of at least two characters? And What if string is
shorter?
Answer:
Empty string
Q.7.What are the two ways to add something to a list? How are they different?
Answer:
Append and Extend
L.append(4) // can only add a element.
L.extend[1,3,4] //add many elements in a list.
Q.8.What are the two ways to remove something from a list? How are they
different?
Answer:
pop(<index>) : pops the element at the index given and returns the value
remove(<value>) : removes the value from the list, nothing is returned
Q.9. What is the difference between a list and a tuple?
Answer:
List is mutable. Tuple is immutable.
In list datatypes can be added and deleted. In tuple nothing can be added or deleted.
Q.10.In the Python shell , do the following:
(i)Define a variable named states that is an empty list.
(ii) Add ‘Delhi’ to the list.
(iii)Now add ‘Punjab’ to the end of the list.
(iv)Define a variable states2 that is initialized with ‘Rajasthan’, ‘Gujrat’ and ‘Kerala’.
(v)Add ‘Odisha’ to the beginning of the list.
(vi)Add ‘Tripura’ so that it is the third state in the list
(vii)Add ‘Haryana’ to the list so that it appears before ‘Gujrat’ in the list.
(viii)Remove the 5th state from the list and print that state’s name.
Answer:
Q.11. Discuss the utility and significance of Tuples, briefly.
Answer:
The tuples are immutable . They are used when the size and elements to be stored are
already known. It can store different type of data.
written as tup=(9,10,1). We cannot change the value or add or delete values in Tupple.
Q.12.If a is (1,2,3)
a) what is the difference (if any) between a * 3 and (a, a, a)?
b) is a * 3 equivalent to a + a + a ?
c) what is the meaning of a[1:1]?
d) what’s the difference between a[1:2] and a[1:1]?
Ans:
a) what is the difference (if any) between a * 3 and (a, a, a)?
a * 3 is a tuple of 9 elements, that is, the original 1, 2 and replicated thrice where as (a, a,
a) is a tuple of 3 tuples each tuple being a.
a * 3 = (1, 2, 3, 1, 2, 3, 1, 2, 3)
(a, a, a) = ((1, 2, 3), (1, 2, 3), (1, 2, 3))

b) is a * 3 equivalent to a + a + a?
Yes, they both are equal to (1, 2, 3, 1, 2, 3, 1, 2, 3)

c) what is the meaning of a[1:1]?


It is an empty slice of the original tuple a
d) what is the difference between a[1: 2] and a[1: 1]?
a[1: 2] is equal to a[1] or 2 where as a[1: 2] is an empty slice, that is, ( )
Q.13. What is the difference between (30) and (30,) ?
Answer:
(30) is an integer type.
(30,)is a tuple type.
Q.14. Why is a dictionary termed as an unordered collection of objects.
Ans:
Dictionary is termed as an unordered collection of objects because it doesn’t remember
the order of positioning of its elements but just the mapping of its keys and values. For
e.g. if
a = {1 : “a”, 2 : “b”}
b = {2 : “b”, 1 : “a”}
a == b is True
Q.15. What type of objects can be used as keys in dictionaries?
Ans:
All immutable type objects can be used as keys in python. Key cannot be of mutable
type object.
Q.16. Though tuples are immutable type, yet they cannot always be used as keys in
a dictionary. What is the condition to use tuples as a key in a dictionary?
Answer:
Directly or indirectly the Tuple must not contain any mutable objects. All the elements in
Tuple should be immutable .
Q.17. Dictionary is a mutable type, which means you can modify its contents? What
all is modifiable in a dictionary? Can you modify the keys of a dictionary?
Answer:
We can add key value pair in the Dictionary. Keys a re immutable and hence they are not
modifiable. Values are modifiable in a dictionary.
Q.18.How is del D and del D[<key>] different from one another if D is a dictionary?
Answer:
del D is used to delete the whole dictionary while del D[<key>] is used to delete only the
key : value pair with the given key.
Q.19. Create a dictionary named D with three entries, for keys ‘a’, ‘b’, and ‘c’. What
happens if you try to index a nonexistent key (D[‘d’])? What does Python do if you
try to assign to a nonexistent key d?
Ans:
If we try to call with a non-existing key, python will raise an error.
If we try to assign to a non-existent key, an new key : value pair will be added to the
dictionary, e.g.
Q.20.What is sorting? Name some popular sorting techniques.
Ans:
Sorting refers to arranging elements in a specific order – ascending or descending.
Some popular sorting techniques or algorithms are Bubble sort, Insertion sort, Selection
sort, Heap sort, Quick sort etc.
Q.21. Discuss Bubble sort and Insertion sort techniques.
Ans:
Insertion sort:
· In insertion sort – divide the array into a sorted part and an unsorted part. After each
pass the sorted part increases by 1 and the unsorted part decreases by 1.
· In the first step we choose the second element and compare it to the first element and
swap if second element is smaller than the first one. Now 1st and 2nd elements are the
sorted part and all other elements are the unsorted part.
· Now in each step we choose an element starting from the 3rd element compare it to its
previous elements while it is smaller than them and then put it at its correct position in
the sorted array.
· For instance the array a = [42, 29, 74, 11, 65] will be sorted like this,
a = [29, 42, 74, 11, 65]
a = [11, 29, 42, 74, 65]
a = [11, 29, 42, 65, 74]
Bubble sort:
· In bubble sort, two adjoining values are compared repetitively and then heavier one
gets down the array. In each pass the heaviest element gets settled to its appropriate
position, e.g. search and place heaver element.
· For array 35, 6, 8, 11, 15, 9, 7, 22, 41
· After first pass the array becomes,
· 6, 8, 11, 15, 9, 7, 22, 35, 41
· And after the second pass the array becomes
· 6, 8, 11, 9, 7, 15, 22, 35, 41
· This continues until the whole array is sorted.
Application Based Questions : Python Revision Tour 2 Solutions
Q.1. What will be the output produced by the following code fragments?
a) y=str(123)
x=”hello”*3
print(x,y)
x=”hello”+”world”
y=len(x)
print(y,x)
Answer:
Output:
hellohellohello 123
10 helloworld
b)
x=”hello”+”to python”+”world”
for char in x:
y=char
print(y,’:’)
Ans:
Output:
h :
e :
l :
l :
o :
t :
o :
:
p :
y :
t :
h :
o :
n :
w :
o :
r :
l :
d :
c)
x=”hello world”
print(x[:2],x[-2],x[-2:])
print(x[6],x[2:4])
print(x[2:-3],x[-4:-2])
Ans:
he l ld
w ll
llo wo or
Q.2.Write a short Python code segment that adds up the lengths of all the words in
a list and then prints the average (mean) length. Use the final list from previous
question to test your program.
Ans:
Code:
a = eval(input(“Enter list: “))
a=0
for i in a:
n += len(i)
print(“Mean length is: “, n/len(a))
Q.3.Predict the output of the following code snippet?
a = [ 1, 2, 3, 4, 5 ]
print( a[ 3 : 0 : -1 ] )
Ans:
Output: [ 4, 3, 2 ]
Q.4.Predict the output of the following code snippet?
(a)
arr=[1,2,3,4,5,6]
for i in range(1,6):
arr[i-1]=arr[i]
for i in range(0,6)
print(arr[i],end=””)
Ans: Output: 2 3 4 5 6 6
(b)
Numbers=[9,18,27,36]
for Num in Numbers:
for N in range(1,Num%8):
print(N,”#”,end=””)
print()
Ans:
1#
1#2#
1#2#3#
Q.5. Find the errors. State reasons?
(a)
t=(1,”a”,9.2)
t[0]=6
Answer:
Error tuples are immutable.cannot be changed.
(b)
t=[1,”a”,9.2]
t[0]=6
Answer:
No error.
(c)
t = [ 1, “a”, 9.2 ]
t[4] = 6
Ans:
Error: Index 4 doesn’t exist
d)
t = ‘hello’
t[0] = “H”
Ans:
Error: Strings are immutable and its characters can’t be changed
e)
for Name in [ Amar, Shveta, Parag ]
IF Name[0] = ‘S’:
print( Name )
Ans:
Error:
· The names are not defined, they should be in quotes, “:” is missing in for loop.
· IF is not a keyword, ‘if’ should be used, single ‘=’ is used for assignment, ‘==’ should be
used.
Q6. Assuming words is a valid list of words, the program below tries to print the
list in reverse. Does it have an error? If so, why?
for i in range(len(words),0,-1):
print(world[i],end=”)
Answer:
The range is setted to zero so nothing will be printed. length is positive.
7.What would be the output of following code if ntpl =
(“Hello”,”Nita”,”how’s,”life”)?
(a,b,c,d)=ntpl
print(“a is :”,a)
print(“b is :”,b)
print(“c is :”,c)
print(“d is :”,d)
ntpl= (a,b,c,d)
print(ntpl[0][0]+ntpl[1][1],ntpl[1])
Answer:
Output:
a is: Hello
b is: Nita
c is: How’s
d is: life ?
Hi Nita
8.What will be the output of the following code?
tuple_a=’a’,’b’
tuple_b=(‘a’,’b’)
print(tuple_a==tuple_b)
(a)0
(b)1
(c)false
(d)True
Ans:
Tuples can be defined in both the value shown above. it will show True (d) option.
9. What will be the output of the following code snippet?
rec = { “Name” : “Python” , “Age” : “20” , “Addr” ; “NJ” , “Country” : “USA”}
id1 = id(rec)
del rec
rec = { “Name ” : “Python” , “Age” : “20” , “Addr ” ;”NJ”, “Country ” : “USA”}
id2=id(rec)
print (id1==id2)
(a ) true
(b) false
(c) 1
(d) exception
Answer:
(a)True
10. What will be the output of the following code snippet?
my_dict={}
my_dict[(1,2,4)]=8
my_dict[(4,2,1)]=10
my_dict[(1,2)]=12
sum=0
for k in my_dict:
sum +=my_dict[k]
print(sum)
print(my_dict)
Answer:
30
{(1, 2, 4) : 8, (4, 2, 1) : 10, (1, 2) : 12}
11. Write a method in python to display the elements of list thrice if it is a number
and display the element terminated with ‘#’ if it is not a number.
Ans:
Code:
l = [‘41’, ‘DROND’, ‘GIRIRAJ’, ‘13’,’zara’]
for word in l:
if word.isdigit( ): # check if all character are digits
print(word*3)
else:
print(word+’#’) # print word+’#.
12. Name the function/method required to
(i) check if a string contains only uppercase letters
(ii) gives the total length of the list.
Ans:
(i)
x=”ASDFGHJK”
print(x.isupper( )) # True
(ii)
L=[p,q,r]
print(len(L))
Programming based Questions : Python Revision Tour 2 Solutions
1.Write a program that prompts for a phone number of 10 digits and two dashes,
with dashes after the area code and the next three numbers. For example, 017-555-
1212 is a legal input. Display if the phone number entered is valid format of not
and display if the phone number is valid or not (i.e., contains just the digits and
dash at specific places).
Answer:
i=0
n = input("Enter a 10 digit phone number: ")

if len(n) == 12:

if n[3] == "-" and n[7] == "-":

count = 0

#print(i)
for i in n:

if i.isdigit():

count+=1

if count == 10:

print("Valid Number")
else:

print("Please enter only digits")

else:

print("Please enter a '-' after the area code and the


next numbers")

#print(i)
else:
print("Invalid Length")
2. Write a program that should prompt the user to type some sentence(s) followed
by “enter”. It should then print the original sentence(s) and the following statistics
relating to the sentence(s):
Ans:
a = input("Enter a sentence and type enter at the end: ")

if a[-1: -6: -1][::-1] == "enter":

l=a.split()

print("There are", len(l)-1, "words")

print("There are", len(a)-6, "characters")

alnum = -5

for i in a:

if i.isalnum():

alnum+=1

print((alnum/(len(a)-6))*100, "% of characters are


alphanumeric")

else:

print("You did not type enter at the end of your sentence")


3. Write a program that takes any two lists L and M of the same size and adds their
elements together to form a new list N whose elements are sums of the
corresponding elements in L and M. For instance, if L=[3, 1, 4] and M=[1, 5, 9],
then N should equal [4, 6, 13]
Ans:
l = eval(input("Enter a list of numbers: "))

n = eval(input("Enter a list of numbers with the same no of


elements as the previous list: "))

a = []

for i in range(len(l)):

a.append(l[i]+n[i])

print(a)
4.Write a program that rotates the elements of a list so that the element at the first
index moves to the second index, the element in the second index moves to the
third index, etc., and the element in the last index moves to the first index..
Ans:
n = eval(input("Enter a list: "))

n.insert(0,n[-1])
del n[-1]

print(n)
5.Write a short Python code segment that prints the longest word in a list of
words.
Answer:
a = eval(input("Enter a list of strings: "))

large = ''

for i in a:

if len(i)>len(large):

large=i

print(large)
6. Write a program that creates a list of all the integers less than 100 that are
multiples of 3 or 5.
Answer:
a = []

for i in range(1, 101):

if i%3==0 or i%5==0:

a.append(i)

print(a)
7.Define two variables first and second so that first = “Jimmy” and second =
“Johny”. Write a short Python code segment that swaps the values assigned to
these two variables and prints the results.
Answer:
first = "Jimmy"

second = "Johnny"

first, second = second, first

print(first)

print(second)
8.Write a Python program that creates a tuple storing first 9 terms of Fibonacci
series.
Answer:
l = [0,1]

a = 0

b = 1

c = 0
for i in range(7):

c = a+b

a = b

b = c

l.append(c)

print(tuple(l))
9.Create a dictionary whose keys are month names and whose values are the
number of days in the corresponding months.
Answer:

d = {"January":31, "February":28, "March":31, "April":30,


"May":31, "June":30, "July":31, "August":31, "September":30,
"October":31, "November":30, "December":31}

a = input("Enter the name of the month: ")

for i in d.keys():

if i==a:

print("There are ",d[i],"days in ",a)

print()

print("Months arranged in alphabetical order: ", end="")

b=[]

for i in d.keys():
b.append(i)

b.sort()

print(b)

print()

print("Months with 30 days: ", end="")

for i in d.keys():

if d[i]==30:

print(i, end="")

print()

print()
c = [("February",28)]

for i in d.keys():
if d[i]==30:

c.append((i,30))

for i in d.keys():

if d[i]==31:

c.append((i,31))

print(c)
10. Write a function called addDict(dict1, dict2) which computes the union of two
dictionaries. It should return a new dictionary, with all the items in both its
arguments (assumed to be dictionaries). If the same key appears in both
arguments, feel free to pick a value from either.
Answer:

def addict(dict1, dict2):

dict1.update(dict2)

print(dict1)

a=eval(input("Enter a dictionary: "))

b=eval(input("Enter another dictionary: "))

print(addict(a,b))
11.Write a program to sort a dictionary’s keys using Bubble sort and produce the
sorted keys as a list.
Answer:
a = eval(input("Enter a dictionary: "))

b = a.keys()

c = []

for i in b:

c.append(i)

for i in range(len(c)):

for j in range(len(c)-i-1):

if c[j]>c[j+1]:

c[j],c[j+1]=c[j+1],c[j]

print(c)
12. Write a program to sort a dictionary’s values using Bubble sort and produce the
sorted values as a list.
Answer:
a=eval(input("Enter a dictionary: "))

b=a.values()

c = []

for i in b:

c.append(i)

for i in range(len(c)):

for j in range(len(c)-i-1):

if c[j]>c[j+1]:

c[j],c[j+1]=c[j+1],c[j]

print(c)

Computer Network

Q.1. What is a computer network ?

Answer:
Two or more autonomous computing devices connected to one another to exchange
information or share resources, form a computer network.

Q.2. What are the advantages and disadvantages of networks ?

Answer:
Advantages of network-
Share resources : such as printers and scanners. This is cheaper than buying equipment
for each computer.
Share storage : being able to access files from any machines on the network can share
data.
Can share software : Software can be installed centrally rather than on a machine.
Metering software can then be usednto limit the number of copies being run at any one
time.
Improve communications: Messages can be sent

Disadvantages of network-
The system are more sophisticated and complex to run. This can add to costs and you
may need specialist staff to run the network.
If networks are badly managed, services can become unusable and productivity falls.
If software and files are held centrally , it may be impossible to carry out any work if the
center server fails. People become reliant on the communication, if these fail, it can cause
havoc.
File security is more important especially if connected to WANs e.g.. protection from
viruses.

Q.3.Write about the major component of computer networks.

Answer:
(a) Host or Nodes. The term host or node refers to computers that are attached to a
network and are seeking to share the resources of the network.
(b) Server. A server facilitates networking tasks like sharing of data, resource-sharing,
communication among hosts etc.
(c)Clients. A client is a host computer that request from some service from a server.
(d)Network hardware. Establishing corrections, controlling network traffic etc. Example-
NIC,HUB,SWITCH,ROUTER, many others.
(e)Communication channel. Can be wired or wireless.
(f) Software. The software layers of a network makes networking possible. These
comprise of network protocols,network operating system etc.
(g)Network services- Application that provide different functionalities over a network,
such as DNS(Domain name System),file sharing, VOIP and many more.

Class 12 Computer Science Computer Network Notes

Q.4.Types of networks based on Geographical Spread.

Answer:
LAN(local area network) are confined to a localised area Network.
WAN(wide area network) is a group of computers that are separated by large distances
and tied together.

Q.5. Types of network by component roles.

Answer:
Peer – to – Peer networks: Each computer on a peer-to -peer network is equal. Each
componenet can play the role of a client or a server.
Client- server network: Bigger networks prefer to have centralized control. They do this
clearly designating servers and clients. Such network are called client-server networks oe
even master-slave networks.

Q.6. Differences between client-server and P2P networks.

Answer:

client-server P2P
The server controls security of the
security No central control over security
network.
The server manages the network. Need a
No central control over the
Management dedicated team of people to manage the
network. Anyone can set up.
server.
clients are not dependent on a
Dependency client are dependent on the server.
central server.
If machines on the network are
The server can be upgraded to be made
Performance slow they will low down other
more powerful to cope with high demand.
machines.
Q.7. Type of network based on communication channel.

Answer:
(i) Wired Computer Networks
a. Twisted pair cable- is a pair of insulated wires that are twisted together to improve
electromagnetic capability and to reduce noise from outside sources.
b. Co-axial Cable- consists of a solid wire core surrounded by one or more foil or wire
shields, each separated by some kind of plastic insulator.
c. Fibre Optic Cable- A fibre optic cable consists of a bundle of glass threads each of
which is capable of transmitting messages modulated onto light waves.
(ii)Wireless computer network
a. Microwave- used in mobile phone
b. Radio- used in radio program.
(iii) Satellite- is a case of microwave relay system.

Q.8.Full form of NIC?use?

Answer: Network- interface -card is a device that is attached to each of the workstations
and the server. NIC is also called Terminal Access Point (TAP).

Q.9. MAC adress ?

Answer: A unique physical address to each NIC , this physical address is known as Media
Access control address.

Q.10.What is hub ? Types of hub?

Answer:
A hub is a hardware device used to connect several computer together. A hub contains
multiple independent but connected modules of network and inter-networked
equipment. A similar term is concentrator. A concentrator is a device that provides a
central connection point for cables from workstation, servers and peripherals.
Two type of hubs
Active hubs – electrically amplify the signal as it moves from one connected device to
another.A ctive hubs are used like repeaters to extend the length of the network.
Passive hubs- allow the signal to pass from one computer to another without any
change.
Class 12 Computer Science Computer Network Notes

Q.11.What is a Switch?

Answer: A switch is a device that is used to segment networks into different subnetworks
called subnets or LAN segments.

Q.12. Working of a Bridge?

Answer: Bridges are smart enough to know which computers are on which side of the
bridge, so they only allow those messages that need to get to the other side to cross the
bridge.

Q.13. What is a Router?

Answer: Based on a network road map called routing table , routers can help ensure that
packets are travelling the most efficient path to their destinations.

Q.14. What is a Gateway?

Answer: The gateway is the computer that routes the traffic from a workstation to the
outside network that is serving the web pages.

Q.15. What is an Access point ?

Answer: An access point (AP), also called wireless access point(WAP), is a hardware
device that establishes connections of computing devices on wireless LAN with a fixed
wire network.

Q.16. What is cloud computing?

Answer: Cloud computing is Internet-based computing, whereby shared resources,


software and information are provided to computers and other devices on demand.

Q.17. Type of clouds ? Explain them.

Answer:
1. Private clouds-These are the clouds for exclusive use by a single organization and
typically controlled, managed and hosted in private data centers.
2. Public clouds- These are the clouds for use by multiple organization (tenants) on a
shared basis and hosted and managed by a third party service provider.
3.community clouds- These are the clouds for use by a group of related organizations
who wish to make use of a common cloud computing environment
4.Hybrid clouds- When a single organization adopts private and public clouds for a
single application in order to take advantage of the benefits of both.

Q.18. What is Internet of Things?

Answer- IOT is a technology that connects the things to the internet over wired or
wireless connections

Class 12 Computer Science Computer Network Notes.

Q.19. What is RFID ?

Answer: RFID (Radio Frequencies Identification) is designed to use radio waves to read
and capture information stored on a tag, called an RFID tag attached to an object.

20.Which devices can form IOT?

Answer:
a) Home appliances
b) Wearables
c) Vehicles
d) Factories
e) Agriculture
f) Food

Q.21. What is modulation and demodulation?

Answer: A message signal that carries the data to be transmitted, needs to be imposed
on top of the carrier signal. These process is termed as modulation. Demodulation is the
reserve process of modulation where data is extracted from the received signal.

Q.22. Working of amplitude and frequency modulation?

Answer:
Amplitude modulation-That amplitude is the height of the carrier wave, if, we can tweak
the height of the carrier so that it shows the impact of data/message signal.
Frequency modulation- The frequency modulation, the frequency of the carrier signal is
varied as per the changes in the amplitude of the modulating signal.

Q.23. What is collision in wireless network?

Answer: Transmitting over a shared communication medium requires that at a time, only
one sender and one receiver use the communication medium. If multiple nodes on the
same network transmit data at the same time, it leads to a condition called collision and
data gets lost. In a computer network , collision is a specific condition that occurs when
two or more nodes on a network transmit data at the same time.

Q.24.Difference between full Duplex and Half-Duplex COMMUNICATION.

Answer:
Two way communication where sending and receiving takes place simultaneously, is
called full Duplex.
Wireless network cannot listen while transmitting is called Half Duplex.

Q.25. Which method is used for collision detection in wired and wireless ?

Answer:
CSMA/CA(carrier sense multiple access/ collision avoidance) for wireless , CSMA/CD
(carrier sense multiple access/collision detection for wired.

Q.26. How CSMA/CA works ?

1. Node ready to tansmit/talk.


2. Listen for other nodes, if any transmission is taking place.
2.1 BUSY. A transmission is taking place.
2.1.1 Increase back off or wait time
2.1.2 Sleep as per BEB (Binary Exponential Backoff ))
2.2 Free. No transmission is taking place.
2.2.1 Send Message
2.2.2 Verify it proper transmission has taken place using one of the following methods:
(a) ACK (acknowledgement) Method
(b)Request to send / clear to send (RTS/CTS) Method.
Two version of CSMA/CA
1.with ACK (Acknowledgement) method
1.Transmits data to another node, the receiving node must send an acknowledgement
signal called ACK, once it has received the data.
2.with RTS/CTS
1. The sender node first sends an RTS signal to its receiver. Reciever confirms its
readiness to receives by sending a CTS signal to the sender as well as all other nodes.

Q.27. Explain Single-bit , Multiple-bit and Burst error ?

Answer:
Single-bit error- If only one bit of the transmitted data got changed from 1 to 0 or from
0 to 1.
Multiple-bit error- If two or more consecutive bits in data changed from 0 to 1 or from 1
to 0.
Burst Error- If two or more consecutive bits in data got changed from 0 to 1 or from 1 to
0.
Q.28. What is Single Dimensional Parity Checking? Advantages and disadvantages?

Answer:
Numbers of 1’s is counted in the actual data unit
Add an extra bit called the parity bit to actual data so that the number of 1 ‘s along with
the extra bit, become or remain even.
Advantages-
1) It is a simple mechanism, which is easy to implements.
2) It is an inexpensive technique for detecting the errors in data transmission.
Drawbacks-
1)It can detect only single-bit errors which occur rarely.
2) If, in the data transmitted , two bits gets interchanged then even through data gets
affected , but the parity bit remain correct . In such cases , this technique cannot detect
the errors.

Q.29. What is two- Dimensional Parity checking? Advantages and disadvantages ?

Answer:
Calculating the parity bits for each data unit row- wise and column-wise.
Advantage of two- Dimensional –
(I) It is more efficient than single dimensional parity technique.
(ii) It can detect multiple bit error also, which sometimes single dimensional parity
checking technique cannot.
Disadvantage-
(I) Cannot detect compensating multiple bit errors.
(ii) This technique cannot detect 4 – or more-bits errors in some cases.

Class 12 Computer Science Computer Network Notes

Q.30. What is check sum and how does it operates ?

Answer:
The checksum refers to a sum of data bits calculated from digital data that is used to
ensure the data integrity at the reciever’s end.
Operates like-
a) At the sender node , before transmission
(i) The data being transmitted is divided into equal sized k number of segments , where
each segment contains m number of bits.
(ii) The divided k segments are added using 1’s complement arithmetic and extra bits are
added back to the sum.
(iii)The final sum’s complement is calculated . This is the checksum.
(iv) Now all the data segment is sent along with the checksum.
b) At the reciever node, after transmission
(V) Step (II) is repeated at the reciever end , all the data segments are added using 1’s
complement arithmetuic to get the new sum.
(vi) This calculated new sum is added with the recieved check sum and then
complemented.

Now,
(a) If the result is all 0’s, the transmission is successful- Accept the data.
(b) If the result is not all 0’s, the transmission is Erroneous – Reject the data.

Q.31.What is routing and routing table.

Answer:
Routing is the process of efficiently selecting a path in a network along which the data
packets will travel to their destination.
A routing table is a table maintained by routers that maintains routing information based
on which router determines best path to reach a network.

Q.32. What is router goal?

Answer: Finding the best route from every destination for data transmission.

Q.33. What is TCP/IP ?

Answer: TCP/IP suite is the current standard for both local and wide area networking.
TCP/IP is a collection of protocols that includes TCP, IP ,UDP(USER DATAGRAM
PROTOCOL) and many other.
TCP – TCP ensures reliable communication and uses ports to deliver packets. It is a
connection- oriented protocol. TCP also fragments and reassembles messgaes, using a
sequencing function to ensure that packets are reassembled in the correct order. In TCP,
a connection must be built using a handshake process before information is sent or
received.
UDP- UDP is a connectionless protocol. It allows information to be sent without using a
handshake process.
IP- IP is a connectionless protocol responsible for providing address of each computer
and performing routing.

Q.34. Symptoms of Network Congestion?

Answer:
(i) Excessive packet delay
(ii) Loss of data packets
(iii) Retransmission

Q.35. What is Metering technique that is implemented to control network congestion?

Answer: Metering technique is implemented to control network congestion


(i) It ensures that the sender does not overflow the network and it is done by controlling
the flow of data packets. With this measure, the sender maintains a value indicating the
limit of data that can be sent into the network without being acknowledged.
(ii)It ensures that the routers along the path work as per their capacity to handle network
traffic and do not become overflowed.
(a) Rerouting the data packets
(b) Informing the senders about the congestion to control the transmission rate.
(c)Delaying the transmission / retransmission depending upon the congestion levels.

Q.36. What is URL ?

Answer:
HTTP(Hypertext Markup Language (HTML) uses Internet addresses in a special format
called Uniform Resource locator or URL.
Elements of a URL –
(a) The type of server or protocol.
(b) The name/address of the server on the Internet.
(c) The location of the file on the server.

Q.37. What is internet server and what they provide.

Server Protocol Information it provides


Text and binary files that are organized in a
ftp File transfer protocol
hierarchical structure, much like family tree.
Transfer control
Text and binary files that are organized in a menu
gopher protocol/internet
structure.
procol(TCP/IP)
http Hypertext Transfer Protocol Hypertext/hypermedia files
Q.38. What is IP address. What are different version of it.

Answer:
IP address is a unique numerical label as a string of numbers separated by dots , used to
identify a device on the internet.
IPV4- uses a 32-bit address scheme allowing for a total of 2**32 address (just over 4
billion addresses).they have reached limit
IPV6- uses a 128 bit long IP addreses. They are being assigned.
IPV6(DUAL) uses IPV6 and IPv4 address combined.

Q.39. What is DNS? Explain.

Answer: The url of a website is also known as its domain name. The domain name is
unique name of a website.
(i) www
(ii) name describing the website purpose.
(iii)TLD (Top Level Domain) such as .com,.net,.org etc.
Q.40.Explain features of cellular or wireless networks depend hevily on wireless
connectivity protocols such as 2G,3G,4G etc?

Answer:
2G GSM (1992) – the second generation: Allows data along with calls in the form of text
messages.GSM can handle data speed of upto 250 kbps.
The GSM standard is transmitted at the frequencies between 900 Mhz and 1800 Mhz.
3G(2000)- the third generation – 3G offers speed of 500 Kbps to 2 Mbps. 3G is
transmitted at frequency 2100 Mhz.
4G(2013)-the fourth generation- Range of 10-15 Mbps which can go upto 50 Mbps and
even higher. The frequency range are 1800 Mhz to 2300 Mhz.

Q.41. What is wi-fi .

Answer: Wi-Fiprotocol governs the rules to connect to the Internet without a direct line
from our PC to the ISP.

Q.42 . What are the following commands and their uses?


(a) PING
(b) Traceroute
(c) NSLOOKUP
(d)IPCONFIG
(e) WHOIS
(f) Speed test

Answer:
(a)To test the connectivity between two hosts, you can use the PING command. PING
determines whether the remote machine can receive the test packet and reply. Ping
serves two purposes:
1. To ensure that a network connection can be established.
2. Timing information as to the speed of the connection.
(b)traceroute or tracert is very similar to ping, expect that it identifies which network
pathways it takes along each hop, rather than the time it takes for each packet to return.
(c)NSLOOKUP: Displays the name and IP address of your computer default DNS server.
(d) IPCONFIG: Command gives more detailed information such as DNS servers, DHCP
enabled or not, MAC Address along with other helpful information.
(e)WHOIS : is used to get information on a specific domain name such as who registered
it , when was it registered and when the domain will expire etc.
(f)To check the download and upload speed of your network go to the site speedtest.net
click on Go. It will check the current speed and show.

Q.43.Explain:

(a)HTTP: The Hyper text Transfer Protocol is an application-level protocol with the
lightness and speed necessary for distributed, collaborative, hypermedia information
systems. It is a generic , stateless, object-oriented protocol which can be used for many
tasks.

(b)FTP: File Transfer Protocol.


(i) It is very useful to transfer files from one network in an organisation to another.
(ii) It is an effective way to get a geographically dispersed group to co-operate on a
project.
(iii) It is a potent and popular way to share information over the internet.

(c) POP(post office protocol): The POP3 has become a standard mail protocol.POP3
protocol works on two ports:
1.Port 110-default pop3 non -encrypted port.
2.Port 995-the encrypted port used for secure email communication.

(d)IMAP(internet message access protocol)


The IMAP is another mail protocol used in conjunction with pop3 protocol for accessing
emails on a remote web server and downloads them to a local client.
port 143-the default non-encrypted
port 993-encrpted port used for secure communication.

(e) SMTP (Simple Mail Transfer Protocol)


The SMTP is used for sending emails across the internet.
port 25- the default , SMTP non- encrypted port
port 465-encrypted port

(f)VOIP (voice over Internet Protocol)


VoIP is a technology that enables voice communications over the Internet through the
compression of voice into data packets that can be efficiently transmitted over data
networks and then converted back into voice at the other end. The most common
protocol used for communicating on these packet- switched network is internet
protocol.

(g)NFC (Near Field communications)


Answer:
used to provide short- range wireless connectivity between two electronic devices that
within the distance of 4-5 centimeters.

Q.44. Basic idea of how HTTP works.

Answer: Protocol HTTP works over the protocol TCP/IP. There are HTTP clients that make
requests via HTTP protocol and HTTP servers that respond to HTTP requests. Working-
(i) For web communications, the request message , is sent to an HTTP server in the form
of URLs by the HTTP client.
(ii) The HTTP server receives the HTTP request, fetches the information as per the request
and sends it to the HTTP client.
(iii)The HTTP client receives the response message, interprets the message and displays
the contents of the message on the browser’s window.

Q.45. Basic idea of working of E-MAIL.

Answer:
(i) You compose and send an email from your email client. Your email has the recipient’s
email address along the email message.
(ii) Now your email client connects to the outgoing SMTP server and hands over the
email message in the required format.
(iii) The outgoing SMTP first validates the sender details and if valid processes the
message for sending and places it in outgoing queue.
(iv) Next DNS look up takes place. The SMTP server based on the domain details in the
recipient address, looks up the DNS server of the domain and retrieves the recipient
server information of the recipient domain
(v) Then the SMTP serve connects with the Recipient email server and sends the email
through SMTP protocol.
(vi) The Recipient server in turn validates the recipient account and delivers the email to
the users mail account.
(vii) The user logs into own email account and views the received email using e-mail
client that will use POP3/IMAP protocol.

Q.46. How to obtain secure communication?

Answer:

1)Encryption is one of such measures and highly recommended too. Encryption is a


technique that translates the original data into a form which is not a usable form of data.
To decrypt the data, a specific code called the decryption key is required.
2)HTTPS stans for hyper text transfer protocol secure and is a combination of HTTP and
SLS/TLS protocols. HTTPS provides encrypts communication and secure identification of
a network web server. HTTPS encrypts your data and establishes a secure channel over a
non secure network to ensure protected data- transfer. Thus data is protected from
eavesdroppers and hackers who want to intercept and access your data. That is why
most banks apply HTTPS because HTTPS connections are more secure for online
payment transactions compared to HTTP connections.

Q.47.Describe Remote login ?

Answer:
Person can work on the desktop of another computer in the same manner as if that
computer is right in front of the person. There are two programs: TELNET and SSH that
facilitate remote login on the internet. Specify the remote machine on which you want to
work and these programs will help you connect to it.

You might also like