if elif statement

703
Python if elif else Statement

if elif statement, control statements के चार type में से तीसरी होता है। if elif statement का use multiple conditions पर अलग-अलग statement को लगाने के लिये use किया जाता है। और इसके बारे में समझें, elif statement यानी control statements को दिया गया expression true होता है तो if वाला statement execute होता है और अगर expression elif वाला true होता है तब elif वाला statement execute होता है और अगर expression false होता है तब else वाला statement execute होता है।

        Syntax:
               if expression :
                   statement(s)
               elif expression :
                   statement(s)
               else:
                   statement(s)
        Example:
               a = 5
               b = 5
               if (a==b):
                    print("a and b are equal")
               elif(a<b):
                    print("b Greater")
               else:
                    print("a Greater")
        Output:
               a and b are equal

if-elif statement को पढ़ने के बाद अन्य प्रकार के control statements नीचे दिये हुये हैं।

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

if elif statement if elif statement in hindi if elif statement in python if elif statement in python in hindi if statement in python if statement in python in hindi if statement in hindi if statement if else statement if else statement in hindi if else statement in python if else statement in python in hindi if elif syntax in python if elif syntax in python in hindi if elif else statement in python if elif else statement in python in hindi if elif statement python example if elif statement python example in hindi python if elif statement python if elif statement in hindi if elif statement in python 3 if elif statement in python 3 in hindi if elif statement coding.booksinhindi.com if elif statement estudyhelper