[go: up one dir, main page]

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

Class11 1

This document is a question paper for Class XI Computer Science (083) for the session 2024-25, consisting of five sections (A to E) with a total of 70 marks and a time limit of 3 hours. Each section contains different types of questions, including multiple-choice, short answer, and programming problems, primarily focused on Python programming concepts. The paper includes various topics such as string manipulation, list operations, and basic programming constructs.

Uploaded by

Preeti Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views9 pages

Class11 1

This document is a question paper for Class XI Computer Science (083) for the session 2024-25, consisting of five sections (A to E) with a total of 70 marks and a time limit of 3 hours. Each section contains different types of questions, including multiple-choice, short answer, and programming problems, primarily focused on Python programming concepts. The paper includes various topics such as string manipulation, list operations, and basic programming constructs.

Uploaded by

Preeti Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Class: XI Session:

2024-25 Computer
Science (083)
Question Paper
Maximum Marks: 70 Time Allowed: 3
hours General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks
each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each.
8. All programming questions are to be answered using Python Language
only.

SECTION
A
1. Negative index -1 belongs to of string. 1
(a) first character (b) last character (c) second last character
(d) second character
2. What is the output of the following 1
code ? str1= "Mission 999"
str2= "999"
print(str1.isdigit(), str2.isdigit())
(a) False True (b) False False (c) True False (d) True True
3. Select the correct output of the following String 1
operations. str1= 'Waha'
print (str1[:3] + ' Bhyi ' + str1[-3:])
(a) Wah Bhyi Wah (b) Wah Bhyi aha(c) WahBhyiWah(d) WahBhyiWaha

4. Consider the given expression: 1


(not True) and (False or True)
Which of the following will be correct output if the given
expression is evaluated?

(a) True
(b) False
(c) NONE
(d) NULL

5. Select the correct output of the code: 1


a = "Year 2022 at All the best"

1
a = a.split('2')
b = a[0] + ". " + a[1] + ". " + a[3]
print (b)

(a) Year . 0. at All the best


(b) Year 0. at All the best
(c) Year . 022. at All the best
(d) Year . 0. at all the best

6. Which of the following functions removes all leading and trailing 1


spaces from a string?
(a) Istrip() (b) rstrip() (c) strip() (d) all of these

7. Fill in the blank: 1


For strings, operator performs concatenation.

8. State True or False: 1


The split() returns always a 3-element list.

9. Which of the following statement(s) would give an error 1


after executing the following code?

S="Welcome to class XII" # Statement 1


print(S) # Statement 2
S="Thank you" # Statement 3
S[0]= '@' # Statement 4
S=S+"Thank you" # Statement 5

(a) Statement 3
(b) Statement 4
(c) Statement 5
(d) Statement 4 and 5
10. List can contain values of these types: 1
(a) integers (b) floats (c) lists (d) tuples (e) all of these

11. To find the last element of list namely 'smiles' in Python, will be used. 1

(a) smiles[-1] (b) smiles[0] (c) smiles[lpos] (d) smiles[:-1]

12. Given a list L= [10, 20, 30, 40, 50, 60, 70], what would L[1: 4] return? 1

(a) [10, 20, 30, 40] (b) [20, 30, 40, 50] (c) [20, 30, 40] (d) [30, 40,
50]
13. Fill in the blank: 1
Lists are data types and thus their values can be changed.

14. What will the following expression be evaluated to in Python? 1


print(15.0 // 4 + (8 + 3.0))

(a) 16.75 (b)14.0 (c) 15 (d) 15.5

2
15. Fill in the blank:
The operator replicates a tuple. 1

16. Fill in the blank:


A list contains another list as its element. 1
17. State True or False: 1
A =[] and A = list() will produce the same result

18. State True or False: 1


The append() can add an element in the middle of a
list.
SECTION
B
19. What is a string slice? How is it useful? 2

20. What is mutability and immutability. 2

21. What is the similarity and difference between 2


sorted() and sort() functions?

22. What is the error in the following 2


code? s=
("Anata","won","the","game")
s[1] = "lost"
23. Consider the following string 2
mySubject: mySubject = "Computer
Science"

Answer any two:


What will be the output of the following string
operations:
(1) print(mySubject [0:len(mySubject)])
(2) print(mySubject[-7 : -1])
(3) print(mySubject[::2])
(4) print(mySubject.startswith('Comp'))
24. What will be the output of the following 2
statements? (i) list1 = [12,32,65, 26, 80, 10]
list1.sort(
)
print(list1
)
(ii) list1 = [12,32,65, 26, 80, 10]
print(len(list1))

3
25. Are dictionaries mutable? Justify your answer with 2
suitable example.

4
SECTION
C
26. Consider the following code: 3

string =input("Enter a
string :") count = 3
while True:
if string[0]=='a':
string =
string[2:] elif
string[-1] == ‘b’:
string = string[:2]
else:
count
+= 1
break
print
(string)
print
(count)

What will be the output produced, if the input is:


(i) aabbcc (ii) aaccbb (iii) abcc?
27. Consider the following string myAddress: 3

myAddress = "WAZ-1, New Ganga Nagar, New

Delhi" Answer any 3 questions below:


What will be the output of following string operations:
(i) print(myAddress.lower())
(ii) print (myAddress.upper())
(iii) print (myAddress.count('New'))
(iv) print (myAddress.replace('New', 'Old'))
(v) print (myAddress.split(','))
(vi) print (myAddress.find('New'))
28. Write a program to find the number of times an 3
element occurs in the list.(take the element as input)

5
29. Consider a list: 3
list1 = [6,7,8,9]
What is the difference between the following
operations on list1:
(a) list1+[2]
(b) list1 += [2]
(c) list1= list1 + [2]

6
30. What will be the output of the following code 3
segment: (a) myList = [1,2,3,4,5,6,7,8,9,10]
del
myList[3:]
print(myList
)
(b) myList = [1,2,3,4,5,6,7,8,9,10]
del
myList[:5]
print
(myList)
(c) myList = [1,2,3,4,5,6,7,8,9,10]
del
myList[::2]
print
(myList)
SECTION
D
31. Case Study: 5

In the vibrant world of tech at Tech Academy, a student named Emma explores
the realms of programming languages, web development, data science, and AI.
She keeps track of her favorite programming languages and their usage
frequency:

languages = ['Python', 'Java', 'C', 'JavaScript', 'Ruby']


frequency = [45, 40, 30, 50, 25]

1) How can you update the usage frequency of 'Java' to 42 in the frequency
list?

2) What code should be used to delete the programming language 'C' from
the languages list?

3) If you want to access the third programming language in the languages


list, what code should you use?

4) How can you add the programming language 'Swift' to the end of the
languages list?

5) What code should be used to get the frequency of the programming


language 'JavaScript' from the frequency list?

7
32. Write any five built-in functions of list with suitable 5
examples

Or

Write any five built-in functions of tuples with suitable


examples

33. Consider the following code: 5


Inp = input("Please enter a
string :") while len(Inp) <= 4:
if Inp[-1] == 'z': #condition
1 Inp = Inp [0:3]+'c'
elif 'a' in Inp: #condition
2 Inp = Inp[0] + 'bb'
elif not int(Inp[0]): #condition
3 Inp='1' + Inp[1: ]+ 'z'
else:
Inp = Inp + '*'
print (Inp)
What will be the output produced if the input is
(i) 1bzz, (ii)'la' (iii)'abe' (iv)' Oxy', (v)'xyz'?

8
SECTION
E
34. Define following functions of strings : 4
a) <string>.strip()
b) <string>.endswith()
c) <string>.replace(old,new)
d) <string>.isupper()

35. Write a program that asks the user for a string and 4
creates a new string that doubles each character of the
original string. For instance, if the user enters Sipo, the
output should be SSiippoo.
Or
Write a Python program to create a simple student
record book. The program should allow the user to
input names and corresponding student registration
number. Use a dictionary to store the registration
number, where each name is associated with a
registration number. The program should provide the
following functionalities:
1. Add a new record to the student record.
2. Display the entire record with student’s name’s
and registration numbers.
Note: Ensure that the registration number has a valid
length (e.g., 13 digits).

You might also like