Back-End Programming Exam  >  Back-End Programming Videos  >  Python Tutorial in Hindi  >  Python tutorial in Hindi 19 : If ; If else statement

Python tutorial in Hindi 19 : If ; If else statement Video Lecture | Python Tutorial in Hindi - Back-End Programming

FAQs on Python tutorial in Hindi 19 : If ; If else statement Video Lecture - Python Tutorial in Hindi - Back-End Programming

1. If-else स्टेटमेंट क्या होता है?
उत्तर: If-else स्टेटमेंट प्रोग्रामिंग में एक शर्ताधारी ब्लॉक होता है जो किसी शर्त की सत्यता को परीक्षण करता है और उसके अनुसार कोड ब्लॉक को चलाता है। यदि शर्त सत्य होती है, तो if ब्लॉक चलाया जाता है, और यदि शर्त गलत होती है, तो else ब्लॉक चलाया जाता है।
2. If स्टेटमेंट का उपयोग क्यों किया जाता है?
उत्तर: If स्टेटमेंट का उपयोग एक शर्ताधारी ब्लॉक को चलाने के लिए किया जाता है। इसके माध्यम से हम किसी शर्त की सत्यता को परीक्षण करते हैं और उसके अनुसार कोड ब्लॉक को चलाते हैं। यदि शर्त सत्य होती है, तो if ब्लॉक चलाया जाता है और यदि शर्त गलत होती है, तो if ब्लॉक को छोड़कर else ब्लॉक चलाया जाता है।
3. If-else स्टेटमेंट की संरचना क्या होती है?
उत्तर: If-else स्टेटमेंट की संरचना निम्नलिखित होती है: if शर्त: # यदि शर्त सत्य होती है, तो यहां कोड चलाया जाएगा else: # यदि शर्त गलत होती है, तो यहां कोड चलाया जाएगा
4. क्या हम एक if-else स्टेटमेंट के भीतर एक और if-else स्टेटमेंट लिख सकते हैं?
उत्तर: हाँ, हम एक if-else स्टेटमेंट के भीतर एक और if-else स्टेटमेंट लिख सकते हैं। इसे नेस्टेड if-else स्टेटमेंट कहा जाता है। इसका उपयोग हम बार-बार शर्ताधारी ब्लॉक को चलाने के लिए कर सकते हैं।
5. if-else स्टेटमेंट और if स्टेटमेंट में क्या अंतर है?
उत्तर: if-else स्टेटमेंट में हम एक शर्त की सत्यता को परीक्षण करते हैं और उसके अनुसार दोनों ब्लॉकों को चलाते हैं - if ब्लॉक यदि शर्त सत्य होती है और else ब्लॉक यदि शर्त गलत होती है। वहीं, if स्टेटमेंट में हम केवल एक शर्त की सत्यता को परीक्षण करते हैं और यदि शर्त सत्य होती है, तो उसके बाद का कोड ब्लॉक चलाते हैं। यदि शर्त गलत होती है, तो उसके बाद का कोड ब्लॉक स्किप कर दिया जाता है।
Related Searches

Summary

,

MCQs

,

Free

,

pdf

,

practice quizzes

,

video lectures

,

Python tutorial in Hindi 19 : If ; If else statement Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

past year papers

,

ppt

,

Extra Questions

,

Python tutorial in Hindi 19 : If ; If else statement Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

Important questions

,

Objective type Questions

,

Semester Notes

,

Python tutorial in Hindi 19 : If ; If else statement Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

shortcuts and tricks

,

Previous Year Questions with Solutions

,

study material

,

Sample Paper

,

mock tests for examination

,

Viva Questions

,

Exam

;