Cs 12th Term 1 2023-24
Cs 12th Term 1 2023-24
Computer Science(083)
(a) none
(b) address
(c) Name
(d) Pass
6 Consider a tuple tup1 = (10, 15, 25, and 30). Identify the statement that will 1
result in an error
(a) print(tup1[2])
(b) tup1[2] = 20
(c) print(min(tup1))
(d) print(len(tup1))
14 A _________is a list where insertion and deletion can take place only at one end 1
called______
(a) Stack, Rear
(b) Stack, Front
(c) Queue, Top
(d) Stack, Top
15 While popping the element from the stack, a condition will be raised if list has no 1
elements, this condition is known as ____________.
(a) Underflow
(b) Overflow
(c) List is Empty
(d) Blank List
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the
correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b)Both A and R are true and R is not the correct explanation for A [6]
(c) A is True but R is False
(d)A is false but R is True
19 Observe the following code carefully and rewrite it after removing all syntax 2
and logical errors. Underline all the corrections made.
Value=30
for VAL in range(0,Value)
If val%4==0:
print (VAL*4)
Elseif val%5==0:
print (VAL+3)
else
print(VAL+10)
23 Output prediction: 2
Name="PythoN3.1"
R=""
for x in range(len(Name)):
if Name[x].isupper():
R=R+Name[x].lower()
elif Name[x].islower():
R=R+Name[x].upper()
elif Name[x].isdigit():
R=R+Name[x-1]
else:
R=R+"#"
print(R)
Section-C
Example:
If the file content is as follows:
OR
Write a function in Python that counts the number of “Me” or “My” words
present in a text file “STORY.TXT”. If the “STORY.TXT” contents are as
follows:
My first book was Me and 3 Page 8 of 11 My Family. It gave me chance
to be Known to the world.
The output of the function should be: Count of Me/My in file: 4
30 i) Rearrange the following terms in increasing order of speedy medium of data 1+2
transfer. Telephone line, Fiber Optics, Coaxial Cable, Twisted Paired Cable.
ii) Write two advantages of Fiber optics over Twisted pair cable
Section D
i) Suggest the best wired medium and draw the cable layout to efficiently
connect various wings of Modern Public School, Ahmedabad.
ii) Name the most suitable wing where the Server should be installed. Justify
your answer.
iii) Suggest a device/software and its placement that would provide data
security for the entire network of the School.
iv) Suggest a device and the protocol that shall be needed to provide wireless
Internet access to all smart phone/laptop users in the campus of Modern Public
School,
v) Name the device which is required for connecting computers in the blocks.
Section-E
35 Write the Python statement for each of the following tasks using BUILT-IN list/ 4
string functions/methods only:
(i) To insert an element 200 at the third position, in the list L1.
(ii) To check whether a string named, message ends with a full stop /
period or not
(iii) Returns copy of string with its first character capitalized.
(iv) Removes first occurrence of the item from a given list