0% found this document useful (0 votes)
57 views10 pages

SARAVANA12

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)
57 views10 pages

SARAVANA12

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/ 10

SRI VETRI VIDYALAYAPUBLIC SCHOOL (CBSE)E-VELLANUR

COMPUTER SCIENCE [083]


PERIODIC TEST-I
CLASS: XII MARKS: 70
DATE: TIME:3hrs
__________________________________________________________________
General Instructions:
 Please check this question paper contains questions.
 The paper is divided into 4 Sections- A, B, C, D and E.
 Section A, consists of 15 questions (1to15). Each question carries 1 Mark.
 Section B, consists of 7 questions (16to21). Each question carries 2 Marks.
 Section C, consists of 6 questions (22to27). Each question carries 3 Marks.
 Section D, consists of 3 questions (28to30). Each question carries 5 Marks.
 Section E, consists of 1 question (31). Case Based question carries 4 Marks.
Section-A
State True or False:
“In a Python program, if a break statement is given in a nested loop, it terminates
the execution of all loops in one go.”
2.Consider the code given below:
b=10
def test(a):
_______________________ # missing statement
b=b+a
print (a,b)
test(10)
print(b)
3. Which of the following statements should be given in the blank for
#Missing Statement, if the output produced is 110?
Options:
a. global a
b. global b=100
c. global b
d. global a=100
4. Expand the following: SMTP, XML
Section-B
16. The code given below accepts a number as an argument and returns the reverse
number. Observe the following code carefully and rewrite it after removing all
syntax and logical errors. Underline all the corrections made

17.Write two advantages and two disadvantages of circuit switching.


(OR)
Differentiate between Web server and web browser. Write the names of any two
web browsers.
18. Write a program to find the given number is positive or negative.(OR)
Rao has written a code to input a number and check whether it is prime or not. His
code is having errors. Rewrite the correct code and underline the corrections made.
def prime():
n=int(input("Enter number to check :: ")
for i in range (2, n//2):
if n%i=0:
print("Number is not prime \n")
break
else:
print("Number is prime \n’)

19. Predict output of the following python program:


list1 = ['physics', 'chemistry', 1997, 2000]
list2 = [1, 2, 3, 4, 5, 6, 7 ]
print "list1[0]: ", list1[0] #statement 1
print "list1[0]: ", list1[-2] #statement 2
print "list1[-2]: ", list1[1:] #statement 3
print "list2[1:5]: ", list2[1:5] #statement 4
20.(a) Given is a Python string declaration:
(1)
myexam="@@CBSE Examination 2022@@"
Write the output of: print(myexam[::-2])

(b) Write the output of the code given below:


(1)
my_dict = {"name": "Aman", "age": 26}
my_dict['age'] = 27
my_dict['address'] = "Delhi"
print(my_dict.items())
21. Predict the output of the Python code given below:
tuple1 = (11, 22, 33, 44, 55 ,66)
list1 =list(tuple1)
new_list = []
for i in list1:
if i%2==0:
new_list.append(i)
new_tuple = tuple(new_list)
print(new_tuple)
22. Rearrange the following terms in increasing order of data transfer rates.
i. Gbps, Mbps, Tbps, Kbps, bps
ii. Write the expanded form of Wi-F
Section-c
23. Find the Output:
# create a python dictionary
statesAndCapitals = {
'Gujarat': 'Gandhinagar',
'Maharashtra': 'Mumbai',
'Rajasthan': 'Jaipur',
'Bihar': 'Patna'
}
print('List Of given capitals:\n')

for capital in statesAndCapitals.values():


print(capital)(OR)
Find the output:
efmyfunc(n):
return lambda a : a * n

mydoubler = myfunc(2)
mytripler = myfunc(3)

print(mydoubler(11))
print(mytripler(11))

24. Explain the following networking devices in detail a) Switch b) Router c)


Bridge d) Gateway e) Repeater f) Hub
(OR)
25.Write a note on a) Standard Ethernet b) Fast Ethernet
c) Gigabit Ethernet d) 10-Gigabit Ethernet
e) IEEE 802.11 Standards f) Virtual L
26. The combination of above functions can be used to solve this problem. The
advantages it offers from above method are, that it reduces one check of initializing
new key, and also works well even if similar elements are not consecutive.
# Python code to demonstrate working of
# Join Tuples if similar initial element
# Using loop
# initializing list
test_list = [(5, 6), (5, 7), (6, 8), (6, 10), (7, 13)
# printing original list
print("The original list is : " + str(test_list))
# Join Tuples if similar initial element
# Using loop
res = []
for sub in test_list:
if res and res[-1][0] == sub[0]:
res[-1].extend(sub[1:])
else:
res.append([ele for ele in sub])
res = list(map(tuple, res))

# printing result
print("The extracted elements : " + str(res))
27. Write a function LShift(Arr,n) in Python, which accepts a list Arr of numbers
and n is a numeric value by which all elements of the list are shifted to left. Sample
Input Data of the list
Arr= [ 10,20,30,40,12,11], n=2
Output
Arr = [30,40,12,11,10,20]
29. i. Write any one advantage and one disadvantage of Coaxial cable.
(1)
ii. Expand the following:
(2)
(i) VoIP (ii) SMTP
(iii) TDMA
(iv) TCP/IP

Section-D
12. Python Program to print all Prime Numbers in an interval.
(OR)
Write a function Calles addDicti(dict, dict2) which computers 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 to pick a value from either.

13. Software Development Company has set up its centre at Rajpur for its office
and web-based activities, It has 4 blocks buildings named Block A, Block B, Block
C Block, Block D.
Number of Computers
Block A 25

Block B 50

Block C 125

Block D 10

Shortest distance between various Blocks in meters

Block A to Block B 60m

Block B to Block C 40m

Block C to Block A 30m

Block D to Block C 50m


i. Suggestthe most suitable place(i.e ,.block ) to house the server of this company
with a suitable reason.
ii. Suggest the type of network to connect all the blocks with suitable reason.
iii. The company planning is to link all the blocks through a secure and high speed
wiredmedium. Suggest a way to connect all the blocks.
iv. Suggest the most suitable wired medium for efficiency connecting each
computer installed in every block out of the following network cables.
v. Which type of network out of the building is formed by connecting the
computers of the building?
a.LAN b.MAN c.WAN
(OR)
i.Name the hardware layers or network support layers in the OSI model.
ii.What is VPN?
iii.What is the protocol and port no of DNS?
iv.What is any3 difference between Bluetooth and wifi?
v. What is the minimum size of the icmpV4 packet what is the maximum size of
the icmpv4 packet?
14.i. Python program to find the Largest Among three numbers
ii.Python program to Check a Leap Year.
MakeInIndia Corporation, an Uttarakhand based IT training company, is planning
to set up training centres in various cities in next 2 years. Their first campus is
coming up in Kashipur district. At Kashipur campus, they are planning to have 3
different blocks for App development, Web designing and Movie editing. Each
block has number of computers, which are required to be connected in a network
for communication, data and resource sharing. As a network consultant of this
company, you have to suggest the best network related solutions for them for
issues/problems raised in question nos. (i) to (v), keeping in mind the distances
between various blocks/locations and other given parameters.
Section-E
Case based questions:
15. TCP/IP, or the Transmission Control Protocol/Internet Protocol, is a suite of
communication protocols used to interconnect network devices on the internet.
TCP/IP can also be used as a communications protocol in a private computer
network (an intranet or an extranet).
TCP defines how applications can create channels of communication across a
network. It also manages how a message is assembled into smaller packets before
they are then transmitted over the internet and reassembled in the right order at the
destination address.
IP defines how to address and route each packet to make sure it reaches the right
destination. Each gateway computer on the network checks this IP address to
determine where to forward the message. TCP/IP uses the client-server model of
communication in which a user or machine (a client) is provided a service (like
sending a webpage) by another computer (a server) in the network. Collectively,
the TCP/IP suite of protocols is classified as stateless, which means each client
request is considered new because it is unrelated to previous requests. Being
stateless frees up network paths so they can be used continuously.
1.Which of the following protocols is used in the internet?
a. HTTP
b. DHCP
c. DNS
d. All of the above
2.Which one of the following is not an application layer protocol used in internet?
a.Remote procedure call
b.Internet relay chat
c. Resource reservation protocol
d. Local procedure call
3. Which protocol assigns IP address to the client connected to the internet?
a. DHCP
2. IP
c. RPC
d. RSVP
4. Several protocols for upper layers in Bluetooth use:
a. UDP
b. HSP
c. ITC
d. L2CAP
Observe the following Python code very carefully and rewrite it after removing all
syntactical errors with each correction underlined. (2)
DEF execmain(): x = input("Enter a number:")
if (abs(x)= x):
print"You entered a positive number"
else:
x=*-1 print"Number made positive:"x
execmain()
.

You might also like