Worksheet-2 Class Xii - Compscience - Nov24
Worksheet-2 Class Xii - Compscience - Nov24
WORKSHEET -2 (NOVEMBER)
Class 12 - Computer Science
Section A
OL
1. What is the output of the following program : [1]
print Hello World [:: -1]
HO
G
c) dlroW olleH d) HloWrd
2. Given a list L = [10, 20, 30, 40, 50, 60, 70], what would L[-3 : 99] return? [1]
EK
a) [20, 30, 40] b) [40, 50, 60]
3.
c) [50, 60, 70]
SC d) [30, 40, 50]
What is the default return value for a function that does not return any value explicitly? [1]
RE
a) int b) null
A
c) double d) None
IY
SE
4. You have the following code segment: [1]
SH
Stringl= "my"
AK
CB
String2 = "work"
print(Stringl + String2)
a) work b) my
c) mywork d) my work
5. Which of the following is valid arithmetic operator in Python? [1]
DH
a) < b) //
c) and d) ?
6. What is the output of the following code? [1]
1/9
Never give up!!!!!!!
7. Which of the following is the correct output for the execution of the following Python statement? [1]
print(5 + 3 ** 2/2)
a) 9.5 b) 8.0
c) 32 d) 32.0
8. What will be the result of the following code? [1]
a) 5 b) abc
OL
c) Error d) {"abc":5J}
9. What will be the output of the following Python code? [1]
HO
G
tpl=(15,11,17,16,12)
tpl.pop(12)
print(tpl)
EK
a) Error
c) (15,11,17,16)
SC b) (15,11,17,16,12)
d) (15,11,16,12)
RE
10. All the errors that are detected and displaced by the compiler or interpreter are known as [1]
A
a) Logical errors b) Compile-time errors
IY
SE
c) Arithmetical errors d) Run-time errors
SH
a) media b) LAN
c) protocols d) topology
12. In which of the following switching technique, data is routed entirely from the source node to the destination [1]
OL
node?
2/9
Never give up!!!!!!!
16. DNS database contains: [1]
a) A computer that is being used as a server. b) A computer that does not have any
peripherals attached to it.
c) A computer that is used by only one person. d) A computer that is not connected to a
network.
18. For wired networks, which protocol is used for handling collisions? [1]
OL
a) CSMA/CD b) CSMA
HO
G
19. Which of the following is a system of interlinked hypertext document accessed via internet? [1]
a) WWW b) Communication
EK
c) ARPANET d) .COM
20.
SC
HTML is a markup language for describing web document. HTML uses
22. Which of the following command is used to remove the table definition and all data? [1]
CB
a) Choose b) Drop
c) Create d) Select
OL
a) DECIMAL b) DATE
c) STRING d) CHAR
DH
a) List b) Dictionary
c) Tuple d) String
25. The operation whose result contains all pairs of tuples from the two relations, regardless of whether their [1]
attribute values match.
a) 1 b) 3
3/9
Never give up!!!!!!!
c) 2 d) 0
27. Which of the following is a client-side scripting language? [1]
a) Perl b) PHP
c) VB Script d) Ruby
28. What is the full form of CSMA/CA? [1]
OL
29. In computer, process of superimposing a low frequency signal over a high frequency signal is called [1]
HO
G
c) modulation d) demodulation
30. A set of possible data values is called [1]
EK
a) domain b) attribute
31.
c) tuple
SC
The database administrator’s function in an organisation
d) degree
[1]
a) to show the relationship among entity b) to develop and implement data governance
RE
A
classes in a data warehouse policies
IY
SE
c) to define which data mining tools must be d) to be responsible for the technical aspects of
SH
Section B
33. State True or False: [3]
(a) CSMA/CD can be used by wireless networks. [1]
DH
>>>l1 = [1, 2, 3, 4]
>>>l2 = [2, 3, 4, 5]
>>>l1 > 12
35. How are objects stored in lists and dictionaries different? [1]
36. What are selection statements? Give example. [1]
37. Write the value stored in the variable Num by each of the following statements. [1]
4/9
Never give up!!!!!!!
i. Num = 2 * 3 - 4
ii. Num = 2 + 3 - 1 * 3
iii. Num = (2 + 3)*2
38. What is traversing a tuple in Python? [1]
39. Define a network. [1]
40. Define the following: [1]
i. Hub
ii. Switch
41. What is a Gateway? [1]
42. Give one basic difference between guided and unguided transmission channels. [1]
OL
43. What is the purpose of using FTP? [1]
44. What is difference between star topology and bus topology of network? [1]
45. What do you mean by 3G mobile technology? [1]
HO
G
46. What is meant by internetworking? [1]
47. Give one suitable example of each URL and Domain Name. [1]
48. What is SMTP? [1]
EK
49.
50.
51.
SC
For the security reasons which high capacity communication medium would you choose? Why?
What is a communication channel?
What is frequency modulation?
[1]
[1]
[1]
52. List different types of keys used in a table in DBMS. [1]
RE
A
53. What do you understand by data redundancy? [1]
54. Which level of abstraction describes how the data is physically stored? [1]
IY
SE
55. Is the loop in the code below infinite? How do you know (for sure) before you run it? [2]
SH
m=3
AK
n=5
CB
print(n, m)
56. How can you add following data in empty dictionary? [2]
Keys Values
DH
A One
B Two
C Three
D Four
57. Rewrite the following code in python after removing all syntax error(s). [2]
Underline each correction done in the code.
30 = To
for K in range(0,To)
IF k%4== 0:
5/9
Never give up!!!!!!!
print (K * 4)
Else:
print (K + 3)
58. Rewrite the following code in Python after removing all syntax error(s). Underline each correction done in the [2]
code.
Value = 30
for VAL in range(0,Value)
If val % 4 == 0:
print (VAL * 4)
Elseif val % 5 == 0:
OL
print (VAL + 3)
else
print(VAL + 10)
HO
59. Find the error in the following code fragment. State the reason behind the error. [2]
box = { }
jars = { }
G
EK
crates = { }
box['biscuit'] =1
box['cake'] = 3
jars['jam'] = 4
SC
RE
A
crates['box'] = box
crates['jars'] = jars
IY
SE
print (crates[box])
SH
between his company’s accounts office and HR office is extremely slow and signals drop quite frequently. These
offices are 120 metre away from each other and connected by an Ethernet cable.
i. Suggest him a device which can be installed in between the office for smooth communication.
OL
ii. What type of network is formed by having this kind of connectivity out of LAN, MAN and WAN?
62. What are the major types of networks? Explain. [2]
63. Compare and contrast the two wireless transmission media : bluetooth and infrared. [2]
DH
64. Which of the following is not a broadcast device and which one offers a dedicated bandwidth? [2]
a. Repeater
b. Bridge
c. Hub
d. Switch
65. What measures do wireless networks employ to avoid collisions? [2]
66. Give the full form for the following: [2]
i. FM
ii. AM
iii. NFS
iv. FTP
6/9
Never give up!!!!!!!
67. Consider the table MOVIE DETAILS given below [2]
M011 Harry Potter and the Chamber of Secrets English 4 Prime Video
OL
M020 Avengers: Endgame English 4 Hotstar
HO
ii. Which field should be made the primary key? Justify your answer.
68.
69.
G
Describe the levels of abstraction.
What are repeaters and routers?
[2]
[4]
EK
70. What is switching techniques? Explain any two switching technique. [4]
71.
SC
Quickdev, an IT based firm, located in Delhi is planning to set up a network for its four branches within a city
with its Marketing department in Kanpur. As a network professional, give solutions to the questions (i) to (v),
after going through the branches locations and other details which are given below:
[4]
RE
A
IY
SE
SH
AK
Branch Distance
Branch A to Branch B 40 m
OL
Branch A to Branch C 80 m
Branch A to Branch D 65 m
Branch B to Branch C 30 m
DH
Branch B to Branch D 35 m
Branch C to Branch D 15 m
Branch A 15
Branch B 25
Branch C 40
7/9
Never give up!!!!!!!
Branch D 115
i. Suggest the most suitable place to install the server for the Delhi branch with a suitable reason.
ii. Suggest an ideal layout for connecting all these branches within Delhi.
iii. Which device will you suggest, that should be placed in each of these branches to efficiently connect all the
computers within these branches?
iv. Delhi firm is planning to connect to its Marketing department in Kanpur which is approximately 300 km
away. Which type of network out of LAN, WAN or MAN will be formed? Justify your answer.
v. Suggest a protocol that shall be needed to provide help for transferring of files between Delhi and Kanpur
branch.
72. Consider the following tables GAMES and PLAYER and answer (b) and (c) parts of this question: [4]
OL
Table: GAMES
HO
101 Carom Board Indoor 2 5000 23-Jan-2004
102 Badminton
G Outdoor 2 12000 12-Dec-2003
EK
103 Table Tennis Indoor 4 8000 14-Feb-2004
105
108
Chess
SC
Lawn Tennis
Indoor
Outdoor
2
4
9000
25000
01-Jan-2004
19-Mar-2004
RE
Table: PLAYER
A
PCode Name GCode
IY
SE
1 Nabi Ahmad 101
SH
3 Jatin 101
4 Nazneen 103
iii. To display the content of the GAMES table in ascending order of Schedule Date.
iv. To display sum of PrizeMoney for each type of GAMES.
c. Give the output of the following SQL queries:
i. SELECT COUNT (DISTINCT Number) FROM GAMES;
ii. SELECT MAX(ScheduleDate), MIN (ScheduleDate) FROM GAMES;
iii. SELECT Name, GameName FROM GAMES G, PLAYER P WHERE (G.Gcode= P.Gcode AND
G.PrizeMoney>10000);
iv. SELECT DISTINCT Gcode FROM PLAYER;
73. Consider the following table WORKER. Write SQL commands for the following statements. [4]
Table: WORKER
8/9
Never give up!!!!!!!
ECODE NAME DESIG PLEVEL DOJ DOB
OL
iii. To display the content of all the WORKERS table, whose DOB is in between '19-JAN-1984' and ‘18-JAN-
1987’.
iv. To add a new row with the following :
HO
19, 'Daya Kishore', 'Operator', 'P003', '19-Jun-2008', '11-Jul-1984'
G
EK
SC
RE
A
IY
SE
SH
AK
CB
OL
DH
9/9
Never give up!!!!!!!