The following example code demonstrates a Program for Condition Checking in Python.
Basically, here we demonstrate the use of if statement in python. The if keyword is followed by a condition. When the condition is true, the statements following the if are executed. Otherwise, the condition following the subsequent elif keyword is evaluated. When condition is true, that block of statements execute. Otherwise, the statements after the elese keyword execute.
# programmingempire.com
premp = 23.998
if premp > 0:
print(str(premp) + " is Positive number")
elif num == 0:
print(str(premp) + "is Zero")
else:
print(str(premp) + " is Negative number")
Output
Further Reading
Examples of OpenCV Library in Python
A Brief Introduction of Pandas Library in Python