WEST BENGAL COUNCIL OF HIGHER SECONDARY EDUCATION
PYTHON PROGRAMMING — MCQ QUESTION PAPER
Subject: Computer Science / Computer Application
Total Questions: 70 | Full Marks: 70
Type: Multiple Choice Questions (MCQ)
Student Information
Name: Class: Roll No.:
Name: Class: Roll No.:
📋 General Instructions
- There are 70 multiple-choice questions.
- Each question carries 1 mark.
- Select the most appropriate answer from the four options.
- All questions are compulsory.
- Questions cover Python fundamentals, operators, control statements, strings, lists, tuples, dictionaries, functions and basic programming concepts.
SECTION A — PYTHON FUNDAMENTALS
1. Who developed the Python programming language?
2. Which symbol is used for a single-line comment in Python?
3. Which function is used to display output in Python?
4. Which function is used to take input from the keyboard?
5. Which of the following is a valid Python identifier?
6. Python is primarily a ______ language.
7. Which extension is normally used for Python source files?
8. Which of the following represents the Boolean value True?
9. What is the type of 10 in Python?
10. What is the output of print(2 + 3 * 4)?
SECTION B — OPERATORS AND EXPRESSIONS
11. Which operator is used for exponentiation?
12. What is the result of 17 // 5?
13. What is the result of 17 % 5?
14. Which operator checks equality?
15. Which operator means "not equal to"?
16. Which is a logical AND operator in Python?
17. Which is the logical OR operator?
18. What is the output of 10 > 5?
19. Which operator is used for assignment?
20. What is the result of 2 ** 3?
SECTION C — CONDITIONAL STATEMENTS
21. Which keyword is used for decision making?
22. Which keyword is used when the if condition is false and another condition must be checked?
23. Which keyword executes when all previous conditions are false?
24. What is the output?
if 5 > 2: print("Yes")
if 5 > 2: print("Yes")
25. Python uses ______ to define blocks of code.
26. Which statement is useful when a block is syntactically required but no action is needed?
27. What is the output of: print("A" if 10>5 else "B")?
28. Which statement can be nested inside another if statement?
SECTION D — LOOPS
29. Which loop is commonly used to iterate over a sequence?
30. Which loop continues while a condition is True?
31. What does range(5) generate?
32. Which statement terminates a loop immediately?
33. Which statement skips the current iteration?
34. What does pass do?
35. What is the output of:
for i in range(3): print(i)
for i in range(3): print(i)
36. Which loop can become an infinite loop if its condition never becomes false?
SECTION E — STRINGS
37. Which data type is used to represent text?
38. Which symbol can be used to create a string?
39. What is the output of len("Python")?
40. What is the first index of a Python string?
41. What is the output of "Python"[0]?
42. Which method converts a string to uppercase?
43. Which method removes leading and trailing whitespace?
SECTION F — LISTS, TUPLES AND DICTIONARIES
44. Which brackets are used to create a list?
45. Which data structure is mutable?
46. Which brackets are normally used to create a tuple?
47. Which data structure stores key-value pairs?
48. Which brackets are used for a dictionary?
49. Which method adds an element at the end of a list?
50. What is the output of len([10,20,30,40])?
51. Which method removes and returns the last element of a list by default?
52. Which method sorts a list in place?
SECTION G — FUNCTIONS
53. Which keyword is used to define a function?
54. Which keyword sends a value back from a function?
55. What is a parameter?
56. What is the output?
def add(a,b): return a+b
print(add(2,3))
def add(a,b): return a+b
print(add(2,3))
57. A function can have:
58. Which type of variable is defined inside a function?
SECTION H — OUTPUT-BASED AND CONCEPTUAL QUESTIONS
59. What is the output of: print(10 - 3)?
60. What is the output of: print(4 * 5)?
61. What is the output of: print(10 / 2)?
62. What is the output of: print("Py" + "thon")?
63. What is the output of: print("Hi" * 3)?
64. What is the output of: x=[1,2,3]; print(x[1])?
65. Which value represents the absence of a value in Python?
66. Which function returns the data type of an object?
67. Which function converts a string containing an integer to an integer?
68. Which of the following is immutable?
69. Which keyword is used to import a module?
70. Which of the following is NOT a Python built-in data type?
No comments:
Post a Comment