0
1.1kviews
Explain Conditional statement structure in python with example.
1 Answer
1
54views

Conditional Statements

Conditional expressions and conditional constructs are features ofa programming language, which perform different computations or actions depending on whethera programmer-specified Boolean condition evaluates to true or false.

If Statements

Syntax:

if expression:
 statement(s)

Example:

x=15

if x>0:

 print('Positive Value..")

If-else Statements

Syntax:

if expression:
     statement(s)
else:
     statement(s)

Example: …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.