Header Ads

Responsive Ads Here

If-elif-else Statement in Python

 If-elif-else Statement in Python



num = 15

if num == 5:
    print("Number is 5.")
elif num == 10: # Note: elif consists of else and if
    print("Number is 10.")
else:
    print("Condition is false!!!")

Powered by Blogger.