Over 10 years we helping companies reach their financial and branding goals. Onum is a values-driven SEO agency dedicated.

CONTACTS
HTML & CSS

Day 17 – Night Session: Python – Conditional Statements – ECET 2026 CSE (Programming in Python)

In ECET 2026, the Python programming section is a scoring area for CSE diploma students. One of the most frequently tested concepts is Conditional Statements—a core part of decision-making in code. Whether you’re writing a small script or a large application, knowing when and how to use if, elif, and else can make or break your logic. Let’s revise the topic with clear notes, followed by exam-focused MCQs.


📘 Concept Notes – Python Conditional Statements

🖥️ What Are Conditional Statements?

  • Conditional statements allow your program to make decisions based on certain conditions.
  • They control the flow of execution depending on whether a condition is True or False.

📜 Types of Conditional Statements in Python

  1. if Statement
    • Executes a block of code only if the condition is true.
x = 10
if x > 5:
    print("x is greater than 5")

if...else Statement

  • Runs one block if the condition is true, otherwise runs another block.
if x % 2 == 0:
    print("Even")
else:
    print("Odd")

3. if...elif...else Statement

  • Used for multiple conditions.
marks = 75
if marks >= 90:
    print("Grade A")
elif marks >= 75:
    print("Grade B")
else:
    print("Grade C")

4. Nested if Statements

  • if inside another if.
if x > 0:
    if x % 2 == 0:
        print("Positive Even")

Key Points for ECET:

  • Indentation is mandatory in Python (usually 4 spaces).
  • Conditions use comparison operators (>, <, ==, !=, >=, <=).
  • Logical operators (and, or, not) combine conditions.
  • The elif keyword avoids deep nesting.

🔟 10 Most Expected MCQs – ECET 2026 [Python Conditional Statements]

Q1. Which keyword is used for multiple conditions in Python?
A) elseif
B) elif
C) else if
D) endif

Q2. In Python, if x == 10: means:
A) Assign 10 to x
B) Compare x with 10
C) Multiply x by 10
D) None of these

Q3. What will be the output of:

x = 5
if x > 2:
    print("Yes")

A) Yes
B) No
C) Error
D) None

Q4. Which operator checks inequality in Python?
A) <>
B) !=
C) ~=
D) not=

Q5. What is the output of:

x = 3
if x > 5:
    print("A")
else:
    print("B")

A) A
B) B
C) Error
D) None

Q6. Which of these is invalid in Python?
A) if (x > 5):
B) if x > 5:
C) if x > 5 then:
D) if x > 5 and y < 10:

Q7. Which statement is used when none of the if or elif conditions are true?
A) last
B) final
C) else
D) end

Q8. What will be the output of:

num = 0
if num:
    print("True")
else:
    print("False")

A) True
B) False
C) Error
D) None

Q9. Indentation in Python is:
A) Optional
B) Mandatory
C) Only for functions
D) Only for classes

Q10. Which logical operator returns True only if both conditions are True?
A) or
B) and
C) not
D) xor


Answer Key Table

Q.NoAnswer
Q1B
Q2B
Q3A
Q4B
Q5B
Q6C
Q7C
Q8B
Q9B
Q10B

🧠 Explanations of All Answers

  • Q1 → B: Python uses elif for multiple conditions.
  • Q2 → B: == compares two values for equality.
  • Q3 → A: Condition is true, so “Yes” is printed.
  • Q4 → B: != checks if two values are not equal.
  • Q5 → B: Condition false, so else part executes.
  • Q6 → C: Python does not use then keyword.
  • Q7 → C: else executes when all previous conditions fail.
  • Q8 → B: 0 is treated as False in Python.
  • Q9 → B: Indentation is mandatory to define code blocks.
  • Q10 → B: and returns True only if both sides are True.

🎯 Why This Practice Matters for ECET 2026

Python coding questions are direct and predictable in ECET. Conditional statement MCQs are easy to score and help boost programming marks. With a strong grasp of if, elif, and else, you can also answer code-based output questions quickly in the exam.


📲 Join Our ECET Prep Community on Telegram

Get daily Python coding MCQs, output-based questions, and explanations.
👉 Join now: @LearnNewThingsHub

Leave a comment

Your email address will not be published. Required fields are marked *