0% found this document useful (0 votes)
12 views4 pages

? Chapter 6 Notes

Chapter 6 covers control statements in Python, focusing on operators, conditional statements, and their evaluation. It includes fill-in-the-blanks, multiple choice questions, one-word answers, definitions, and application-based questions to reinforce understanding. Key concepts include operator precedence, logical operators, and the importance of indentation in code structure.

Uploaded by

samar1976
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

? Chapter 6 Notes

Chapter 6 covers control statements in Python, focusing on operators, conditional statements, and their evaluation. It includes fill-in-the-blanks, multiple choice questions, one-word answers, definitions, and application-based questions to reinforce understanding. Key concepts include operator precedence, logical operators, and the importance of indentation in code structure.

Uploaded by

samar1976
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

📘 Chapter 6 – Control Statements in Python

Section A: Fill in the Blanks (20 Qs)


1. The order in which the operators are evaluated is called Precedence of operators.
2. The + operator is used to concatenate two strings in Python.
3. The operator used to assign a value to a variable is = (Assignment operator).
4. Relational operators are used to compare two or more expressions.
5. The if statement is used when only one condition needs to be evaluated.
6. The if…else statement is used when either of the two different actions is performed.
7. The if…elif…else statement is used when multiple conditions are checked sequentially.
8. Logical operators are used to combine results of two or more relational expressions.
9. In Python, the multiplication operator is *.
10. The operator that returns the remainder is called the Modulo operator (%).
11. The operator that checks equality is ==.
12. The operator used for floor division is //.
13. The operator for exponentiation is **.
14. The operator that checks inequality is !=.
15. The symbols like +, -, *, / are examples of Arithmetic operators.
16. The operator that reverses logical state is not.
17. The output of 10//3 is 3.
18. A condition inside an if statement must evaluate to True or False.
19. Python executes blocks of code using indentation.
20. The operator to check membership in a collection is in.

Section B: Multiple Choice Questions (MCQs) (20 Qs)


1. Which of the following is the assignment operator in Python?
(a) == (b) = (c) != (d) =>
Answer: (b) =
2. Which operator is used for exponentiation in Python?
(a) ^ (b) ** (c) ^^ (d) exp
Answer: (b) **
3. Which of the following is a relational operator?
(a) + (b) * (c) >= (d) and
Answer: (c) >=
4. Which logical operator returns True if both conditions are True?
(a) or (b) not (c) and (d) xor
Answer: (c) and
5. The operator used to check equality between two values is:
(a) = (b) == (c) != (d) <>
Answer: (b) ==
6. Which of these is NOT an arithmetic operator?
(a) + (b) - (c) * (d) and
Answer: (d) and
7. The precedence of operators decides:
(a) Memory usage (b) Order of evaluation (c) Data type conversion (d) Variable scope
Answer: (b) Order of evaluation
8. Which control structure is used to perform multiple tests on a condition?
(a) if (b) if…else (c) if…elif…else (d) switch
Answer: (c) if…elif…else
9. Which operator is used for floor division?
(a) / (b) // (c) % (d) div
Answer: (b) //
10. Which keyword is used to write conditional statements?
(a) elif (b) if (c) else (d) All of these
Answer: (d) All of these
11. What is the output of print(10 % 3)?
(a) 0 (b) 1 (c) 3 (d) 10
Answer: (b) 1
12. Which operator is used for logical OR in Python?
(a) || (b) or (c) + (d) |
Answer: (b) or
13. What is the result of 2 + 3 * 2?
(a) 10 (b) 12 (c) 8 (d) 7
Answer: (d) 8
14. Which operator has the highest precedence?
(a) * (b) ** (c) + (d) %
Answer: (b) **
15. Which statement is true about indentation in Python?
(a) Optional (b) Only in loops (c) Mandatory (d) None of these
Answer: (c) Mandatory
16. Which operator is used for string replication?
(a) + (b) * (c) ^ (d) %
Answer: (b) *
17. What is the output of print("A" + "B")?
(a) A+B (b) AB (c) Error (d) None
Answer: (b) AB
18. Which relational operator checks if two values are not equal?
(a) != (b) =! (c) <>= (d) =/=
Answer: (a) !=
19. Which statement executes only when a condition is True?
(a) if (b) else (c) break (d) for
Answer: (a) if
20. Which logical operator checks at least one condition as True?
(a) not (b) or (c) and (d) xor
Answer: (b) or

Section C: One Word Answers (15 Qs)


1. Operator to raise a number to a power → **
2. Operator for integer division (quotient only) → //
3. Operator used to replicate strings → *
4. Symbols that perform operations on operands → Operators
5. Operator used to check inequality → !=
6. Statement used for decision-making → if
7. Operator for “greater than or equal to” → >=
8. Logical operator for negation → not
9. Operator to join two strings → +
10. Symbol for modulo division → %
11. Operator to check membership → in
12. Operator to check identity → is
13. Smallest unit of decision-making → if
14. Output of "hi"*2 → hihi
15. Keyword to add another condition → elif

Section D: One Line Definitions (15 Qs)


1. Operator – Symbol that performs an operation.
2. Precedence of operators – Order in which operators are evaluated.
3. Concatenation operator – The “+” used to join strings.
4. Replication operator – The “*” used to repeat strings.
5. Assignment operator – The “=” used to assign values.
6. Relational operators – Operators to compare expressions.
7. Logical operators – Operators to combine boolean values.
8. Conditional statement – Executes based on condition.
9. if statement – Executes block when condition is True.
10. if…else – Executes one of two actions.
11. if…elif…else – Handles multiple conditions.
12. Indentation – Space before statements to define blocks.
13. Membership operator – Checks if element is in sequence.
14. Identity operator – Checks if two variables refer to same object.
15. Short-circuit evaluation – Logical operators skipping checks when result is known.

Section E: Critical Thinking / Application-Based Questions


1. Write a Python program to input two numbers and print the greater one using if…else.

a = int(input("Enter first number: "))


b = int(input("Enter second number: "))
if a > b:
print(a)
else:
print(b)

2. Explain with an example how precedence of operators affects expression evaluation.


Expression: 2 + 3 * 4
Multiplication has higher precedence → Result = 14.
3. What will be the output of: print(5 > 3 and 10 < 20)?
Answer: True
4. What is the difference between = and == in Python?
“=” assigns a value; “==” checks equality.
5. Predict output: print("Hi"*3)
Answer: HiHiHi
6. Why is indentation important in Python conditional statements?
Answer: Indentation defines the block of code to execute.
7. How does the if…elif…else structure reduce code complexity?
Answer: It avoids multiple nested if statements by organizing conditions clearly.
8. Give an example of nested if statement.
a = 10
if a > 0:
if a % 2 == 0:
print("Positive Even")

9. Explain short-circuit evaluation in logical operators with an example.


In and, if the first condition is False, the second is not checked.
Example: (5 < 3 and x > 2) → first condition False, second not evaluated.
10. Write a Python program using conditional statements to check if a number is even or odd.

n = int(input("Enter number: "))


if n % 2 == 0:
print("Even")
else:
print("Odd")

Practice all programs given in book

You might also like