Professional Documents
Culture Documents
Sample Paper1
Sample Paper1
Question 1.
Find the output of the following questions based on list value = [45, 32, 98, – 78, – 6, ‘Hello’, ‘Honesty’]
(i) value [5] (ii) value [-5]
Answer: Answer:
Hello 98
(iii) value [1] + value [-1] (iv) Value [4] + value [-4]
Answer: Answer:
TypeError : unsupported operand type (s) for + ‘int’ and ‘str’ -84
Question 2.
(i) Find the output
a = [10,20,30,40,50,60]
for i in range (1, 5):
a[i – 1] = a[i]
for i in range (0, 5):
print (a[i], end = ” “)
Answer:
20 30 40 50 50
(i) If you are getting negative, demeaning messages on social networking profile, mails from many
unknown people, what do you think is happening? [1 + 1]
Answer:
All these indicate cyber bullying and cyber stalking.
Question 3.
Write a program which will find all such numbers which are divisible by 8 but are not a multiple of 5,
between 500 and 1000 (both included). [2]
Answer:
list = [ ]
for i in range (500,1001):
if (i % 8 ==0) and (i % 5 != 0):
list, append (str (i))
print (list)
Question 4.
(a) What should we do with e-waste?
Answer:
Reduce, reuse, and recycle. Reduce your generation of e-waste through smart procurement and good
maintenance. Reuse still-functioning electronic equipment. Recycle those components that cannot be
repaired.
(b) What is eavesdropping? [1+1]
Answer:
When an attacker accesses an active communication channel to listen the ongoing communication and
gets information about the content. It is carried out through all communication devices and media such
as telephone systems, emails, instant messaging, chat rooms or social networking sites.
Question 5.
Write the corresponding python expressions for the following mathematical expressions.
(i) √(a2+b2+c2)
Answer:
math.sqrt (a*a + b*b + c*c)
Question 6.
(i) What is Adware ?
Answer:
Adware are the software that deliver unwanted ads to your computer.
(ii) Name the categories of public licenses. [1+1]
Answer:
(a) GNU General Public License (GPL) (b) Creative Commons (CC)
Question 7.
Write a python program to find sum of three random numbers between 51 and 1000. OR
What are the characteristics of Python Dictionaries?
Answer:
import random
num1 = random, randint (51,1000)
num2 = random, randint (51,1000)
num3 = random, randint (51,1000)
print (“sum of numbers is “, num1 + num2 + num3) OR
(ii) extend ( )
Answer:
extend ( ): This methods extend the list by adding all items of the list (passed as an argument) to the end
of the list.
Syntax
list1. extend (list2)
(iii) remove ( )
Answer:
remove ( ): This method searches for the given element in the list and removes the first matching
element.
Syntax
listName. remove (element)
(iv) count ( )
Answer:
count ( ): This method returns the number of occurrences of an element in a list.
Syntax
listName. count (element)
Question 12.
(i) What is the importance of digital footprint? [4] OR
What do you mean by Phishing?
Answer:
Digital footprint stays forever and cannot be undone. College/ universities and employers look
back at them to know about applicants. They try to figure out how they conduct themselves in real life
before appointing them.
OR
Phishing is an unlawful activity where fake websites or emails that look original or authentic are
presented to the user to fraudulently collect sensitive and personal details, particularly usernames,
passwords, banking and credit card details.
Read the case study given below and attempt any 4 sub-questions (out of 5). Each sub-question carries 1
mark.
Question 13.
A Python module can be defined as a python program file which contains a python code including
python functions, classes, or variables. In other words, we can say that our python code file saved with
extension (.py) is treated as the module. We may have a runnable code inside the python module.
Modules in Python provide us the flexibility to organize the code in a logical way. To use the
functionality of one module into another, we must have to import the specific module. The import
statement is used to import all the functionality of one module into another. Here, we must notice that
we can use the functionality of any python source file by importing that file as the module into another
python source file. We can import multiple modules with a single import statement, but a module is
loaded once regardless of the number of times, it has been imported into our file
(i) Which extension is used to save the Python file?
Answer:
Python files are stored with .py extension.
(ii) What is the use of import statement?
Answer:
import statement is used to import all functionality of one module into another Python code.