0% found this document useful (0 votes)
25 views8 pages

Grade 11 C SC QP H Y Exam Nov 2024 - 241120 - 204656

The document is a half-yearly examination paper for Grade 11 students at Our Own High School, Dubai, specifically for the subject of Computer Science. It contains 37 compulsory questions divided into five sections, covering various topics in Python programming, including logical and arithmetic operations, data structures, and programming tasks. The exam is scheduled for November 18, 2024, with a total of 70 marks and a reading time of 15 minutes.

Uploaded by

canvauses0.0
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)
25 views8 pages

Grade 11 C SC QP H Y Exam Nov 2024 - 241120 - 204656

The document is a half-yearly examination paper for Grade 11 students at Our Own High School, Dubai, specifically for the subject of Computer Science. It contains 37 compulsory questions divided into five sections, covering various topics in Python programming, including logical and arithmetic operations, data structures, and programming tasks. The exam is scheduled for November 18, 2024, with a total of 70 marks and a reading time of 15 minutes.

Uploaded by

canvauses0.0
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/ 8

OUR OWN HIGH SCHOOL, DUBAI

Half-Yearly Examination - November 2024

Name__________________________ Grade: 11 Sec:___


Subject: COMPUTER SCIENCE (083) M Marks: 70
Date: 18 / 11 / 2024 Time: 3 Hours

General Instructions:
• This question paper contains 37 questions.
• All questions are compulsory. However, internal choices have been provided in
some questions. Attempt only one of the choices in such questions
• The paper is divided into 5 Sections- A, B, C, D and E.
• Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
• Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
• Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
• Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
• Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
• In the case of MCQ, text of the correct answer should also be written.
• All programming questions are to be answered using Python Language only.
• Reading Time 15 minutes.

SECTION A (21 x 1 = 21 Marks)


1 State True or False: 1
The Python interpreter handles logical errors during code execution.

2 Which of the following expressions evaluates to False? 1


(A) not(True) and False
(B) True or False
(C) not(False and True)
(D) True and not(False)

3 What will be the output of the following statement? 1


print(6+5/4**2//5+8)
(A) –14.0
(B) 14.0
(C) 14
(D) –14

Page 1 of 8
4 Identify the valid Python identifier from the following: 1
(A) 2user
(B) user@2
(C) user_2
(D) user 2

5 The ____ statement is used for selection or decision making. 1


(A) if
(B) for
(C) while
(D) break

6 Which of the following is valid arithmetic operator in Python? 1


(A) //
(B) ?
(C) <
(D) and

7 Which of the following are keywords in Python? 1


(A) break
(B) check
(C) range
(D) while

8 The return type of the input() function is 1


(A) string
(B) integer
(C) list
(D) tuple

9 What will be the value of p and r at the end of this program? 1


p = 40
r = 50
p=p+r
r=p-r
p=p-r
print (p, r)
(A) p = 40, r = 40
(B) p = 50, r = 50
(C) p = 50, r = 40
(D) p = 40, r = 50

Page 2 of 8
10 What will be the output of this program? 1
p = "12"
q = "5"
r = 10
s=8
print(p+q, r+s)
(A) 17 18
(B) 125 108
(C) 17 108
(D) 125 18

11 Identify the output of the following code snippet: 1


text = "PYTHONPROGRAM"
text=text.replace('PY','#')
print(text)
(A) #THONPROGRAM
(B) ##THON#ROGRAM
(C) #THON#ROGRAM
(D) #YTHON#ROGRAM

12 What is the output of the expression? 1


str='International'
print(str.split("n"))
(A) ('I', 'ter', 'atio', 'al')
(B) ['I', 'ter', 'atio', 'al']
(C) ['I', 'n', 'ter', 'n', 'atio', 'n', 'al']
(D) Error

13 Find output of the following code: 1


S = "text#next"
print(S.strip("t"))

14 Select the correct output of the following code: 1


event="G20 Presidency@2023"
L=event.split(' ')
print(L[::-2])
(A) 'G20'
(B) ['Presidency@2023']
(C) ['G20']
(D) 'Presidency@2023'

15 What does the list.remove(x) method do in Python? 1


(A) Removes the element at index x from the list
(B) Removes the first occurrence of value x from the list
(C)Removes all occurrences of value x from the list
(D)Removes the last occurrence of value x from the list

Page 3 of 8
16 Fill in the blank : ___________ is not a valid built-in function for list manipulations. 1
(A)count()
(B) length()
(C) append()
(D) extend()

17 Fill in the blank. 1


_____ function is used to arrange the elements of a list in ascending order.
(A) sort()
(B) arrange()
(C) ascending()
(D) asort()

18 Given the following dictionary Day={1:"Monday", 2: "Tuesday", 3: "Wednesday"} 1


Which statement will return "Tuesday".
(A) Day.pop()
(B) Day.pop(2)
(C) Day.pop(1)
(D) Day.pop("Tuesday")

19 Predict the output of the following code snippet: 1


Tup= (10, 20, 30, 50)
Tup.insert(2,3)
print (Tup)

Q20 and Q21 are Assertion(A) and Reason(R) based questions. Mark
the correct choice as:
(A) Both A and R are true and R is the correct explanation for A
(B) Both A and R are true and R is not the correct explanation
for A
(C) A is True but R is False
(D) A is False but R is True
20 Assertion (A): The expression "HELLO".sort() in Python will give an error. 1
Reason (R): sort() does not exist as a method/function for strings in Python.

21 Assertion (A): A list can contain another list as an element. 1


Reasoning (R): Lists are a type of sequence in Python.

SECTION B (7 x 2=14 Marks)


22 How is a mutable object different from an immutable object in Python? 2
Identify one mutable object and one immutable object from the following:
(1,2), [1,2], {1:1,2:2}, ‘123’

23 Give two examples of each of the following: 2


(I) Logical operators (II) Relational operators

Page 4 of 8
24 (i) (A) What is the difference between = and == in Python? 2

OR
(B) What is the difference between the / and // in Python?

(II) (A) How do you create an empty list and an empty dictionary in Python?

OR
(B) What is the difference between a tuple and a list in Python?

25 How will you add a new element 9 in tuple T=(1,2,3) without using list and append()? 2

26 Distinguish between break and continue in Python loops. Give suitable programming 2
example with output.

27 (A) Find output of the following Python code: 2


s = "hello"
freq = {}
for char in s:
freq[char] = freq.get(char, 0) + 1
print(freq)
OR
(B) Find output of the following Python code:
words = ['Python', 'is', 'fun']
print('@'.join(words))

28 (A) Write the Python statement for each of the following tasks using built-in 2
functions/methods only:

(i) To remove the item whose key is "NISHA" from a dictionary named Students.
For example, if the dictionary Students contains
{"ANITA":90, "NISHA":76, "ASHA":92}, then after removal the dictionary
should contain {"ANITA":90,"ASHA":92}

(ii) To display the number of occurrences of the substring "is" in a string named
message.
For example if the string message contains "This is his book", then the
output will be 3.
OR
(B) A tuple named subject stores the names of different subjects. Write the Python
commands to convert the given tuple to a list and thereafter delete the last element
of the list.

Page 5 of 8
SECTION C ( 3 x 3 = 9 Marks)
29 (A) Write a Python program to print the first 20 numbers of the Fibonacci sequence 3
using a for loop.
Fibonacci sequence: 0 1 1 2 3 5 8 13 .......

OR
(B) Write a Python program to find the factorial of a number using a while loop.
Factorial of N= 1*2*3…….(N-1)*N

30 (A) Write a Python program to input a list having N integers. Swap the alternate elements 3
of the list. Display the modified list. Where N is an even number. Do not create any
extra list.

OR
(B) Write a Python program to input a list having N integers. Swap the first half of the
list with second half of the list. Display the modified list. Where N is an even number.
Do not create any extra list.

31 Predict the output of the Python code given below: 3

(A) s="India Growing"


n = len(s)
m=""
for i in range (0, n) :
if (s[i] >= 'a' and s[i] <= 'm') :
m = m + s [i].upper()
elif (s[i] >= 'o' and s[i] <= 'z') :
m = m +s [i-1]
elif (s[i].isupper()):
m = m + s[i].lower()
else:
m = m + '@'
print (m)

OR
(B) Write the output on execution of the following Python code:
S="Mr Arora and Madam"
L=S.split()
for W in L:
x=W.upper()
if x==x[::-1]:
for I in x:

Page 6 of 8
print(I,end="*")
else:
for I in W:
print(I,end="#")
print()

SECTION D (4 X 4 = 16 Marks)
32 (A) Write a Python program to input a number, find the reversed number without 4
converting the number to string. Display the reversed number. Check if the number is a
Palindrome.

OR
(B) Write a Python program to input a number N and print the following pattern using
nested for loops.
For example, if N=5, then the following pattern will be printed:
1
121
12321
1234321
123454321

33 Write a Python program to count the number of vowels, consonants, digits, and spaces 4
in a string.

34 (A) Write a Python program to input a List having N integers, reverse a list without using 4
the built-in reverse() method and without using another list. Display the reversed list.

OR
(B) Write a Python program to input N numbers in a List called ALL. Separate the odd and
even numbers and store them in new lists ODD and EVEN. Display the contents of the
lists ODD and EVEN.

35 Write a Python program to input a List having N integers, count the 4


occurrences/frequency of each element in a list and display the output as follows:
If the List = [1, 2, 2, 3, 4, 4, 4, 5] then the output will be:

Element Frequency
1 1
2 2
3 1
4 3
5 1

Page 7 of 8
SECTION E (2 X 5 = 10 Marks)
36 In class 11-K there are 20 students. Teacher conducted a test in Marketing. Input all 5
marks and store them in a list called MARKS.

(a) A student who was absent for the test wrote a re-test. Insert new mark 80 in
the index 4.
(b) Teacher wrongly entered the 10th student’s mark. Modify the marks as 92.
(c) Write a statement to remove a mark entered by the user (teacher). Check if the
mark is present in the list and then delete it else display appropriate message.
(d) Teacher wants to see the marks in highest to lowest order. Help the teacher to
sort the list accordingly.

37 Sohan wrote program to input his friends’ names and their Phone Numbers and store 5
them in the dictionary called Phone as the key-value pair. Help him to complete
following taskes:
(a) He collected a new friend’s name and mobile number. Add this key and value to
the dinctionary Phone.
(b) One of his friend changed his mobile number. Input the old mobile number and
delete it from the dictionary.
(c) In continuation with above question (b), modify the phone number.
(d) He doesn’t remember whether a particular friend’s number is existing in the
directory Phone. Help him to check if the friend is present in the directory or
not.
(e) (i) Finally display the entire dictionary is sorted order of names.
OR
(ii) He wants to removes all items from the dictionary, leaving it empty {}. Help
him to accomplish this task.

******

Page 8 of 8

You might also like