1. What is the output of print(9//2)?
A) 4.25
B) 4.5
C) 4
D) None of the above
Correct Answer: 4
Explanation : The output of print(9//2) is 4.
2. Which of the following precedence order is correct in Python?
A) Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
B) Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
C) Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
D) Exponential, Parentheses, Multiplication, Division, Addition, Subtraction
Correct Answer: Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
Explanation : Parentheses, Exponential, Multiplication, Division, Addition and Subtraction precedence order is correct in Python
3. Assert statement is used for error checking.
A) True
B) False
Correct Answer: True
Explanation : Assert statement is used for error checking. - True
4. Which of the following is a truncation division operator in Python?
A) //
B) /
C) %
D) *
Correct Answer: //
5. Which arithmetic operators cannot be used with strings in Python?
A) +
B) /
C) -
D) *
Correct Answer: -
6. Compound statement contains therapy statements.
A) True
B) False
Correct Answer: True
Explanation : Compound statement contains therapy statements. - True
7. In Python programming, is pass a NULL statement?
A) True
B) False
Correct Answer: True
Explanation : In Python programming, is pass a NULL statement - True
8. What will be the output of 2**(3**2), (2**3)**2 ,2**3**2.
A) 64, 512, 64
B) 64, 64, 64
C) 512, 512, 512
D) 512, 64, 512
Correct Answer: 512, 64, 512
Explanation : 512, 64, 512 output of 2**(3**2), (2**3)**2 ,2**3**2.
9. x, y, z = "Orange", "Banana", "Cherry" Is this statement false.
A) True
B) False
Correct Answer: False
10. You can use the + operator to join or concatenate two strings.
A) True
B) False
Correct Answer: True
Explanation : You can use the + operator to join or concatenate two strings. - True
11. How are operators with the same precedence evaluated?
A) Left to Right
B) Right to Left
C) Can’t say
D) None of the mentioned
Correct Answer: Left to Right
Explanation : Operators with same precedence are evaluated Left to Right.
12. In the passage of text, the individual words and punctuation marks are known as?
A) Constants
B) Tokens
C) Operators
D) Keywords
Correct Answer: Tokens
Explanation : In the passage of text, the individual words and punctuation marks are known as -Tokens
13. Pass statement allows the program to pass through a piece of code without performing any action.
A) True
B) False
Correct Answer: True
Explanation : Pass statement allows the program to pass through a piece of code without performing any action. -True
14. The operator used to join two strings is + ?
A) True
B) False
Correct Answer: True
Explanation : The operator used to join two strings is + True
15. The * operator does not repeat a list for a given number of items.
A) True
B) False
Correct Answer: False