0% found this document useful (0 votes)
38 views9 pages

Question 1620648

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)
38 views9 pages

Question 1620648

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

DHOLAKIYA SCHOOLS RAJKOT

WORKSHEET 1 COMP SCI 083


Class 12 - Computer Science

Section A
1. Read the text carefully and answer the questions: [4]
Ravya Industries has set up its new center at Kaka Nagar for its office and web based activities. The company
compound has 4 buildings as shown in the diagram below:

OL A
IY
AK

S
Center to center distances between various building is as follows:

Harsh Building to Raj Building 50 m


OL

Raj Building to Fazz Building 60 m


HO

Fazz Building to Jazz Building 25 m

Jazz Building to Harsh Building 170 m


DH

Harsh Building to Fazz Building 125 m


SC

Raj Building to Jazz Building 90 m

Number of Computers in each of the buildings is as follows:

Harsh Building 15

Raj Building 150

Fazz Building 15

Jazz Building 25

(a) Suggest the most suitable place (i.e., building) to house the server of this organisation with a suitable
reason.
(b) Suggest the placement of Internet Connecting Device/Modem with justification.
(c) The organisation is planning to link its sale counter situated in various parts of the same city, which type of
network out of LAN, MAN or WAN will be formed? Justify your answer.
(d) Suggest the placement of Switch with justification.
Question No. 2 to 5 are based on the given text. Read the text carefully and answer the questions: [4]

1/9
Never Give Up!!!!!!!!!!
UNIVERSITY OF CORRESPONDENCE in Allahabad is setting up the network between its different wings. There are
4 wings named as Science (S), Journalism (J), ARTS (A) and Home Science (H).
Distance between various wings are given below:

Wing A to Wing S 100 m

Wing A to Wing J 200 m

Wing A to Wing H 400 m

Wing S to Wing J 300 m

Wing S to Wing H 100 m

Wing J to Wing H 450 m

Number of Computers

Wing A 150

OL A
Wing S 10

Wing J

Wing H IY 5

50
AK
2. Suggest a suitable Topology for networking the computer of all wings.

S
3. Name the wing where the Server to be installed. Justify your answer.
4. Suggest the placement of Hub/Switch in the network.
5. Mention in economic technology to provide internet accessibility to all wings.
OL

Question No. 6 to 9 are based on the given text. Read the text carefully and answer the questions: [4]
HO

Galaxy Provider Ltd. is planning to connect its office in Texas, USA with its branch at Mumbai. The Mumbai branch
has 3 Offices in three blocks located at some distance from each other for different operations ADMIN, SALES and
DH

ACCOUNTS.
As a network consultant, you have to suggest the best network related solutions for the issues/problems raised in (a) to
SC

(d), keeping in mind the distances between various locations and other given parameters.
Layout of the Offices in the Mumbai branch:

Shortest distances between various locations:

ADMIN Block to SALES Block 300 m

SALES Block to ACCOUNTS Block 175 m

ADMIN Block to ACCOUNTS Block 350 m

MUMBAI Branch to TEXAS HEAD Office 14000 km

Number of Computers installed at various locations are as follows:

2/9
Never Give Up!!!!!!!!!!
ADMIN Block 255

ACCOUNTS Block 75

SALES Block 30

TEXAS Head Office 90

6. It is observed that there is a huge data loss during the process of data transfer from one block to another. Suggest the
most appropriate networking device out of the following, which needs to be placed along the path of the wire connecting
one block office with another to refresh the signal and forward it ahead.

a) ETHERNET CARD b) HUB

c) REPEATER d) MODEM
7. Which hardware networking device out of the following, will you suggest to connect all the computers within each
block?

a) ROUTER b) SWITCH

OL A
c) MODEM d) REPEATER

IY
8. Draw the cable layout (block to block) to efficiently connect the three offices of the Mumbai branch.
9. Which service/protocol out of the following will be most helpful to conduct live interactions of employees from Mumbai
AK

S
Branch and their counterparts in Texas?

a) PPP b) SMTP

c) VoIP d) FTP
OL

10. Read the text carefully and answer the questions: [6]
HO

Mr. Ankit is working in an organization as a data analyst. He uses Python Pandas and Matplotlib for the same.
He got a dataset of the passengers for the years 2010 to 2012 for January, March, and December. His manager
DH

wants certain information from him, but he is facing some problems. Help him by answering few questions
given below:
SC

Year Month Passenger

2010 Jan 25

2010 Mar 50

2012 Jan 35

2010 Dec 55

2012 Dec 65

Code to create the above data frame:


import pandas as ________ #Statement 1
data = {"Year":[2010,2010,2012,2010,2012],"Month":["Jan","Mar","Jan","Dec","Dec"] ,"Passengers":
[25,50,35,55,65]}
df = pd.________ (data) #Statement 2
________ #Statement 3.
(a) Choose the correct statement/ method for the required output: (5,3)

a) df.shape b) df.shape()

3/9
Never Give Up!!!!!!!!!!
c) df.size d) df.index
(b) He wants to print the details of "January" month along with the number of passengers, Identify the correct
statement:
Month - Passenger
Jan - 25
Jan - 35

a) i. df.loc[['Month','Passengers']] b) df(['Month','Passengers']]
[df['Month']=='Jan'] [df['Month']=='Jan')

c) df[['Month','Passengers']] d) df.iloc[['Month','Passengers']]
[df['Month']=='Jan'] [df['Month']=='Jan']
(c) Mr. Ankit wants to change the index of the Data Frame and the output for the same is given below.
Identify the correct statement to change the index:

Year Month Passenger

OL A
Air India 2010 Jan 25

Indigo

Spicejet
IY 2010

2012
Mar

Jan
50

35
AK

S
Jet 2010 Dec 55

Emirates 2012 Dec 65


OL

a) df.index()=["Air b) df.index[]=["Air
HO

India","Indigo","Spicejet","Jet","Emirates"] India","Indigo","Spicejet","Jet","Emirates"]

c) df.index["Air d) df.index=["Air
DH

India","Indigo","Spicejet","Jet","Emirates"] India","Indigo","Spicejet","Jet","Emirates"]
(d) Which one is correct for Statement 3?
SC

a) print(pandas) b) print(df)

c) print.df d) print;.df
(e) Choose the right code from the following for statement 1.

a) pd b) data

c) df d) p
(f) Choose the right code from the following for statement 2.

a) Dataframe b) Dictionary

c) DataFrame d) Series
Section B
11. Which of the following will raise an error if the given dictionary is empty? [1]

a) all of these b) del statement

c) pop() d) popitem()
12. What is the output of the following program : [1]

4/9
Never Give Up!!!!!!!!!!
print Hello World [:: -1]

a) Hello World b) drW olH

c) dlroW olleH d) HloWrd


13. What is the output of this code? [1]
>>> int ("3" + "4")

a) "7" b) 24

c) "34" d) 34
14. Which data type contains only numeric value in Python? [1]

a) Lists b) Numbers

c) Strings d) Tuples
15. These operators are used to make a decision on two conditions: [1]

OL A
a) Arithmetic b) Logical

c) Assignment d) Relational
16.

a) print("%d")
IY
Given the numeric variable Num1, which lines of code properly prints the value?

b) print(Num1) properly prints the value


[1]
AK

S
c) print("%d Num1") d) print("%d", Num1)
17. Find the output of the following code. [1]
OL

Name="PythoN3@1"
R=" "
HO

for x in range(len(Name)):
if Name[x].isupper():
DH

R=R+Name[x].lower()
SC

elif Name[x].islower():
R=R+Name[x].upper()
elif Name[x].isdigit():
R=R+Name[x-1]
else:
R=R+"#"
print(R)

a) pYTHOnN@# b) pYTHOn#@

c) pYTHOn##@ d) pYTHOnN#@
18. For a string S declared as S = 'PYTHON', which of the following is incorrect? [1]

a) N=len(S) b) T = S

c) 'T' in S d) S[0] = 'M'


19. Which of the following expressions results in an error? [1]

a) int('12') b) float('12.5')

5/9
Never Give Up!!!!!!!!!!
c) int('12.5') d) float('12')
20. Which of the following statement(s) would give an error after executing the following code? [1]

S="Happy" # Statement 1
print(S*2) # Statement 2
S+="Independence" # Statement 3
S.append("Day") # Statement 4
print(S) # Statement 5

a) Statement 3 b) Statement 2

c) Statement 3 and 4 d) Statement 4


Section C
21. State True or False: [10]
(a) If the addition of a new key:value pair causes the size of the dictionary to grow beyond its original [1]

OL A
size, an error occurs.
(b)

(c)
marks. IY
A string can be surrounded by three sets of single quotation marks or by three sets of double quotation [1]

In Python, only if statement has else clause. [1]


AK

S
(d) The expression int(x) implies that the variable x is converted to integer. [1]
(e) HTTP is a secure protocol. [1]
(f) NSLOOKUP is a network type. [1]
(g) HTTP is HyperText Transfer Protocol. [1]
OL

(h) A switch can work in place of a hub. [1]


HO

(i) The relative path for a file always remains same even after changing the directory. [1]
(j) When you open a file for writing, if the file exists, the existing file is overwritten with the new file. [1]
DH

Section D
SC

22. Fill in the blanks: [4]


(a) Python names the top level segment (main program) as ________. [1]
(b) User can also add elements into an empty dictionary by ________. [1]
(c) The ________ operator when used with a list/string and an integer, replicates the list/string. [1]
(d) A ________ is a subprogram that acts on data and often returns a value. [1]
Section E
23. What is the output of the following? [1]
d = {0: 'a', 1: 'b', 2: 'c'}
for x in d.values():
print (d[x])
24. What is an error? [1]
25. What is the output of the following? [1]
d = {0 : 'a', 1: 'b', 2: 'c'}
for x in d.keys () :
print(d [x], end = ' ')
26. Write the names of the immutable data objects from the following: [1]

6/9
Never Give Up!!!!!!!!!!
i. List
ii. Tuple
iii. String
iv. Dictionary
27. What is the main difference between DNS and DHCP? [1]
28. Write the full form of the following [1]
i. GNU
ii. XML
29. What is the purpose of using a router? [1]
30. What is a database? [1]
31. List the major components of a database system. [1]
32. Rewrite the following code in Python after removing all syntax error(s). Underline each correction done in the [2]
code.
Value = 30

OL A
for VAL in range(0,Value)
If val % 4 == 0:
print (VAL * 4)
Elseif val % 5 == 0:
IY
AK

S
print (VAL + 3)
else
print(VAL + 10)
OL

33. Observe the following tuples and answer the questions that follow. [2]
HO

t1= (4, 7, 8, 9)
t2=(0, 4, 3)
DH

i. >>>t=t1+t2
SC

>>>print(t)
ii. >>>t=t1*t2
>>>print(t)
34. What is the output of the following? [2]
True = False
while True:
print(True)
break
35. Draw a flow chart to find the factorial of any number. [2]
36. What is the difference between message switching and packet switching? [2]
37. Write one advantage of bus topology of network. Also, illustrate how four computers can be connected with [2]
each other using star topology of network?
38. Write the expanded names for the following abbreviated terms used in Networking and Communications [2]
i. GPRS
ii. WiFi
iii. POP

7/9
Never Give Up!!!!!!!!!!
iv. SMTP
39. Write a statement in Python to perform the following operations: [2]
i. To open a text file "BOOK.TXT" in read mode
ii. To open a text file "BOOK.TXT" in write mode
40. Write a method in Python to write multiple line of text contents into a text file diary.txt. [2]
41. A text file named SOLUTION.TXT contains some English sentences. Another text file named TEST.TXT [2]
needs to be created such that it replaces every occurrence of 3 consecutive letters ‘h’, ‘i’ and ‘s’ (irrespective of
their cases) from each word of the file SOLUTION.TXT, with 3 underscores (‘__’).
For example: If the file SOLUTION.TXT contains the following content:

"This is his history book."

Then TEST.TXT should contain the following:


"T____ is ____ ____ tory book."

OL A
Write the definition for function CreateTest() in C++ that would perform the above task of creating TEST.TXT
from the already existing file SOLUTION.TXT.
42.
43.
IY
List some commonly used DBMS software packages.
What does each of the following expressions evaluate to?
Suppose that L is the list
[2]
[3]
AK

S
["These", ["are", "a"], ["few", "words"], "that", "we", "will", "use"].
i. L[3 : 4] + L [1 : 2]
ii. "few" in L [2 : 3]
OL

iii. "few" in L [2]


HO

iv. L [2][1 :]
v. L [1] + L[2]
DH

44. Write a statement in Python to perform the following operations : [3]


SC

i. To open a text "BOOK. TXT" in read mode


ii. To open a text file "BOOK.TXT" in write mode
45. A file phonebook.dat stores the details in the following format: [3]
Name Phone
Jivin 86666000
Kriti 101001
Write a program to edit the phone numbers of Arvind in the file. If there is no record for Arvind report error.
46. Write a program to read a text file and display the count of lowercase and uppercase letters in the file. [3]
Answer.txt
Letter 'a' is a wonderful letter.
It is impossible to think of a sentence without it.
We know this will never occur.
How mediocre our world would be without this single most powerful letter?
47. Write the example that will show the concept of database concept. Also, explain the types of users of database. [3]
48. Write a point of difference between append (a) and write (w) modes in a text file. [4]
Write a program in Python that defines and calls the following user defined functions:

8/9
Never Give Up!!!!!!!!!!
i. Add_Teacher() : It accepts the values from the user and inserts the record of a teacher to a csv file
'Teacher.csv'. Each record consists of a list with field elements as T_id, Tname and desig to store teacher ID,
teacher name and designation respectively.
ii. Search_Teacher() : To display the records of all the PGT (designation) teachers.
49. A file Answer.txt contains the text. Write a program to remove all the lines that contain the character 'a' in this [4]
file and write other lines into another file.
Letter 'a' is a wonderful letter.
It is impossible to think of a sentence without it.
We know this will never occur.
How mediocre our world would be without this single most powerful letter.
50. Why DBMS are useful than file processing system? Also, explain the advantages of DBMS. [4]

OL A
IY
AK

S
OL
HO
DH
SC

9/9
Never Give Up!!!!!!!!!!

You might also like