Introduction to Python Class 9 AI MCQ Online Test

Students find these Class 9 AI MCQ Introduction to Python Class 9 MCQ Online Test with Answers helpful for self-assessment and preparation.

Class 9 AI Introduction to Python MCQ

MCQ on Introduction to Python Class 9

Class 9 Introduction to Python MCQ – Introduction to Python MCQ Class 9

Multiple Choice Questions

Question 1.
Which of the following is not a feature of Python?
(a) Free and open source
(b) Low level language
(c) Object-oriented language
(d) Easy to learn and use
Answer:
(b) Low level language

Question 2.
Which of the following is the reason for using Python in Artificial Intelligence?
(a) Platform independence
(b) Inbuilt libraries
(c) Ample of tools for data analysis
(d) All of the above
Answer:
(d) All of the above

Question 3.
Which of the following is not a use of Python?
(a) Web and internet application development
(b) Game development
(c) Scientific and numeric calculation
(d) Mobile app development
Answer:
(d) Mobile app development

Question 4.
In how many ways you can work in Python?
(a) Python IDLE-Shell mode
(b) Script mode
(c) Online Jupiter
(d) Python.org
Answer:
(d) Python.org

Question 5.
Which of the following is there in Python character set?
(a) Digits (o-9)
(b) Lower case or Upper case letters
(d) White spaces
(d) All of the above
Answer:
(d) All of the above

Question 6.
Which of the following symbol is not used as a Python comment?
(a) ” “(Double inverted comma)
(b) “‘ (Triple quotes)
(c) #
(d) – (Hyphen as separate line)
Answer:
(a) ” “(Double inverted comma)

Question 7.
Which of the following is not a data type?
(a) None
(b) String
(c) Integer
(d) Decimal
Answer:
(d) Decimal

Question 8.
Which of the following is not a Python keyword?
(a) elif
(b) yield
(c) raise
(d) true
Answer:
(d) true

Question 9.
Which of the following is a valid identifier?
(a) Break
(b) Class & 9
(c) in
(d) num 1
Answer:
(a) Break

Question 10.
Which of the following is not considered as a Python token?
(a) Keywords
(b) Identifiers
(c) Character set
(d) Variables
Answer:
(c) Character set

Question 11.
Which of the following is not a statement in Python?
(a) ab = 10
(b) a-b = 10
(c) c = a + b
(d) a / b8
Answer:
(d) a / b8

Question 12.
Which of the following is incorrect statement?
(a) x = 8, y = 12.9, z = “Ram”
(b) x, y, z = 23, 45.2, “Sita”
(c) x = y = z = 19
(d) x = 8 ; y = 12.9 ; z = “Ram”
Answer:
(a) x = 8, y = 12.9, z = “Ram”

Question 13.
Which of the following is not a Python punctuator?
(a) ;
(b) @
(c) $
(d) 0
Answer:
(d) 0

Question 14.
Which of the following is not a Python relational operator?
(a) ==
(b) !=
(c) >
(d) +
Answer:
(d) +

Question 15.
Which of the following is an exponential operator?
(a) +
(b) –
(c) %
(d) **
Answer:
(d) **

Question 16.
Which of the following is not a Python operator type?
(a) Arithmetic
(b) Logical
(c) Relational
(d) String Operator
Answer:
(d) String Operator

Question 17.
Which of the following is not a valid expression in Python?
(a) p** = 2
(b) p + = 10
(c) p = + 15
(d) b // = a
Answer:
(c) p = + 15

Question 18.
Which of the following is an example of logical operator?
(a) p = 2 + 4
(b) 12 > 3 or 6 < 7
(c) z! = 2
(d) a = 32
Answer:
(b)

Question 19.
What will be the output of the following:
List = [‘C ‘, ‘L’, ‘A’, ‘S’, ‘S’, 9]
Print (List(1))
(a) C
(b) L
(c) A
(d) 9
Answer:
(b) L

Question 20.
Which of the following is not a feature of a list?
(a) Immutable data type
(b) Order sequence of a value
(c) Elements of a separated by commas
(d) Each element can be of different data type
Answer:
(a) Immutable data type

Assertion-Reasoning Based Questions

Study the two statements labeled as assertion (a) and reason (r). Point out if:
(a) Both, a and r, are true and r is the correct explanation of a
(b) Both, a and r, are true but r is not the correct explanation of a
(c) If a is true but r is false
(d) If a is false but r is true

Question 1.
Assertion (A) : You can interact with python in two different modes.
Reason (R) : In python ideally interactive and script mode are there two work with.
Answer:
(a) Both, a and r, are true and r is the correct explanation of a

Question 2.
Assertion (A) : Python is a high level and general purpose programming languages. Reason (R) : Python uses an interpreter.
Answer:
(b) Both, a and r, are true but r is not the correct explanation of a

Question 3.
Assertion (A) : Python has vast built in library.
Reason (R) : Python is procedure oriented language.
Answer:
(c) If a is true but r is false

Question 4.
Assertion (A) : In python there are 33 keywords.
Reason (R): Keywords are the reserved words in python for special purposes.
Answer:
(a) Both, a and r, are true and r is the correct explanation of a

Question 5.
Assertion (A) : In python every statement is written on a new line.
Reason (R): To extent a statement over multiple lines use continuation character (/).
Answer:
(b) Both, a and r, are true but r is not the correct explanation of a

Question 6.
Assertion (A) : None is a special data type.
Reason (R): None means null or nothing.
Answer:
(a) Both, a and r, are true and r is the correct explanation of a

Question 7.
Assertion (A) : In python only arithmetic operations can be performed.
Reason (R) : In python you can perform mathematical, logical and relational operations and values.
Answer:
(d) If a is false but r is true

Question 8.
Assertion (A) : Converting value of one data type to another is called type casting.
Reason (R) : Through type casting any data value can be changed into another.
Answer:
(a) Both, a and r, are true and r is the correct explanation of a

Question 9.
Assertion (A) : Punctuators are special symbol use in python to organise statement and expression.
Reason (R) : Most commonly used punctuators is hash tag (#).
Answer:
(a) Both, a and r, are true and r is the correct explanation of a

Question 10.
Assertion (A) : Print (2^**3) will result to 9.
Reason (R) : Here the second number raised to the power of first number.
Answer:
(d) If a is false but r is true

error: Content is protected !!