Class 11 - CS - Practice questions
Class 11 - CS - Practice questions
Practice questions:-
Q.3. After practicals, Atharv left the computer laboratory but forgot to sign off
from his email account. Later, his classmate Revaan started using the same
computer. He is now logged in as Atharv. He sends inflammatory email
messages to few of his classmates using Atharv’s email account. Revaan’s
activity is an example of which of the following cyber crime?
a) Hacking b) Identity theft c) Cyber bullying d) Plagiarism
Q.5. Suhana is down with fever. So, she decided not to go to school tomorrow.
Next day, in the evening she called up her classmate, Shaurya and enquired
about the computer class. She also requested him to explain the concept.
Shaurya said, “Mam taught us how to use tuples in python”. Further, he
generously said, “Give me some time, I will email you the material which will
help you to understand tuples in python”. Shaurya quickly downloaded a 2-
minute clip from the Internet explaining the concept of tuples in python. Using
video editor, he added the text “Prepared by Shaurya” in the downloaded video
clip. Then, he emailed the modified video clip to Suhana. This act of Shaurya is
an example of:
a) Fair use b) Hacking c) Copyright infringement d) Cyber crime
1|Page
product_list={'Potato Chips':175, 'Pasta':140,'Besan':150,'Cheesy
bits':200,'Corn puff':250},
write a Python statement to add another product to it :- Chilly Sticks, 300
Q.11. After a fight with your friend, you did the following activities. Which of
these activities is not an example of cyber bullying?
a) You sent an email to your friend with a message saying that “I am sorry”.
b) You sent a threatening message to your friend saying “Do not try to call or
talk to me”.
c) You created an embarrassing picture of your friend and uploaded on your
account on a social networking site.
Q.15. Consider the statements given below and then choose the correct output
from the given options:-
myStr="MISSISSIPPI"
print(myStr[:4]+"#"+myStr[-5:])
Q.16. Identify the statement from the following which will raise an error:
2|Page
(b) ['Presidency@2023']
(c) ['G20']
(d) 'Presidency@2023'
Q.20. If a is (1,2,3) (a) What is the difference (if any) between a*3 and
(a,a,a)?
(b) What is the difference between a[1:2] and a[1:1]?
3|Page
Q.23. Find the error. Following code intends to create a tuple with three identical
strings. But even after successfully executing following code (No error reported
by Python), the len() returns a value different from 3. Why?
tup1=('Mega')*3
print(len(tup1))
Q.24. Explain any two ways of creating dictionary with suitable programming
examples.
Q.25. The code given below accepts five numbers and displays whether they
are even or odd:
Observe the following code carefully and rewrite it after removing all syntax and
logical errors: and rewrite it after removing all
Underline all the corrections made.
for i in range(5)
num=int(input("Enter a number")
if num/2==0:
print("Even")
else:
print("Odd")
(i) reads a dictionary S from user which contains Name:[Eng, Math, Science] as
key: value pairs and print the dictionary.
(ii) And then it displays the corresponding grade obtained by the students
according to the following grading rules:
Q.27.
4|Page
Section - C
Q.28. Given a list ‘alist’, write the most appropriate list method to perform the
following tasks on it:
(a) Delete a given element from the list.
(b) Add an element in the end of the list.
(c) Add an element in the beginning of the list.
Q.30. Why is the following code producing error? Correct the error and display
the output of the corrected code.
box,jars,crates={},{},{}
box['biscuit']=1
box['cake']=3
jars['jam']=4
crates['box']=box
crates['jars']=jars
print(len(crates[box]))
Section - D
5|Page
Q.31. Write a program to create a dictionary with the roll number, name and
marks of n students in a class and display the names of students who have
marks above 75.
Ex-
stu_marks={1:["Aditya Rao",80],
2:["Bela Singh",45],
3:["Manoj Verma",76],
4:["Devesh Patel",84]}
Aditya Rao
Manoj Verma
Devesh Patel
Subject_marks=(
(80,78,75),
(15.5,30.0,20.0),
(65,73.4,60),
(12.0,23.3,13.3),
(30.0,40.0,25.5),
------------end-------------
6|Page