Chapter 3 Brief Overview of Python — Online MCQ Test
INFORMATICS PRACTICES · Grade 11 · CBSE(NCERT)
Practice Chapter 3 Brief Overview of Python with a free chapter-wise online MCQ test.
This chapter covers: Introduces Python programming fundamentals. Covers Python syntax keywords variables data types operators expressions input and output functions conditional statements loops and bas....
AI-generated questions from basic to board-exam level, with instant results and explanations.
Chapter 3 Brief Overview of Python — Important Questions & Answers
Which of the following is a valid Python variable name?
- A. 2score
- B. score_2
- C. score-2
- D. score 2
Answer: B. score_2
A Python variable name can contain letters, digits, and underscores, but it cannot start with a digit or contain spaces/hyphens.
A Python variable name can contain letters, digits, and underscores, but it cannot start with a digit or contain spaces/hyphens.
Which of the following is a keyword in Python?
- A. print
- B. value
- C. if
- D. total
Answer: C. if
"if" is a reserved keyword used for conditional execution. The other options are identifiers or built-in function names, not keywords.
"if" is a reserved keyword used for conditional execution. The other options are identifiers or built-in function names, not keywords.
Which of the following is the correct way to assign 15 to variable x?
- A. 15 = x
- B. x == 15
- C. x = 15
- D. x := 15
Answer: C. x = 15
The assignment operator = is used to store a value in a variable.
The assignment operator = is used to store a value in a variable.
Which of the following is the correct order of operators precedence in: 4 + 6 * 2 ** 3 ?
- A. Addition, multiplication, exponentiation
- B. Exponentiation, multiplication, addition
- C. Multiplication, exponentiation, addition
- D. Addition, exponentiation, multiplication
Answer: B. Exponentiation, multiplication, addition
Python evaluates exponentiation first, then multiplication, and finally addition.
Python evaluates exponentiation first, then multiplication, and finally addition.
Which of the following expressions will cause an error in Python?
- A. "10" + "20"
- B. 10 + 20
- C. "10" + 20
- D. 10 * 2
Answer: C. "10" + 20
Python cannot directly add a string and an integer. Both operands must be of compatible types.
Python cannot directly add a string and an integer. Both operands must be of compatible types.