0% found this document useful (0 votes)
43 views6 pages

Cs SP

The document provides a sample paper for computer science with multiple choice and long answer questions covering topics like Python programming, databases, networking and cyber security. Some questions test knowledge of basic Python concepts like data types, functions, modules etc. Other questions involve writing Python code to solve problems related to stacks, queues, recursion etc. Database questions cover SQL queries, joins and aggregate functions. Networking questions cover topics like cloud computing, network devices, protocols etc. Cyber security questions involve identifying types of cybercrimes and suggesting security measures.

Uploaded by

bijjaljoseph
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)
43 views6 pages

Cs SP

The document provides a sample paper for computer science with multiple choice and long answer questions covering topics like Python programming, databases, networking and cyber security. Some questions test knowledge of basic Python concepts like data types, functions, modules etc. Other questions involve writing Python code to solve problems related to stacks, queues, recursion etc. Database questions cover SQL queries, joins and aggregate functions. Networking questions cover topics like cloud computing, network devices, protocols etc. Cyber security questions involve identifying types of cybercrimes and suggesting security measures.

Uploaded by

bijjaljoseph
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/ 6

COMPUTER SCIENCE (083)

SAMPLE PAPER 2
(2019-20)
(F.M:70)

Q.No. Questions Marks


SECTION A
1
(a) Which of the following is the truncation division operator? 1
(i) / (ii) % (iii) // (iv) |
(b) Write the type of tokens:- 1
(i) def
(ii) complex
(c) Write code (Python Library Module) to access value of pi to calculate area of a circle. Use 1
the module after renaming it.
(d) Create a dictionary (using comprehension) with each item being a pair of a number and
its square. 2
(e) Write the output of the following Python code:
L1=[55, 99, 33, 88, 66]
Start=1
S=0
for C in range(Start, 3):
S=S+L1[C] 2
print(C,”:”, S)
S=S+L1[0] * 10
print(S)

(f) What will be the output of the following Python code:


def Change(A, B=30):
A=A+B
B=A-B 3
print(A, “#”, B)
return(A)
x=150
y=100
x=Change(x,y)
print(x, “#”, y)
y=Change(y)

(g) Consider the following code:

import random
x=random.random()
y=random.randint(0,4)
print(int(x), “:”, y+int(x)) 2

find the suggested output options (i) to (iv). Also, write the maximum and minimum value
that can be assigned to the variable y.
PREPARED BY NAMITA RANJAN, KV AFS BAREILLY pg. 1
(i) 0:0
(ii) 1:6
(iii) 2:4
(iv) 0:3
2
(a) Suppose list1 is [4, 33, 46, 14,25]. What is list1[-1]? 1
(b) What will be the output of the following Python code:-
>>>t=(1,2)
>>>2 * t 1

(i) (1,2,1,2)
(ii) [1,2,1,2]
(iii) (1,1,2,2)
(iv) [1,1,2,2]
(c) What will be the output of the following Python code:-
d={“john”:40, “peter”:45}
print(d[“john”])
(i) 40 1
(ii) 45
(iii) “john”
(iv) “peter”
(d) What is the list comprehension equivalent for: 1
{x:x is a natural number less than 50, x is even}
(e) Find and write the output of the following Python code:-
word=”Hello Python” 1
print(word.find(‘py’,1))
print(word.find(‘o’,5,11))
(f) How are docstrings different from comments? 2
(g) Write code to create a pie for sequence con=[23.4,17.8,25.6,34.2,40] for Zones=[‘East’,
‘West’, ‘North’, ‘South’, ‘Central’]
• Show South Zone’s value exploded
• Show % contribution for each zone.
Or
Give output using a rough drawing(Angles in pie chart may be approximate) of following
code: 2
import matplotlib.pyplot as plt
qdata=[100,200,250,150]
lb=[‘Q1SALE’,’Q2SALE’,’Q3SALE’,’Q4SALE’]
plt.pie(qdata, labels=lb,explode=[0.1,0,0,0.2] )
plt.title(‘Z SQUARE’)
plt.show()
(h) Write code to print just the last line of a text file ‘Story.txt’. Also display the total number
of lines.
OR 2
Write code to write a list content to a file.
(i) Write a recursive function that computes the sum of numbers 1………n
i.e. 1+2+3+….+n where n is an input from user. 3
OR
PREPARED BY NAMITA RANJAN, KV AFS BAREILLY pg. 2
Write a function for Binary Search in a list/array using recursion.
(j) Write a function in Python, PUSHSTUD(Arr) and POPSTUD(Arr) for performing insertion
and deletion operations in a STACK. Accept items from user in a tuple containing
(sid, sname, marks)
OR 4
Write a function in python, QADD(Package) and QDEL(Package) to add a new Package and
delete a Package from a List of Package Price (List of Floats), considering them to act as
insert and remove operations of the Queue data structure.
3
(a) ___________________ is the service that makes our website available to be viewed by 1
others on the Internet.
(b) _____________________ is the domain name of 1
http://www.income.in/home.aboutus.html.
(c) A _______________ establishes connection between two networks and it can handle 1
network with different protocols.
(d) _________________ is a network utility program used to obtain information about 1
internet servers.
(e) Give the full forms of the following:-
(i) GSM
(ii) GPRS 2
(iii) SMTP
(iv) IMAP

(f) Write two differences between a Private and Public cloud? 2


(g) Identify the type of cybercrime for the following situations:
• A person clicked on a malicious URL and all his login credentials were stolen.
• Unauthorized control of a person’s computer was gained by exploiting the working of the 3
internet and the Windows operating system
• A person was offered a reward of 1 crore and asked to deposit 1 lac as tax before
receiving the sum. After paying no reward was given.
(h) Multipurpose Public School, Bengaluru is setting up the network between its different
wings of school campus. There are 4 wings named as:-
SENIOR(S), JUNIOR(J), ADMIN(A) and HOSTEL(H)

PREPARED BY NAMITA RANJAN, KV AFS BAREILLY pg. 3


4

(i) Suggest the best wired medium and draw the cable layout to efficiently
connect various wings of Multipurpose Public School, Bengaluru.
(ii) Name the most suitable wing where the servers 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 a protocol that shall be needed to provide wireless
internet access to all smartphone/laptop users in the campus of Multipurpose
Public School, Bengaluru.
SECTION B
4.
(a) What is NULL value in MySql? 1
(b) What is the purpose of a Foreign Key? 1
(c) What is the use of Group By command? 1
(d) Which keyword eliminates redundant data from a query result? 1
(e) Differentiate between Primary Key and Candidate Key?
Or 2
Differentiate between Char and Varchar data type?
(f) Write the use of GET and POST http requests in Django? 2
(h) Write the output for SQL queries (i) to (iii), and commands for (iv) to (vii) which are based on the
table STUDENT given below:

PREPARED BY NAMITA RANJAN, KV AFS BAREILLY pg. 4


7

(i) Select max(price), min(qty_store) from watches;


(ii) Select quarter, sum(qty_sold) from sale group by quarter;
(iii) Select watch_name, qty_store, sum(qty_sold), qty_storesum(qty_sold) “Stock” from
watches w, sales where w. watched=swatches group by s. watched;
(iv) To display all the details of those watches whose name ends with ‘Time’
(v) To display watch’s name and price of those watches which have price range in
between 5000-15000.
(vi) To display total quantity in store of Unisex type watches
(vii) To display watch name and their quantity sold in first quarter.

SECTION C
5
(a) __________________ Certificate establishes legal and valid ownership about an 1
intellectual property.
(b) What are proper methods and steps for the disposal of used electronic items? 1
(c) List the Societal issues induced by technology? 2
(d) Differentiate between the two types of Plagiarism? 2
(e) List the common ways for how one’s identity can be stolen? 2
(f) Write two ways to handle gender issues while teaching/using computers? 2

PREPARED BY NAMITA RANJAN, KV AFS BAREILLY pg. 5


PREPARED BY NAMITA RANJAN, KV AFS BAREILLY pg. 6

You might also like