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

Worksheet-2 Class Xii - Compscience - Nov24

Uploaded by

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

Worksheet-2 Class Xii - Compscience - Nov24

Uploaded by

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

SHREE K G DHOLAKIYA SCHOOL RAJKOT

Near Balaji Hall 150 Ft Ring Road

WORKSHEET -2 (NOVEMBER)
Class 12 - Computer Science

Section A

OL
1. What is the output of the following program : [1]
print Hello World [:: -1]

a) Hello World b) drW olH

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)

What is the output of this code?


OL

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]

str1 = "Mission 999";


str2="999"
print(str1.isdigit(), str2.isdigit())

a) False True b) True False

c) True True d) False False

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]

dl={"abc":5, "def":6, "ghi":7}


print(dl[0])

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

11. Geometric arrangement of devices on the network is called [1]


AK
CB

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?

a) Circuit switching b) Connector switching

c) Packet switching d) Message switching


DH

13. Each computer connected to the Internet must [1]

a) have a web browser b) have a unique IP address

c) have a modem connection d) be a pentium machine


14. Switch is a [1]

a) Unicast device b) Broadcast device

c) Multicast device d) All of these


15. HTTP is a [1]

a) Web Browser b) Programming Language

c) Scripting Language d) Network Protocol

2/9
Never give up!!!!!!!
16. DNS database contains: [1]

a) hostname aliases b) all of these

c) name server records d) hostname-to-address records


17. What is a stand alone computer? [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

c) All of these d) CSMA/CA

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

a) pre-specified tags b) fixed tags defined by the language


[1]
RE

c) user defined tags d) tags only for linking


A
21. Which of the following join gives the intersection of two tables? [1]
IY
SE
a) Inner join b) Outer join
SH

c) Equi join d) Fuller join


AK

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

23. Which of the following is not a valid datatype in SQL? [1]

a) DECIMAL b) DATE

c) STRING d) CHAR
DH

24. Which of the following is not a sequential datatype in Python? [1]

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) Intersection b) Set difference

c) Join d) Cartesian product


26. Find EVEN parity bit for 10010001 [1]

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]

a) Collision Sense Multiple Access/Collision b) Carrier Sense Multiple Access/Collision


Act Avoidance

c) Carrier Sense Multiple Access/Collision Act d) Collision Sense Multiple Access/Collision


Avoidance

OL
29. In computer, process of superimposing a low frequency signal over a high frequency signal is called [1]

a) frequency modulation b) amplitude modulation

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

used to extract data managing the information contained


in organisational database
AK
CB

32. Which of the following is the drawback of DBMS? [1]

a) Improvement in data b) Maintenance of data integrity

c) Complexity d) Backup and recovery


OL

Section B
33. State True or False: [3]
(a) CSMA/CD can be used by wireless networks. [1]
DH

(b) A stand-alone computer may also be referred to as a host. [1]


(c) Secure Socket Protocol is not a security protocol in WWW. [1]
Section C
34. Find the output. [1]

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

while n < 10:


m = n -1
n = 2 * n-m
OL

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

60. Differentiate between XML and HTML. [2]


61. Mr. GopiNath Associate Manager of Unit Nations corporate recently discovered that the communication [2]
AK
CB

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]

Table: MOVIE DETAILS

MOVIEID TITLE LANGUAGE RATING PLATFORM

M001 Minari Korean 5 Netflix

M004 MGR Magan Tamil 4 Hotstar

M010 Kaagaz Hindi 3 Zee5

M011 Harry Potter and the Chamber of Secrets English 4 Prime Video

M015 Uri Hindi 5 Zee5

OL
M020 Avengers: Endgame English 4 Hotstar

i. Identify the degree and cardinality of the table.

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

Distance between various branches is as follows:


CB

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

Delhi Branch to Kanpur 300 km

Number of computers in each of the branches:

Branch Number of Computers

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

GCode Game Name Type Number Prize Money Schedule Date

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

2 Ravi Sahai 108


AK
CB

3 Jatin 101

4 Nazneen 103

a. What do you understand by primary key and candidate keys?


OL

b. Write SQL commands for the following statements:


i. To display the name of all GAMES with their GCodes.
ii. To display details of those GAMES which are having PrizeMoney more than 7000.
DH

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

11 Radhe Shyam Supervisor P001 13-Sep-2004 23-Aug-1981

12 Chander Nath Operator P003 22-Feb-2010 12-Jul-1987

13 Fizza Operator P003 14-Jun-2009 14-Oct-1983

15 Ameen Ahmed Mechanic P002 21-Aug-2006 13-Mar-1984

18 Sanya Clerk P002 19-Dec-2005 09-Jun-1983

i. To display the details of all WORKERS in descending order of DOB.


ii. To display NAME and DESIG of those WORKERS, whose PLEVEL is either P001 or P002.

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!!!!!!!

You might also like