nested if statement

0
16

Nested if statement में जब एक if block के अन्दर दूसरा if block लगाया जाता है उसे ही nested if कहते हैं। और अच्छे से समझें, nested if statement में हम if के अन्दर if condition check करते हैं means पहले हम if condition check करेंगे अगर वो true है तो next if पे जायेगा फिर अगले वाले if को check करेगा। एक उदाहरण से समझें जैसे हम अपनी gmail पर Login कराते हैं तो वहाँ पर पहले वो हमसे हमारी ID पूछता है अगर ID ठीक है तब ही वो हमको password वाले option को show करता है।

          Syntax:
                  if expression :
                          if expression :
	                         statement(s)
                          else expression :
                                  statement(s)
                  else:
                         statement(s)
         Example:         
                  win = 30
                  user = int(input("Enter The Number between 1 to 50: "))
                  if user == win:
                        print("You Are Win")

                  else:     # nested if else
                       if user<win:
                             print("Too Low")
                       else:
                             print("Too High")
          Output:
                   Enter The Number between 1 to 50: 30
                   You Are Win

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

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

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

 

nested if statement nested if statement in hindi nested if statement in python nested if statement in python in hindi nested if statement estudyhelper if statement if statement in hindi if statement in python in hindi if statement in python if else statement if else statement in hindi if else statement in python if else statement in python in hindi if elif statement in python if elif statement in python in hindi if elif statement if elif statement in hindi nested if statement in python 3 nested if statement in python 3 in hindi nested if syntax in python nested if syntax in python in hindi multiple if statement in python in hindi multiple if statement in python nested if statement example in python nested if statement example in python in hindi explain nested if statement in python explain nested if statement in python in hindi nested if statement program in python nested if statement program in python in hindi what is a nested if statement in python what is a nested if statement in python in hindi how to write a nested if statement in python how to write a nested if statement in python in hindi how to do a nested if statement in python how to do a nested if statement in python in hindi example of nested if else statement in python example of nested if else statement in python in hindi nested if statement python example nested if statement python example in hindi nested if else syntax in python nested if else syntax in python in hindi

LEAVE A REPLY

Please enter your comment!
Please enter your name here