0
1.1kviews
Explain Conditional statement structure in python with example.
1 Answer
written 2.0 years ago by |
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: …