Nothing Special   »   [go: up one dir, main page]

Sample Paper 2 (CS)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

1

Roll Number………………..

GURUKUL KURUKSHETRA
COMPUTER SCIENCE
SEPTEMBER EXAMINATION
SESSION (2019-20)
CLASS: XII (083)

Time Allowed: 3 Hours Maximum Marks: 70

Note: (i) All questions are compulsory.

(ii) Answer the questions after carefully reading the text.

(iii) Marks of each question are given against it.

(iv) Marks will be given for good hand writing.

1. Answer the following questions based on Python Programming and


Computational Thinking:

(i) Which of the following can be used as valid variable identifier(s) in


Python? 1
(a) 4thSum
(b) Total
(c) Number#
(d) Data
(ii) What is IDLE? 1
(iii) What are the two modes of working in Python? 1
(iv) Which function can be used to know the data type of a variable? 1
(v) Write the difference between break and continue statements. 1
(vi) Rewrite the following code in python after removing all syntax
error(s).Underline each correction done in the code 2
2

STRING=""HAPPY NEW YEAR"


for S in range[0, 8]:
print STRING(S)
print S+STRING

(vii) Find and write the output of the following python code: 2
TXT = ["20","50","30","40"]
CNT = 3
TOTAL = 0
for C in [7,5,4,6]:
T = TXT[CNT]
TOTAL = float(T) + C
print(TOTAL)
CNT -= 1
(viii) Write logical expression for the following: 2
(1) Name is Rahul and age is between 20 to 25.
(2) CITY is either ‘Karnal’ or ‘Ambala’ but not ‘Chandigarh’.
(ix) Write the output of the following program on execution if x=80. 2
x=80
if x>60:
if x>25:
print("Good")
if x>90:
print("Better")
elif x>40:
print("Best")
else:
print("Invalid Output")

(x) Write the output of the following: 2


L=[ ]
L1=[ ]
L2=[ ]
for i in range(6,10):
3

L.append(i)
for i in range(10,4,-2):
L1.append(i)
for i in range(len(L1)):
L2.append(L[i]+L1[i])
L2.append(len(L)-len(L1))
print(L2)

(xi) What output will be generated when the following Python code is
executed? 2

(xii) Write one similarity and one difference between List and Dictionary datatype. 2
(xiii) Define recursion with the help of example. 2
(xiv) Write a user-defined function in Python that displays the number of lines
starting with ‘H’ in the file hello.txt. Fr example, if the file contains: 2
Whose woods these are I think I know.
His house is in the village though;
He will not see me stopping here
To watch his woods fill up with snow.

Then the line count should be 2.

(xv) Write the python statement and the output for the following: 2
(a) To remove ‘h’ from word ‘hello’.
(b) To replace ‘o’ with ‘*’ in word ‘hello’.
4

(xvi) Write will be the output of the following python code, justify your answer.1
x=24
y=0
print(‘P’)
try:
print(‘Q’)
A=x/y
print(‘R’)
except ZeroDivisionError:
print(‘T’)
except:
print(‘S’)
finally:
print(‘Python program is over’)

(xvii) What is a Stack? What basic operations can be performed on them? 2


(xviii) Write a python program to plot the algebraic equation: 10x + 14. 2

2. Answer the following questions based on Computer Networks.

(i) Write one restriction of wired and one wireless networks. 1


(ii) How MAC address is different from IP address? 1
(iii) Write the purpose of following commands: 3
(1) whois
(2) ipconfig
(3) nslookup
(iv) What is VoIP? 1
(v) What is IoT? 1
(vi) Differentiate between guided and unguided media with examples of each. 2
(vii) Define the following terms: 2
(a) Switch
(b) Gateway
(viii) Riana Medicos Centre has set up its new centre in Dubai. It has four buildings
5

as shown in the diagram given below: 4

As a network expert, provide the best possible answer for the following queries:
(i) Suggest the type of network established between the buildings.
(ii) Suggest the most suitable place (i.e., building) to house the server of this
organization.
(iii) Suggest the placement of the following devices with justification:
(a) Repeater (b) Hub/Switch
(iv) Suggest a system (hardware/software) to prevent unauthorized access to or
from the network.

3. Answer the following questions based on Database Management.


6

(i) What is DBMS? Write three advantages of DBMS. 2


(ii) What do you understand by the term “Primary Key” and “Degree of Relation”
in relational database? 2
(iii) Define the following terms: 2
(a) Foreign Key
(b) Candidate Key
(iv) What are aggregate functions? 2
(v) Consider the following tables CARDEN and CUSTOMER and answer (A)
and (B) parts of question: 7
Table: CARDEN

Ccode CarName Make Color Capacity Charges


501 A-Star Suzuki RED 3 14
503 Indigo Tata SILVER 3 12
502 Innova Toyota WHITE 7 15
509 SX4 Suzuki SILVER 4 14
510 C Class Mercedes RED 4 35

Table: CUSTOMER

CCode CName Ccode


1001 Hemant Sahu 501
1002 Raj Lal 509
1002 Feroze Shah 503
1004 Ketan Dhal 502

(A) Write SQL commands for the following statements:

(i) To display the names of all the silver colored Cars.


(ii) To display name of car, make and capacity of cars in descending order of
their sitting capacity.
(iii) To display the highest charges at which a vehicle can be hired from
CARDEN.
(iv) To display the customer name and the corresponding name of the cars
hired by them.
(B) Give the output of the following SQL queries:
7

(i) SELECT COUNT(DISTINCT Make) FROM CARDEN;


(ii) SELECT MAX(Charges),MIN(Charges) FROM CARDEN;
(iii) SELECT CarName FROM CARDEN WHERE Capacity=4;
4. Answer the following questions based on Society, Law and Ethics.

(i) What is meant by the term Cyber Forensics? 1


(ii) How does phishing happen? 1
(iii) What do you understand by the term Plagiarism? 1
(iv) What is E-waste management? 1
(v) What is Identity theft? 1
(vi) Name the different types of intellectual property. 1
(vii) What is Gender and disabilities issues while teaching and using computers? 2
(viii) Differentiate between Proprietary Licence and Open Source Licence. 2

You might also like