Grade 9 Ai QP
Grade 9 Ai QP
General Instructions:
Section-A
This section consists of 30 Questions (1 to 30). Attempt all the questions from this
section.
Choose the best possible option. 1X30=30
1. Python was created by ____________.
a) James Gosling
b) Steve Jobs
c) Guido van Rossum
d) Google
2. What is used to define a block of code (body of loop, function etc.) in Python?
a) Curly braces
b) Parenthesis
c) Indentation
d) Quotation
1
a) Python is an interpreted language.
b) Python is a high level programming language.
c) Python is an object-oriented language.
d) All of the above.
8. What Python built-in function returns the unique number assigned to an object:
a) refnum()
b) id()
c) ref()
d) identity()
2
a) Python
b) 15
c) Blank
d) 15,Python
a) 70
b) 63
c) 152530
d) TypeError: unsupported operand type(s) for +: 'int' and 'str'
a) abb abb
b) abb 2
c) 2
d) Error
16. In order to store values in terms of key and value which core data type is used.
3
a) list
b) tuple
c) class
d) Dictionary
a) <class 'int'>
b) <class 'list'>
c) <class 'tuple'>
d) <class 'dict'>
18. What error occurs when you execute the following Python code snippet?
a) SyntaxError
b) NameError
c) ValueError
d) TypeError
a) list
b) dictionary
c) array
d) Tuple
a) <class 'tuple'>
b) <class 'int'>
c) <class 'complex'>
d) <class 'list'>
4
a) [10, 20, 30, 40]
[10, 20, 30, 40]
b) [10, 20]
[10, 20, 30, 40]
c) [10, 20, 10, 20]
[10, 20, 30, 40]
d) [10, 20]
[30, 40]
5
26. What is the output of the following code: print (9//2)
a) 4
b) 4.5
c) 4.0
d) Error
Section-B
This section consists of 10 Questions (31 to 40). Attempt all questions from this
section.
Long answer 10X5=50
31. Explain the following with an example.
a) Interactive mode
b) Script mode
32. Explain Python character sets with example
33. Explain the following
a) Identifier and it’s rules
b) Keywords and it’s rules
34. Explain the following with an example.
6
a) Implicit conversion
b) Explicit conversion
35. Explain the following with an example.
a) Numeric data types
b) List data type
36. Explain the following with an example.
a) String data type
b) Tuple data type
c) Dictionary data type
37. Explain the following with an example.
a) Boolean data type
b) Dictionary data type
38. Explain the following with an example.
a) Mutable data type
b) Immutable data type
39. Explain the following with an example.
a) Arithmetic operators
b) Relational operators
40. Explain the following with an example.
a) Logical operators
b) Operators precedence