Skip to main content

Flow of execution of a python program पाइथन प्रोग्राम के निष्पादन का प्रवाह

Flow of execution represents a general outline of Python program execution. The specific flow can vary based on the program's structure, control flow statements (if, else, for, while), and function calls.
निष्पादन का प्रवाह पायथन प्रोग्राम निष्पादन की एक सामान्य रूपरेखा का प्रतिनिधित्व करता है। विशिष्ट प्रवाह प्रोग्राम की संरचना, नियंत्रण प्रवाह विवरण (यदि, अन्यथा, के लिए, जबकि), और फ़ंक्शन कॉल के आधार पर भिन्न हो सकता है।

1.) Start: The program begins execution.
1.) प्रारंभ: प्रोग्राम का निष्पादन प्रारंभ होता है।

2.) Import Modules: If necessary, the program imports external modules or libraries.
2.) मॉड्यूल आयात करें: यदि आवश्यक हो, तो प्रोग्राम बाहरी मॉड्यूल या लाइब्रेरी आयात करता है।

3.) Define Functions: Any functions used in the program are defined.
3.) फंक्शन्स को परिभाषित करें: प्रोग्राम में उपयोग किए गए किसी भी फंक्शन को परिभाषित किया जाता है।

4.) Main Program: The main body of the program starts.
4.) मुख्य प्रोग्राम: प्रोग्राम का मुख्य भाग प्रारंभ होता है।

5.) Initialization: Variables and data structures are initialized.
5.) इनिशियलाइज़ेशन: वेरिएबल्स और डेटा स्ट्रक्चर्स को इनिशियलाइज़ किया जाता है।

6.) Statements: The program executes statements sequentially.
6.) स्टेटमेंट्स: प्रोग्राम स्टेटमेंट्स को क्रमिक रूप से निष्पादित करता है। 

7.) Control Flow Statements: If-else, for, or while statements are encountered, the flow of execution is altered based on conditions.
7.) नियंत्रण प्रवाह कथन: यदि अन्यथा, के लिए, या जब कथन सामने आते हैं, तो शर्तों के आधार पर निष्पादन का प्रवाह बदल दिया जाता है। 

8.) Function Calls: Functions are called if needed, and their execution is handled.
8.) फंक्शन कॉल्स: जरूरत पड़ने पर फंक्शन्स को कॉल किया जाता है और उनके निष्पादन को संभाला जाता है।

9.) Output: Results are printed or displayed.
9.) आउटपुट: परिणाम मुद्रित या प्रदर्शित किए जाते हैं।

10.) End: The program terminates.
10.) समाप्ति: कार्यक्रम समाप्त होता है।

This is a simplified representation, and the actual flow can be more complex depending on the specific program logic. It can be extended to include Error handling like try-except blocks, Recursion, OOP mechanisms etc.
यह एक सरलीकृत प्रतिनिधित्व है, और विशिष्ट प्रोग्राम तर्क के आधार पर वास्तविक प्रवाह अधिक जटिल हो सकता है। इसे त्रुटि प्रबंधन जैसे ट्राई-एक्सेप्ट ब्लॉक, रिकर्सन, ऊप तंत्र आदि को शामिल करने के लिए बढ़ाया जा सकता है।
Example :-
#add two numbers

def add(a, b):
return a + b
result = add(5, 10)
print(result)

Comments

Popular posts from this blog

Python IDLE पायथन आईडीएलई (इंटीग्रेटेड डेवलपमेंट एंड लर्निंग एनवायरनमेंट)

IDLE (Integrated Development and Learning Environment) is a graphical user interface (GUI) for the Python programming language. It includes the Python standard library and provides a convenient environment for writing, running, and debugging Python code. IDLE (इंटीग्रेटेड डेवलपमेंट एंड लर्निंग एनवायरनमेंट) पायथन प्रोग्रामिंग भाषा के लिए एक ग्राफिकल यूजर इंटरफेस (GUI) है। इसमें पायथन मानक लाइब्रेरी शामिल है और पायथन कोड लिखने, चलाने और डीबग करने के लिए एक सुविधाजनक वातावरण प्रदान करता है।  Key features of IDLE are:- आईडीएलई की मुख्य विशेषताएं हैं:-  1. Interactive Shell:- IDLE provides an interactive Python shell, allowing you to execute Python commands and see the immediate results. 1. इंटरएक्टिव शेल:- आईडीएलई एक इंटरैक्टिव पायथन शेल प्रदान करता है, जो आपको पायथन कमांड निष्पादित करने और तत्काल परिणाम देखने की अनुमति देता है।  2. Script Editor:- It includes a text editor for writing Python scripts. You can create, edit, and save Python files with a ".py" extension. 2. स्क्...

Operator's in Python पायथन में ऑपरेटर्स

Python supports various types of operators for performing operations on variables and values. Here are some common types of operators in Python: पायथन वेरिएबल्स और मानों पर संचालन करने के लिए विभिन्न प्रकार के ऑपरेटरों का समर्थन करता है। यहां पायथन में कुछ सामान्य प्रकार के ऑपरेटर हैं: 1. Arithmetic Operators:    + # Addition     - # Subtraction    * # Multiplication    / # Division    % # Modulus (remainder)    ** # Exponentiation    // # Floor Division 2. Comparison Operators:        == # Equal to    != # Not equal to    < # Less than    > # Greater than    <= # Less than or equal to    >= # Greater than or equal to     3. Logical Operators:       and # Logical AND    or # Logical OR    not # Logical NOT    4. Assignment Operators:    ...

Programming with Python Language Tutorial available in hindi and english पाइथन प्रोग्रामिंग टुटोरिअल हिंदी एवं अंग्रेजी भाषा में

 Unit -01 1. Introduction to python (पाइथन भाषा का परिचय) 2. History of Python Programming Language पाइथन प्रोग्रामिंग लैंग्वेज का इतिहास 3. Python Programming Language’s Features and Advantages पायथन प्रोग्रामिंग लैंग्वेज की प्रमुख विशेषताएं 4. Python’s Programming Language's Popularity पाइथन प्रोग्रामिंग लैंग्वेज की लोकप्रियता 5.The Future of Python Programming Language पायथन प्रोग्रामिंग लैंग्वेज का भविष्य 6. The Python Interpreter पायथन इंटरप्रेटर 7. The Python IDLE पाइथन आईडीएलई 8. Installation process of Python IDLE पायथन आईडीएलई की इंस्टालेशन प्रक्रिया 9. Dynamically typed and strongly typed features of python गतिशील रूप से टाइप और दृढ़ता से टाइप की गई भाषा पायथन 10. Basic Data Types of Python पायथन के बेसिक डेटा टाइप 11. Variables in python पायथन में वेरिएबल 12. Expressions in Python पायथन में अभिव्यक्तियां 13. Statements in Python पायथन में कथन 14. Operator's in Python पायथन में ऑपरेटर्स 15. Flow of execution of a python program पाइथन प्रोग्राम के निष्पादन का प्रवाह 16...