Computer Science, asked by shrutijain9211, 3 months ago

explain briefly if-else statement of Python with syntax and examples​

Answers

Answered by purveshKolhe
2

Answer:

We can use conditional statements in python:

If... Else

Syntax:

If (condition)

... ... ...

else (conditiom)

... ... ...

example:

a = 200

a = 200b = 33

a = 200b = 33if b > a:

a = 200b = 33if b > a: print("b is greater than a")

a = 200b = 33if b > a: print("b is greater than a")else:

a = 200b = 33if b > a: print("b is greater than a")else: print("b is not greater than a")

hope it helps

Similar questions