What are Conditional Statements?

Conditional statements allow us to make decisions in a program based on certain conditions.

If the condition is true, a certain block of code runs; otherwise, it may skip or execute something else.

When we write a program, sometimes we want to execute a block of code only if a certain condition is true. For example, giving "A" grade only if marks are above 90.

Types of Conditional Statements in Python:

S.No Type Description
1. if Executes a block if the condition is True
2. if-else Chooses between two blocks (True or False)
3. if-elif-else Chooses between multiple conditions

Real-Life Example:

If it rains, take an umbrella.
Else, wear sunglasses.

This is how conditional logic works in programming too.

General Syntax:

if condition:
    # code block
elif another_condition:
    # code block
else:
    # code block

Welcome to ShikshaSanchar!

ShikshaSanchar is a simple and helpful learning platform made for students who feel stressed by exams, assignments, or confusing topics. Here, you can study with clarity and confidence.

Here, learning is made simple. Notes are written in easy English, filled with clear theory, code examples, outputs, and real-life explanations — designed especially for students like you who want to understand, not just memorize.

Whether you’re from school, college, or someone learning out of curiosity — this site is for you. We’re here to help you in your exams, daily studies, and even to build a strong base for your future.

Each note on this platform is carefully prepared to suit all levels — beginner to advanced. You’ll find topics explained step by step, just like a good teacher would do in class. And the best part? You can study at your pace, anytime, anywhere.

Happy Learning! – Team ShikshaSanchar