0% found this document useful (0 votes)
28 views5 pages

C. Sc. Pt-3 QP Grade 11 - Set 1

This document is a periodic test paper for Grade 11 Computer Science at Our Own High School, Dubai, dated January 2022. It consists of two sections: Section A with multiple-choice questions worth 10 marks and Section B with subjective questions worth 15 marks. The questions cover various Python programming concepts and require students to demonstrate their understanding of lists, functions, and control structures.

Uploaded by

Isaac Newton
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)
28 views5 pages

C. Sc. Pt-3 QP Grade 11 - Set 1

This document is a periodic test paper for Grade 11 Computer Science at Our Own High School, Dubai, dated January 2022. It consists of two sections: Section A with multiple-choice questions worth 10 marks and Section B with subjective questions worth 15 marks. The questions cover various Python programming concepts and require students to demonstrate their understanding of lists, functions, and control structures.

Uploaded by

Isaac Newton
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/ 5

OUR OWN HIGH SCHOOL, DUBAI

PERIODIC TEST-3, JANUARY-2022


Computer Science (083)
Set-1

Grade: 11 Max Marks: 25


Date: 11-01-2022 Time: 1 hour
Name of the Student: _______________________________________ Class & Sec: …….

General Instructions:
• Please read the instructions carefully.
• This question paper is divided into 02 sections, Section A (MCQ) and B (Subjective).
• Section A is of 10 marks.
• Section B is of 15 marks.
SECTION-A
Answer all the questions
1. What will be the output for the following Python statements? 1

L=[10,20,30,40,50]
L=L+5
print(L)

(a) [10,20,30,40,50,5]
(b) [15,25,35,45,55]
(c) [5,10,20,30,40,50]
(d) Error

2. Identify the output of the following Python statements: 1

L=[]
for i in range(4):
L.append(2*i+1)
print(L[::-1])

(a) [7, 5, 3, 1]
(b) [9, 7, 5, 3]
(c) [4, 3, 2, 1]
(d) [1, 2, 3, 4]

Page 1 of 5
3. Identify the output of the following Python Statements: 1

L1, L2=[10, 15, 20, 25],[]


for i in range(len(L1)):
L2.insert(i,L1.pop())
print(L1,L2, sep="&")

(a) []&[25, 20, 15, 10]


(b) [10, 15, 20, 25]&[25, 20, 15, 10]
(c) [10, 15, 20, 25]&[10, 15, 20, 25]
(d) [25, 20, 15, 10]&[]

4. What is the output of the following Python code? 1

def ListChange():
for i in range(len(L)):
if L[i]%2==0:
L[i]=L[i]*2
if L[i]%3==0:
L[i]=L[i]*3
else:
L[i]=L[i]*5

L=[2,6,9,10]
ListChange()
for i in L:
print(i, end="#")

(a) 4#12#27#20#
(b) 6#18#27#50#
(c) 20#36#27#100#
(d) Error

Page 2 of 5
5. Which of the following option can be the output for the following Python code? 1

L1=[10, 20, 30, 20, 10]


L2=[]
for i in L1:
if i not in L2:
L2.append(i)
print(L1, L2, sep="&")

(a) [10, 20, 30, 20, 10]&[10, 20, 30, 20, 10]
(b) [10, 20, 30, 20, 10] [10, 20, 30, 20, 10] &
(c) [10, 20, 30, 20, 10]&[30, 20, 10]
(d) [10, 20, 30, 20, 10]&[10, 20, 30]

6. What will be the output of the following Python code? 1

L=[10,20]
L1=[30,40]
L2=[50,60]
L.append(L1)
L.extend(L2)
print(L)

(a) [60, 50, 40, 30, 20, 10]


(b) [10, 20, 30, 40, 50, 60]
(c) [10, 20, 30, 40,[50, 60]]
(d) [10, 20, [30, 40], 50, 60]

7. Which of the following is a mutable type? 1


(a) string
(b) tuple
(c) int
(d) list

8. Which of the following statements are True? 1


i. [1,2,3,4]>[4,5,6]
ii. [1,2,3,4]<[1,5,2,3]
iii. [1,2,3,4]>[1,2,0,3]
iv. [1,2,3,4]<[1,2,3,2]

(a) i, ii,iv
(b) i, iii, iv
(c) Ii, iii
(d) Only iv

Page 3 of 5
9. What will be the output of the following code? 1
>>> l=[1,2,3,4]
>>> m=[5,6,7,8]
>>> n=m+l
>>> print(n)

(a) [1,2,3,4,5,6,7,8]
(b) [5, 6, 7, 8, 1, 2, 3, 4]
(c) [1,2,3,4][5,6,7,8]
(d) [5,6,7,8] [1,2,3,4]

10. If a list is created as: 1


>>>l=[1,2,3,'a',['apple','green'],5,6,7,['red','orange']] then what will be the output
of the following statement:

>>>l[8][0][2]

(a) 'd' (b) 'e'


(c) 'r' (d) 'o'

SECTION-B
Answer all the questions.

11. Distinguish between pop() and remove() function is List with help of suitable 2
examples.

12. Write a program to count the number of strings where the string length is 3 and 2
the first character is ‘U’.
Sample list: ['India', 'USA', 'Nepal', 'UAE', 'Iran']
Expected Result: 2

13. Write a program to input a list having n numbers and find the highest and 2
lowest value in the list without using built-in functions max() and min().

If list L=[10, -10, 20, -20, 15]


Highest value= 20
Lowest value= -20

14. Write the output of the following Python program code: 3

Page 4 of 5
str1=list("Pt-3")
for i in range(len(str1)):
if i==3:
x=int(i)
x+=x-3
str1[i]=x
elif (str1[i].islower()):
str1[i]=str1[i].upper()
else:
str1[i]=str1[i]*2
print(str1)

15. Write a program to input a list having n numbers. Display the list. Swap the first 3
half of list with second half. Display the modified list. (n is an even number)

Displaying the list: [11, 22, 33, 44, 55, 66]


Displaying the modified List: [44, 55, 66, 11, 22, 33]

16. Write a program to input a list having n numbers. Display the list. Add 10 to all odd 3
values and add 20 to all even values in the list L. Display the modified list.

Displaying the list: [1, 2, 3, 4, 5, 6]


The modified list: [11, 22, 13, 24, 15, 26]

*********************

Page 5 of 5

You might also like