Informatics Practices

CBSE Class 11 Informatics Practices Unit 2 Python MCQs with Answers | Introduction to Python Programming | 100 Important Questions (2026–27)

Class 11 · Informatics Practices

CBSE Class 11 Informatics Practices Unit 2 MCQs with Answers | Introduction to Python

Preparing for your CBSE Class 11 Informatics Practices examination? Practice these carefully selected 100 Multiple Choice Questions (MCQs) based on the latest CBSE syllabus (2026–27). These questions cover Python basics, execution modes, operators, control statements, lists, dictionaries, NumPy, debugging, and data type conversion.

Topics Covered
  • Basics of Python Programming
  • Interactive and Script Mode
  • Program Structure and Indentation
  • Identifiers, Keywords, Constants and Variables
  • Operators and Operator Precedence
  • Data Types
  • Mutable and Immutable Objects
  • Comments
  • Input and Output Statements
  • Type Conversion
  • Debugging
  • Control Statements
  • Lists
  • Dictionaries
  • Introduction to NumPy

Python Basics MCQs (Part 1)


Q1. Python is a ________ programming language.

A. Low-level
B. Machine-level
C. High-level
D. Assembly-level

Show Answer

Answer: C. High-level

Explanation: Python is a high-level programming language that is easy to learn, read, and write.


Q2. Python was developed by:

A. Dennis Ritchie
B. James Gosling
C. Guido van Rossum
D. Bjarne Stroustrup

Show Answer

Answer: C. Guido van Rossum

Explanation: Python was created by Guido van Rossum and first released in 1991.


Q3. Which mode executes one statement at a time immediately?

A. Script Mode
B. Interactive Mode
C. Debug Mode
D. Compile Mode

Show Answer

Answer: B. Interactive Mode

Explanation: Interactive mode executes each statement immediately after it is entered.


Q4. Which mode is generally used for writing large Python programs?

A. Interactive Mode
B. Script Mode
C. Shell Mode
D. Debug Mode

Show Answer

Answer: B. Script Mode

Explanation: Script mode allows programs to be written, saved, edited, and executed from a file.


Q5. Python uses ________ to define blocks of code.

A. Curly Braces {}
B. Parentheses ()
C. Indentation
D. Semicolons

Show Answer

Answer: C. Indentation

Explanation: Python uses indentation instead of braces to identify blocks of code.


Q6. Which of the following is a valid Python identifier?

A. 2value
B. total_marks
C. class
D. student-name

Show Answer

Answer: B. total_marks

Explanation: An identifier cannot begin with a digit, contain hyphens, or use reserved keywords.


Q7. Which of the following is a Python keyword?

A. marks
B. total
C. while
D. result

Show Answer

Answer: C. while

Explanation: while is a reserved keyword used for looping in Python.


Q8. Which symbol is used to write a single-line comment in Python?

A. //
B. /* */
C. #
D. --

Show Answer

Answer: C. #

Explanation: The hash (#) symbol is used to write single-line comments in Python.


Q9. Which function is used to take input from the user?

A. print()
B. input()
C. scanf()
D. read()

Show Answer

Answer: B. input()

Explanation: The input() function accepts input from the user through the keyboard.


Q10. Which function is used to display output on the screen?

A. display()
B. show()
C. print()
D. output()

Show Answer

Answer: C. print()

Explanation: The print() function displays output on the screen.


Q11. Which of the following is a valid variable assignment in Python?

A. 10 = x
B. x = 10
C. int = 20
D. x-y = 5

Show Answer

Answer: B. x = 10

Explanation: In Python, a variable is assigned a value using the assignment operator (=). Variable names cannot start with a number or contain hyphens.


Q12. Which data type represents whole numbers in Python?

A. float
B. str
C. int
D. bool

Show Answer

Answer: C. int

Explanation: The int data type stores integer values such as 5, -12, and 100.


Q13. Which data type is used to store decimal numbers?

A. int
B. float
C. bool
D. str

Show Answer

Answer: B. float

Explanation: Numbers containing a decimal point are stored as float values.


Q14. Which data type stores textual information?

A. bool
B. str
C. int
D. float

Show Answer

Answer: B. str

Explanation: A string (str) stores characters enclosed within single or double quotes.


Q15. Which of the following is a Boolean value in Python?

A. TRUE
B. False
C. false
D. TRUE()

Show Answer

Answer: B. False

Explanation: Python has two Boolean values: True and False. They are case-sensitive.


Q16. Which operator is used for exponentiation in Python?

A. ^
B. **
C. %%
D. //

Show Answer

Answer: B. **

Explanation: The ** operator raises a number to the power of another number.


Q17. Which operator returns the remainder after division?

A. //
B. /
C. %
D. **

Show Answer

Answer: C. %

Explanation: The modulus operator (%) returns the remainder after division.


Q18. Which operator performs floor division?

A. /
B. %
C. //
D. **

Show Answer

Answer: C. //

Explanation: Floor division (//) returns the integer quotient after removing the decimal part.


Q19. What will be the output of the following expression?

print(10 / 2)

A. 5
B. 5.0
C. 5.00.0
D. Error

Show Answer

Answer: B. 5.0

Explanation: The division operator (/) always returns a floating-point value in Python.


Q20. Which operator has the highest precedence among the following?

A. +
B. *
C. **
D. -

Show Answer

Answer: C. **

Explanation: Exponentiation (**) has higher precedence than multiplication, division, addition, and subtraction.


Q21. What will be the output of the following expression?

print(2 + 3 * 4)

A. 20
B. 14
C. 24
D. 10

Show Answer

Answer: B. 14

Explanation: Multiplication (*) has higher precedence than addition (+). Therefore, 3 × 4 = 12, and then 2 + 12 = 14.


Q22. Which of the following is a mutable data type in Python?

A. Tuple
B. String
C. List
D. Integer

Show Answer

Answer: C. List

Explanation: Lists are mutable, which means their elements can be modified after creation.


Q23. Which of the following is an immutable data type?

A. List
B. Dictionary
C. String
D. Set

Show Answer

Answer: C. String

Explanation: Strings cannot be modified after they are created. Any modification creates a new string.


Q24. What will be the output of the following code?

print(type(15.8))

A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>

Show Answer

Answer: B. <class 'float'>

Explanation: The value 15.8 contains a decimal point, so Python treats it as a floating-point number.


Q25. Which function converts a value into an integer?

A. float()
B. str()
C. int()
D. bool()

Show Answer

Answer: C. int()

Explanation: The int() function converts compatible values into integers.


Q26. Which function converts a value into a floating-point number?

A. int()
B. float()
C. str()
D. list()

Show Answer

Answer: B. float()

Explanation: The float() function converts integers and numeric strings into floating-point values.


Q27. Which function converts a value into a string?

A. int()
B. float()
C. str()
D. bool()

Show Answer

Answer: C. str()

Explanation: The str() function converts any compatible value into a string.


Q28. What is the output of the following code?

print(int("25"))

A. "25"
B. 25
C. 25.0
D. Error

Show Answer

Answer: B. 25

Explanation: The int() function converts the numeric string "25" into the integer value 25.


Q29. Which of the following statements is used to make decisions in Python?

A. while
B. for
C. if
D. break

Show Answer

Answer: C. if

Explanation: The if statement is used for decision-making based on a condition.


Q30. Which of the following is an example of a logical operator?

A. +
B. *
C. and
D. %

Show Answer

Answer: C. and

Explanation: The logical operators in Python are and, or, and not. They are used to combine or negate conditions.


Q31. Which comparison operator checks whether two values are equal?

A. =
B. ==
C. !=
D. >=

Show Answer

Answer: B. ==

Explanation: The equality operator (==) compares two values and returns True if they are equal.


Q32. Which comparison operator means "not equal to"?

A. <>
B. =!
C. !=
D. ==

Show Answer

Answer: C. !=

Explanation: The != operator checks whether two values are different.


Q33. What will be the output of the following code?

print(10 > 5)

A. False
B. True
C. 10
D. Error

Show Answer

Answer: B. True

Explanation: Since 10 is greater than 5, the expression evaluates to True.


Q34. Which statement is executed when the condition in an if statement is True?

A. else block
B. elif block
C. if block
D. None of these

Show Answer

Answer: C. if block

Explanation: The statements inside the if block execute only when the specified condition evaluates to True.


Q35. Which statement is used when multiple conditions need to be checked one after another?

A. if-else
B. if-elif-else
C. switch-case
D. goto

Show Answer

Answer: B. if-elif-else

Explanation: The if-elif-else statement is used to test multiple conditions sequentially.


Q36. Which loop is generally used when the number of iterations is known?

A. while loop
B. for loop
C. do-while loop
D. repeat loop

Show Answer

Answer: B. for loop

Explanation: A for loop is commonly used when the number of repetitions is known in advance.


Q37. Which loop continues executing as long as the condition remains True?

A. for loop
B. while loop
C. foreach loop
D. repeat loop

Show Answer

Answer: B. while loop

Explanation: A while loop executes repeatedly until its condition becomes False.


Q38. What will be the output of the following code?

for i in range(3):
    print(i)

A. 1 2 3
B. 0 1 2
C. 0 1 2 3
D. 1 2

Show Answer

Answer: B. 0 1 2

Explanation: range(3) generates the values 0, 1, and 2.


Q39. Which function is commonly used with a for loop to generate a sequence of numbers?

A. list()
B. input()
C. range()
D. type()

Show Answer

Answer: C. range()

Explanation: The range() function generates a sequence of numbers for iteration in a for loop.


Q40. What will be the output of the following code?

x = 5
if x > 10:
    print("A")
else:
    print("B")

A. A
B. B
C. 5
D. Error

Show Answer

Answer: B. B

Explanation: Since the condition x > 10 is False, the else block is executed and "B" is printed.


Q41. What will be the output of the following code?

i = 1
while i <= 3:
    print(i)
    i += 1

A. 1 2
B. 1 2 3
C. 0 1 2 3
D. Infinite loop

Show Answer

Answer: B. 1 2 3

Explanation: The loop starts with i = 1 and continues until i becomes greater than 3.


Q42. Which statement correctly increases the value of variable x by 1?

A. x++
B. ++x
C. x += 1
D. x =+ 1

Show Answer

Answer: C. x += 1

Explanation: Python does not support ++. The correct way to increment a variable is x += 1.


Q43. Which keyword is used to terminate a loop immediately?

A. stop
B. exit
C. break
D. continue

Show Answer

Answer: C. break

Explanation: The break statement immediately terminates the nearest enclosing loop.


Q44. Which keyword skips the current iteration of a loop and moves to the next iteration?

A. pass
B. continue
C. break
D. next

Show Answer

Answer: B. continue

Explanation: The continue statement skips the remaining statements in the current iteration and proceeds with the next iteration.


Q45. What will be the output of the following code?

for i in range(1, 5):
    print(i)

A. 0 1 2 3 4
B. 1 2 3 4
C. 1 2 3 4 5
D. 0 1 2 3

Show Answer

Answer: B. 1 2 3 4

Explanation: range(1, 5) generates the numbers 1, 2, 3, and 4. The ending value is excluded.


Q46. Which function is used to determine the data type of a variable?

A. id()
B. type()
C. class()
D. datatype()

Show Answer

Answer: B. type()

Explanation: The type() function returns the data type of an object.


Q47. Which of the following is a syntax error in Python?

A. Missing colon (:) after an if statement
B. Dividing by zero
C. Using an undefined variable
D. Entering invalid user input

Show Answer

Answer: A. Missing colon (:) after an if statement

Explanation: A missing colon after statements such as if, for, or while causes a syntax error.


Q48. Debugging is the process of:

A. Writing comments
B. Finding and removing errors from a program
C. Installing Python
D. Creating variables

Show Answer

Answer: B. Finding and removing errors from a program

Explanation: Debugging is the process of identifying, analyzing, and correcting errors in a program.


Q49. Which type of error occurs when a program produces an incorrect output without displaying an error message?

A. Syntax Error
B. Logical Error
C. Runtime Error
D. Indentation Error

Show Answer

Answer: B. Logical Error

Explanation: A logical error does not stop program execution, but it produces an incorrect result.


Q50. Which of the following is NOT a valid Python data type?

A. int
B. float
C. character
D. bool

Show Answer

Answer: C. character

Explanation: Python does not have a separate character data type. A single character is represented as a string of length one.


Q51. Which symbol is used to create a list in Python?

A. ()
B. {}
C. []
D. <>

Show Answer

Answer: C. []

Explanation: Lists in Python are created using square brackets []. Example: marks = [85, 90, 78].


Q52. Which of the following is a valid Python list?

A. (10, 20, 30)
B. {10, 20, 30}
C. [10, 20, 30]
D. <10, 20, 30>

Show Answer

Answer: C. [10, 20, 30]

Explanation: A Python list is enclosed within square brackets.


Q53. Which feature of Python lists allows elements to be modified after creation?

A. Immutable
B. Mutable
C. Constant
D. Fixed

Show Answer

Answer: B. Mutable

Explanation: Lists are mutable, meaning their elements can be added, removed, or modified.


Q54. Which function returns the number of elements in a list?

A. count()
B. size()
C. len()
D. total()

Show Answer

Answer: C. len()

Explanation: The len() function returns the total number of elements in a list.


Q55. What will be the output of the following code?

numbers = [10, 20, 30]
print(len(numbers))

A. 2
B. 3
C. 10
D. Error

Show Answer

Answer: B. 3

Explanation: The list contains three elements, so len(numbers) returns 3.


Q56. Which method adds an element at the end of a list?

A. insert()
B. append()
C. add()
D. extend()

Show Answer

Answer: B. append()

Explanation: The append() method adds a single element at the end of a list.


Q57. Which method inserts an element at a specified position in a list?

A. append()
B. insert()
C. add()
D. update()

Show Answer

Answer: B. insert()

Explanation: The insert(index, value) method inserts an element at the specified index.


Q58. What will be the output of the following code?

lst = [5, 10]
lst.append(15)
print(lst)

A. [5, 10]
B. [15, 5, 10]
C. [5, 10, 15]
D. Error

Show Answer

Answer: C. [5, 10, 15]

Explanation: The append() method always adds the new element at the end of the list.


Q59. Which method removes the first occurrence of a specified value from a list?

A. delete()
B. remove()
C. pop()
D. clear()

Show Answer

Answer: B. remove()

Explanation: The remove() method removes the first matching element from the list.


Q60. Which method removes and returns the last element of a list by default?

A. remove()
B. pop()
C. delete()
D. clear()

Show Answer

Answer: B. pop()

Explanation: The pop() method removes and returns the last element if no index is specified.


Q61. Which method returns the number of times a specified element appears in a list?

A. len()
B. count()
C. index()
D. find()

Show Answer

Answer: B. count()

Explanation: The count() method returns the number of occurrences of a specified element in a list.


Q62. Which method returns the index of the first occurrence of an element in a list?

A. search()
B. position()
C. index()
D. count()

Show Answer

Answer: C. index()

Explanation: The index() method returns the position of the first occurrence of the specified element.


Q63. What will be the output of the following code?

lst = [10, 20, 30, 20]
print(lst.count(20))

A. 1
B. 2
C. 3
D. Error

Show Answer

Answer: B. 2

Explanation: The value 20 appears twice in the list.


Q64. What will be the output of the following code?

lst = [5, 10, 15]
print(lst.index(10))

A. 10
B. 1
C. 2
D. Error

Show Answer

Answer: B. 1

Explanation: Python list indexing starts from 0. Therefore, 10 is present at index 1.


Q65. Which method reverses the elements of a list?

A. sort()
B. reverse()
C. flip()
D. invert()

Show Answer

Answer: B. reverse()

Explanation: The reverse() method reverses the order of elements in the same list.


Q66. Which method arranges the elements of a list in ascending order by default?

A. arrange()
B. order()
C. sort()
D. sequence()

Show Answer

Answer: C. sort()

Explanation: The sort() method sorts the list in ascending order unless specified otherwise.


Q67. Which built-in function returns the smallest element in a list?

A. minimum()
B. small()
C. min()
D. least()

Show Answer

Answer: C. min()

Explanation: The min() function returns the smallest value from a list.


Q68. Which built-in function returns the largest element in a list?

A. maximum()
B. max()
C. largest()
D. high()

Show Answer

Answer: B. max()

Explanation: The max() function returns the largest value in a list.


Q69. Which built-in function returns the sum of all numeric elements in a list?

A. total()
B. add()
C. sum()
D. count()

Show Answer

Answer: C. sum()

Explanation: The sum() function calculates and returns the sum of all numeric elements in a list.


Q70. What will be the output of the following code?

lst = [8, 2, 5]
lst.sort()
print(lst)

A. [8, 2, 5]
B. [2, 5, 8]
C. [8, 5, 2]
D. Error

Show Answer

Answer: B. [2, 5, 8]

Explanation: The sort() method arranges the elements in ascending order by default.


Q71. Which built-in function converts a sequence into a list?

A. tuple()
B. list()
C. dict()
D. set()

Show Answer

Answer: B. list()

Explanation: The list() function converts an iterable such as a tuple, string, or set into a list.


Q72. What will be the output of the following code?

lst = list("CODE")
print(lst)

A. ['CODE']
B. ['C', 'O', 'D', 'E']
C. CODE
D. Error

Show Answer

Answer: B. ['C', 'O', 'D', 'E']

Explanation: The list() function converts each character of the string into a separate list element.


Q73. Which of the following statements is used to traverse all elements of a list?

A. if statement
B. while statement only
C. for loop
D. switch statement

Show Answer

Answer: C. for loop

Explanation: A for loop is commonly used to visit each element of a list one by one.


Q74. What will be the output of the following code?

lst = [2, 4, 6]
for i in lst:
    print(i)

A. 2 4 6
B. 0 1 2
C. [2, 4, 6]
D. Error

Show Answer

Answer: A. 2 4 6

Explanation: The for loop prints each element of the list one after another.


Q75. Which of the following statements about Python lists is TRUE?

A. Lists cannot contain duplicate values.
B. Lists can store elements of different data types.
C. Lists are immutable.
D. Lists cannot be modified.

Show Answer

Answer: B. Lists can store elements of different data types.

Explanation: Python lists are heterogeneous and can store integers, strings, floats, Boolean values, and even other lists.


Q76. A dictionary stores data in the form of:

A. Index and Value
B. Row and Column
C. Key-Value Pair
D. Character and Number

Show Answer

Answer: C. Key-Value Pair

Explanation: A dictionary stores information using unique keys associated with corresponding values.


Q77. Which symbol is used to create a dictionary in Python?

A. []
B. ()
C. {}
D. <>

Show Answer

Answer: C. {}

Explanation: Dictionaries are created using curly braces { } containing key-value pairs.


Q78. Which of the following is a valid dictionary?

A. {"Name":"Aman", "Age":16}
B. ["Name","Aman"]
C. ("Name","Aman")
D. <"Name","Aman">

Show Answer

Answer: A. {"Name":"Aman", "Age":16}

Explanation: A dictionary consists of key-value pairs enclosed within curly braces.


Q79. Which dictionary method returns all the keys of a dictionary?

A. values()
B. items()
C. keys()
D. get()

Show Answer

Answer: C. keys()

Explanation: The keys() method returns a view containing all keys of the dictionary.


Q80. Which dictionary method returns all the values stored in a dictionary?

A. values()
B. keys()
C. items()
D. clear()

Show Answer

Answer: A. values()

Explanation: The values() method returns a view object containing all values of the dictionary.


Q81. Which dictionary method returns both keys and values as pairs?

A. keys()
B. values()
C. items()
D. update()

Show Answer

Answer: C. items()

Explanation: The items() method returns all key-value pairs of a dictionary as tuple pairs.


Q82. Which dictionary method is used to add or update key-value pairs?

A. append()
B. update()
C. insert()
D. add()

Show Answer

Answer: B. update()

Explanation: The update() method adds new key-value pairs or updates existing ones.


Q83. Which statement is used to delete a dictionary completely?

A. remove(dict)
B. delete dict
C. del dict
D. pop(dict)

Show Answer

Answer: C. del dict

Explanation: The del statement deletes the entire dictionary or a specific key from it.


Q84. Which dictionary method removes all elements from a dictionary?

A. remove()
B. clear()
C. pop()
D. erase()

Show Answer

Answer: B. clear()

Explanation: The clear() method removes all key-value pairs, leaving an empty dictionary.


Q85. What will be the output of the following code?

student = {"Name":"Aman", "Age":16}
print(len(student))

A. 1
B. 2
C. 16
D. Error

Show Answer

Answer: B. 2

Explanation: The dictionary contains two key-value pairs, so len() returns 2.


Q86. Which loop is commonly used to traverse a dictionary?

A. while loop only
B. do-while loop
C. for loop
D. switch statement

Show Answer

Answer: C. for loop

Explanation: A for loop is commonly used to traverse dictionary keys, values, or items.


Q87. Which statement correctly creates an empty dictionary?

A. d = []
B. d = {}
C. d = ()
D. d = <>

Show Answer

Answer: B. d = {}

Explanation: An empty dictionary is created using curly braces {}.


Q88. Which library is introduced in this unit for numerical computing?

A. Pandas
B. Turtle
C. NumPy
D. Matplotlib

Show Answer

Answer: C. NumPy

Explanation: NumPy is a Python library used for numerical computing and working with arrays efficiently.


Q89. NumPy arrays are generally created from:

A. Dictionary only
B. List
C. Tuple only
D. String only

Show Answer

Answer: B. List

Explanation: In this CBSE unit, NumPy arrays are introduced by creating them from Python lists.


Q90. Which statement is commonly used to import the NumPy library?

A. import numpy as np
B. include numpy
C. using numpy
D. import np

Show Answer

Answer: A. import numpy as np

Explanation: The standard convention is import numpy as np, where np is an alias for the NumPy library.


Q91. Which of the following is a valid NumPy array creation statement?

A. np.array([10, 20, 30])
B. np.list(10, 20, 30)
C. np.create([10, 20, 30])
D. array.numpy(10, 20, 30)

Show Answer

Answer: A. np.array([10, 20, 30])

Explanation: The array() function of the NumPy library is used to create NumPy arrays from Python lists.


Q92. Which of the following statements about NumPy arrays is TRUE?

A. They can only store strings.
B. They are designed for efficient numerical computations.
C. They cannot be created from Python lists.
D. They replace dictionaries.

Show Answer

Answer: B. They are designed for efficient numerical computations.

Explanation: NumPy arrays provide faster numerical operations and efficient memory usage compared to ordinary Python lists.


Q93. Which of the following is NOT a mutable data type?

A. List
B. Dictionary
C. String
D. NumPy Array

Show Answer

Answer: C. String

Explanation: Strings are immutable in Python, whereas lists, dictionaries, and NumPy arrays are mutable.


Q94. Which function converts user input into an integer?

A. float(input())
B. str(input())
C. int(input())
D. bool(input())

Show Answer

Answer: C. int(input())

Explanation: Since input() returns a string, int(input()) converts it into an integer.


Q95. Which of the following statements is used to display "Hello World" in Python?

A. echo("Hello World")
B. print("Hello World")
C. display("Hello World")
D. write("Hello World")

Show Answer

Answer: B. print("Hello World")

Explanation: The print() function is used to display output on the screen.


Q96. Which of the following is the correct sequence for executing a Python program?

A. Write → Save → Run
B. Run → Write → Save
C. Save → Run → Write
D. Compile → Link → Execute

Show Answer

Answer: A. Write → Save → Run

Explanation: In Script Mode, a Python program is first written, then saved, and finally executed.


Q97. Which of the following is considered a runtime error?

A. Missing colon after an if statement
B. Incorrect indentation
C. Division by zero during execution
D. Misspelled keyword

Show Answer

Answer: C. Division by zero during execution

Explanation: A runtime error occurs while the program is executing. Dividing a number by zero raises a ZeroDivisionError.


Q98. Which of the following best describes debugging?

A. Writing comments in a program
B. Executing a Python file
C. Detecting and correcting program errors
D. Creating variables

Show Answer

Answer: C. Detecting and correcting program errors

Explanation: Debugging is the process of finding, analyzing, and fixing errors in a program.


Q99. Which topic is included in the CBSE Class 11 Informatics Practices Unit 2 syllabus?

A. File Handling
B. Object-Oriented Programming
C. NumPy Arrays from Lists
D. MySQL Queries

Show Answer

Answer: C. NumPy Arrays from Lists

Explanation: Unit 2 introduces students to creating NumPy arrays from Python lists. Topics like File Handling and MySQL are covered in later units.


Q100. Which of the following best summarizes Python?

A. A low-level programming language used only for system programming.
B. A high-level, interpreted, general-purpose programming language with simple syntax.
C. A database management system.
D. A spreadsheet application.

Show Answer

Answer: B. A high-level, interpreted, general-purpose programming language with simple syntax.

Explanation: Python is a high-level, interpreted programming language known for its readability, simplicity, and wide range of applications including web development, data science, artificial intelligence, and automation.


Quick Revision

  • Python is a high-level, interpreted programming language.
  • Python programs can be executed in Interactive Mode and Script Mode.
  • Indentation is mandatory for defining code blocks.
  • Lists are mutable, whereas strings are immutable.
  • Dictionaries store data as key-value pairs.
  • append(), insert(), remove(), pop(), sort(), and reverse() are important list methods.
  • keys(), values(), items(), update(), and clear() are commonly used dictionary methods.
  • range() is widely used with for loops.
  • Debugging helps identify and correct syntax, runtime, and logical errors.
  • NumPy arrays are created using np.array() from Python lists.

Exam Tip

For the CBSE examination, focus on the differences between Interactive Mode vs Script Mode, Mutable vs Immutable Data Types, List Methods vs Dictionary Methods, and practice output-based questions on loops, operators, and built-in functions. These are frequently tested in MCQs, competency-based questions, and case-based questions.