Artificial Intelligence

CBSE Class 9 AI Chapter 5 MCQs with Answers (2026–27) | Introduction to Python | 50 Important Questions

Class 9 · Artificial Intelligence


Q1. Which programming language is described as one of the most popular and easiest to learn for Artificial Intelligence?

A. Java
B. C++
C. Python
D. Ruby

Show Answer

Answer: C. Python

Explanation: Python is one of the most popular programming languages because of its simple syntax, readability, and extensive support for Artificial Intelligence, Data Science, and software development.


Q2. Which of the following is a major application of Python?

A. Building physical machines only
B. Developing AI and software applications
C. Repairing computer hardware
D. Designing computer chips

Show Answer

Answer: B. Developing AI and software applications

Explanation: Python is widely used for Artificial Intelligence, Machine Learning, web development, automation, scientific computing, and software development.


Q3. Which online platform is recommended in the CBSE handbook for learning programming through games?

A. Minecraft
B. Code Combat
C. PUBG
D. Scratch Jr.

Show Answer

Answer: B. Code Combat

Explanation: Code Combat is a gamified learning platform where students improve programming skills by solving coding challenges while playing games.


Q4. Which Python function is used to display information on the screen?

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

Show Answer

Answer: C. print()

Explanation: The print() function displays text, numbers, variables, or program results on the output screen.


Q5. Which Python function is used to accept input from the user?

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

Show Answer

Answer: C. input()

Explanation: The input() function allows users to enter data while the program is running.


Q6. A variable in Python is:

A. A fixed value that never changes
B. A reserved memory location used to store data
C. A type of loop
D. A Python keyword only

Show Answer

Answer: B. A reserved memory location used to store data

Explanation: Variables store different types of data such as numbers, text, or Boolean values, allowing programs to process information efficiently.


Q7. Which data type is used to store a whole number such as 25?

A. Float
B. String
C. Integer (int)
D. Boolean

Show Answer

Answer: C. Integer (int)

Explanation: The int data type stores whole numbers without decimal points.


Q8. Which data type stores decimal numbers such as 18.75?

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

Show Answer

Answer: A. Float

Explanation: Floating-point numbers (float) represent values containing decimal points.


Q9. If a variable stores the value "Riya", its data type is:

A. Integer
B. Float
C. String
D. Boolean

Show Answer

Answer: C. String

Explanation: Any sequence of characters enclosed within quotation marks is treated as a string in Python.


Q10. The process of converting one data type into another is called:

A. Variable Declaration
B. Type Conversion
C. Compilation
D. Indexing

Show Answer

Answer: B. Type Conversion

Explanation: Type conversion changes the data type of a value, such as converting a string entered using input() into an integer using int().


Q11. Which operator is used to add two numbers in Python?

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

Show Answer

Answer: C. +

Explanation: The + operator is an arithmetic operator used to perform addition between two numbers.


Q12. Which operator is used for multiplication in Python?

A. x
B. +
C. *
D. ^

Show Answer

Answer: C. *

Explanation: Python uses the asterisk (*) as the multiplication operator.


Q13. Which operator is used to calculate the power of a number in Python?

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

Show Answer

Answer: B. **

Explanation: The exponentiation operator ** raises a number to a specified power. For example, 5**2 gives 25.


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

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

Show Answer

Answer: B. ==

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


Q15. Which operator is used to check whether two values are not equal?

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

Show Answer

Answer: B. !=

Explanation: The != operator returns True when two values are different.


Q16. AND, OR, and NOT are examples of:

A. Arithmetic Operators
B. Assignment Operators
C. Logical Operators
D. Comparison Operators

Show Answer

Answer: C. Logical Operators

Explanation: Logical operators combine or modify conditional expressions and return Boolean values (True or False).


Q17. If a = 10 and b = 20, what will be the value of a + b?

A. 1020
B. 10
C. 30
D. 200

Show Answer

Answer: C. 30

Explanation: Adding the values stored in variables a and b gives 10 + 20 = 30.


Q18. Which statement is used to execute a block of code only when a condition is true?

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

Show Answer

Answer: B. if

Explanation: The if statement checks a condition and executes the associated block only when the condition evaluates to True.


Q19. Which statement is executed when the condition in an if statement is false?

A. then
B. else
C. stop
D. input

Show Answer

Answer: B. else

Explanation: The else block executes when the condition in the if statement is False.


Q20. Which condition correctly checks whether a person is eligible to vote?

A. if age == 18:
B. if age > 21:
C. if age >= 18:
D. if age < 18:

Show Answer

Answer: C. if age >= 18:

Explanation: A person is generally eligible to vote if their age is 18 years or above. Therefore, the condition age >= 18 is correct.


Q21. Which condition correctly identifies a positive number?

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

Show Answer

Answer: C. num > 0

Explanation: A positive number is always greater than zero. Therefore, the condition num > 0 correctly identifies a positive number.


Q22. Which conditional structure is commonly used to check multiple conditions in Python?

A. if...else only
B. if...elif...else
C. for...while
D. input...print

Show Answer

Answer: B. if...elif...else

Explanation: The if...elif...else structure allows a program to evaluate multiple conditions one after another until one of them becomes true.


Q23. Which loop is generally used to repeat a block of code a specific number of times?

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

Show Answer

Answer: C. for

Explanation: A for loop is best suited when the number of iterations is already known.


Q24. Which loop continues executing as long as a specified condition remains true?

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

Show Answer

Answer: C. while

Explanation: A while loop repeatedly executes a block of code until its condition becomes false.


Q25. Which loop is most suitable for printing the first 10 natural numbers?

A. if statement
B. for loop
C. input() function
D. print() function

Show Answer

Answer: B. for loop

Explanation: Since the number of repetitions is known (10), a for loop is the most appropriate choice.


Q26. Which of the following can be used to execute a loop exactly 10 times?

A. for i in range(1, 11):
B. while loop with a proper counter
C. Both A and B
D. Neither A nor B

Show Answer

Answer: C. Both A and B

Explanation: Both for and while loops can perform the same task if written correctly.


Q27. To calculate the sum of all elements stored in a list, you generally use:

A. input()
B. A loop
C. print() only
D. A string

Show Answer

Answer: B. A loop

Explanation: A loop visits each element of the list one by one and adds it to a running total.


Q28. Which brackets are used to create a list in Python?

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

Show Answer

Answer: C. [ ]

Explanation: Python lists are created using square brackets [ ].


Q29. What is the index of the first element in a Python list?

A. 1
B. 0
C. -1
D. 10

Show Answer

Answer: B. 0

Explanation: Python follows zero-based indexing, so the first element always has index 0.


Q30. Which function returns the total number of elements in a Python list?

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

Show Answer

Answer: D. len()

Explanation: The len() function returns the number of items present in a list.


Q31. Consider the following list:

names = ["Arjun", "Sonakshi", "Vikram"]

What is the value of names[1]?

A. Arjun
B. Sonakshi
C. Vikram
D. Error

Show Answer

Answer: B. Sonakshi

Explanation: Python uses zero-based indexing. Therefore, index 0 is "Arjun", index 1 is "Sonakshi", and index 2 is "Vikram".


Q32. In Python lists, what does the index -1 represent?

A. The first element
B. The second element
C. The last element
D. An invalid index

Show Answer

Answer: C. The last element

Explanation: Negative indexing starts from the end of the list. The index -1 always refers to the last element.


Q33. Which method is used to add a new element to the end of a Python list?

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

Show Answer

Answer: B. append()

Explanation: The append() method adds a single new element to the end of an existing list.


Q34. Which method is commonly used to remove a specific element from a Python list?

A. delete()
B. erase()
C. remove()
D. stop()

Show Answer

Answer: C. remove()

Explanation: The remove() method deletes the first occurrence of the specified value from a list.


Q35. Which method is used to add all elements of one list to another list?

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

Show Answer

Answer: B. extend()

Explanation: The extend() method adds every element from one list to the end of another list.


Q36. Which method arranges the elements of a list in ascending order?

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

Show Answer

Answer: C. sort()

Explanation: The sort() method organizes the elements of a list in ascending order by default.


Q37. Which Python expression correctly calculates the area of a rectangle?

A. area = length + width
B. area = length * width
C. area = length / width
D. area = length ** width

Show Answer

Answer: B. area = length * width

Explanation: The area of a rectangle is calculated by multiplying its length by its width.


Q38. To convert kilometers into meters, you should:

A. Divide by 100
B. Multiply by 10
C. Multiply by 1000
D. Divide by 1000

Show Answer

Answer: C. Multiply by 1000

Explanation: One kilometer is equal to 1000 meters. Therefore, multiply the number of kilometers by 1000.


Q39. Which expression correctly calculates the average of three subjects having marks s1, s2, and s3?

A. (s1 + s2 + s3) * 3
B. (s1 + s2 + s3) / 3
C. s1 + s2 + s3
D. s1 + s2 + s3 / 3

Show Answer

Answer: B. (s1 + s2 + s3) / 3

Explanation: The average is calculated by dividing the total of all values by the number of values.


Q40. Which of the following statements correctly prints the word "Hello" followed by the value stored in the variable name?

A. print("Hello" + name)
B. print("Hello", name)
C. Both A and B
D. print("Hello" name)

Show Answer

Answer: C. Both A and B

Explanation: Python allows both string concatenation using + and multiple arguments separated by commas in the print() function.


Q41. Which comparison operator means "Greater than or equal to" in Python?

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

Show Answer

Answer: C. >=

Explanation: The >= operator checks whether the value on the left is greater than or equal to the value on the right.


Q42. What is the output of the Python expression 3 + 5 * 2?

A. 16
B. 13
C. 10
D. 30

Show Answer

Answer: B. 13

Explanation: Python follows the order of operations (BODMAS/PEMDAS). Multiplication is performed first (5 × 2 = 10), then addition (3 + 10 = 13).


Q43. What is the sum of the first 10 natural numbers?

A. 45
B. 50
C. 55
D. 60

Show Answer

Answer: C. 55

Explanation: The sum of the first 10 natural numbers is 1 + 2 + 3 + ... + 10 = 55.


Q44. Which of the following is NOT a practical activity related to Python Lists?

A. Find the length of a list
B. Sort the list
C. Delete an item from the list
D. Format the hard drive

Show Answer

Answer: D. Format the hard drive

Explanation: Python list operations include adding, deleting, sorting, and finding the length of list elements. Formatting a hard drive is unrelated.


Q45. What happens if you try to access an index that does not exist in a Python list?

A. The program prints 0.
B. The program automatically creates a new element.
C. An IndexError occurs.
D. The program ignores the statement.

Show Answer

Answer: C. An IndexError occurs.

Explanation: Accessing an index outside the valid range of a list results in an IndexError.


Q46. According to the CBSE syllabus, the Python Practical File should contain at least:

A. 5 programs
B. 10 programs
C. 15 programs
D. 20 programs

Show Answer

Answer: C. 15 programs

Explanation: The CBSE curriculum recommends maintaining a practical file containing a minimum of 15 Python programs.


Q47. Unit 5: Introduction to Python is included under:

A. Part A – Employability Skills
B. Part B – Subject Specific Skills
C. Part C – Project Work
D. Part D – Internship

Show Answer

Answer: B. Part B – Subject Specific Skills

Explanation: Python programming is a Subject Specific Skill in the CBSE Class 9 Artificial Intelligence curriculum.


Q48. Which of the following practical programs is suggested in the CBSE Python syllabus?

A. Print the first 10 even numbers
B. Install Windows Operating System
C. Assemble a computer
D. Design a motherboard

Show Answer

Answer: A. Print the first 10 even numbers

Explanation: Printing the first 10 even numbers is a common beginner-level programming exercise using loops.


Q49. In the AI Project Cycle, Python is commonly used while developing solutions for which stage?

A. Problem Scoping
B. Data Acquisition
C. Deployment
D. Feedback Collection

Show Answer

Answer: C. Deployment

Explanation: Python is widely used to develop AI applications that are ultimately deployed for real-world use.


Q50. Breaking a large programming problem into smaller, manageable parts is known as:

A. Compilation
B. Modularity
C. Iteration
D. Debugging

Show Answer

Answer: B. Modularity

Explanation: Modularity divides a complex problem into smaller parts, making programs easier to write, understand, test, and maintain.


❓ Quick Revision

  • Python is an easy-to-learn, high-level programming language widely used in Artificial Intelligence.
  • print() displays output, while input() accepts input from the user.
  • Common data types include int, float, string, and list.
  • Python supports arithmetic, comparison, logical, and assignment operators.
  • if, elif, and else are used for decision-making.
  • for and while loops are used to repeat statements.
  • Lists are created using square brackets [ ] and support methods like append(), remove(), extend(), sort(), and len().
  • The CBSE Practical File should contain at least 15 Python programs.

? Exam Tip

For the CBSE Class 9 AI examination, focus on Python basics, print() and input() functions, variables, data types, operators, conditional statements, loops, and list operations. Practice writing simple programs such as calculating averages, checking voting eligibility, finding positive numbers, printing even numbers, and performing list operations. These topics are commonly tested in MCQs, competency-based questions, practical examinations, and programming exercises.