Python support if elif else statements to test additional conditions apart from the initial test expression the if elif else construct works in the same way as a usual if else statement if elif else construct is also known as nested if construct
Q.) program to test whether a number entered by the user is negative positive or equals to zero.
n=int(input("Enter first Number"))
if (n==0):
print("number is equal to zero")
elif(n>0):
print("number is positive")
else:
print("the number is negative")
Output
enter a number:0
number is equal to zero