0% found this document useful (0 votes)
17 views4 pages

CS-XI-QP ANNUAL-2021.1

class11 cs sqp

Uploaded by

shriyamgoyal
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)
17 views4 pages

CS-XI-QP ANNUAL-2021.1

class11 cs sqp

Uploaded by

shriyamgoyal
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/ 4

GOODEARTH FOUNDATION SCHOOLS

ANNUAL EXAMINATION [2020-21]

CLASS: XI TIME :3hours


SUBJECT: Computer Science(083) M.M : 70

GENERAL INSTRUCTIONS:
1. All questions are compulsory.
2. The question paper is divided into 2 sections A and B.
3. There is no overall choice in this question paper. However internal choices may be
there.
SECTION A

1 Python is a/an___________________language. 1
a) Compiled b) Interpreted c) Compiled& interpreted 4) None of these

2 Which of the following is a valid assignment operator in Python ? 1


a) ? b < c)=* d) and e) //

3. Which of the following is a valid keyword? 1


a) IF b) If c) if d) None of these

4. Find the output of the following Python program: 1


For x in range(1,20,3)
a) 1,20,3 b) 1,4,7,10,13,16,19 c) 13,6,9,12,15,18 d) 20,40,60,80,100

5. What will be the output of the following code? 1


str=” My Python Programming”
print(str[ : -4] )

6. Given the lists L=[1,3,6,82,5,7,11,92] , 1


Write the output of print(L[1:6])

7. Suppose a tuple T is declared as T = (10, 12, 43, 39), which of the following is incorrect? 1
a) print(T[1])
b) T[3] = 9
c) print(max(T))
d) print(len(T))
8. Write a statement in Python to declare a dictionary whose keys are 1, 2, 3 and values are 1
Monday, Tuesday and Wednesday respectively.
9. What will be the output of the following code? 1
X,y=2,6
X,y=y,X+2
Print(X,y)

10. Identify the valid declaration of L: 1


L = [‘Mon’, ‘23’, ‘hello’, ’60.5’]
a) dictionary b) tuple c) list d)string

11. If the following code is executed, what will be the output of the following code? 1
QP/CS/XI/Annual Exam/2020-21 /Page 1 of 4
name="ComputerSciencewithPython"
print(name[3:10])

12. Which of the following is not a loop statement in Python? 1


a) do-while b)while c) for d) all of these

13. The extension of a Python file is given as: 1.

a) .pt b) .pwy c) .py d).yppy

14. The___________Method adds a single items to the existing list at the end. 1

15. What is the value of x,if x=math.sqrt(25.0)? 1


a)(5,-5) b) 5 c) 5.0 d)(5.0,-5.0)

16. What is the output of math.ceil(4.4)? 1


a) 5 b) 4 c) 4.0 d) 5.0

17. Single line comments in python begin with ____________symbol. 1

18. Two types of looping statements are______________and ___________. 1

19. Which of the following is not a python legal string operation? 1


a) ‘abc’+’abc’ b) ‘abc’*3 c) ‘abc’+3 d ‘abc’.lower()

20 To create new dictionary with no items: 1


a) Dict b) dict() c) d={ } d None of these

SECTION B
21. Find the output of the following Python program: 2
For k in range(10,20,5):
Print(k)

22. Find the output of the following Python program: 2


Str=”pen”
Print(list(Str))
a)[‘p’,’e’,’n’] b) [pen] c) [p/e/n] d) {“pen”}

23. Which of the following can be used as valid variable identifier(s) in Python? 2
(i) 4thSum (ii) Total (iii) Number# (iv) Data

24. 3
What possible outputs(s) are expected to be displayed on screen at the time of execution of the
program from the following code?
import random as r
n=r.random(1,5,2)
print(n)
25. Find the output of the following Python program: 3
i=0

QP/CS/XI/Annual Exam/2020-21 /Page 2 of 4


While(i<10):
i=i+1
If i==5:

Break
Print(i,end=” ”)

26. Find error in the following code and correct it by rewriting the code and underline the 2
correction.

X=int(“enter value for x”))


For in range[0,11]:
If x=y
Print x+y
Else:
Print x-y

27 Convert the following while loop into for loop: 2

X=5
While(x<10):
X+=2

Attempt any 4 from 28 to 32 3*4 12

28. Write a program in python to find the maximum element in the list. 3

29. Write a program in python to count number of even and odd elements in the list. 3

30. Write a program in python to search an element in the list. 3

31. Write a program in python to sum and average all the elements given in the list. 3

32 Write a program in python to reverse an element in the list. 3

Attempt any 4 from 33 to 37 3*4 12

33 Write a program in python to count no of vowels and consonants in string. 3

34. Write a program in python to check a string is palindrome or not. 3

35. Write a program in python to count a word in string. 3

36. Write a program in python to find the length of the string. 3

37. Write a program in python to count uppercase and lowercase character in string. 3

Attempt any 2 from 38 to 40 3*2 6

38. Write a program in python to create a dictionary with name of the students and their phone no. 3

QP/CS/XI/Annual Exam/2020-21 /Page 3 of 4


39. Write a program in python to update a dictionary by modifying with name their phone no. 3

40. Write a program in python to create a dictionary with name of the employee and their Salary.

Attempt any 2 from 41 to 43 2*2 4

41. What is the difference between pop () and remove ()? 2

42. What is the difference between append () and extend ()? 2

43. What is the difference between list and tuple? 2

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

QP/CS/XI/Annual Exam/2020-21 /Page 4 of 4

You might also like