PL/SQL Tutorial #12: Loops, Type of Loops and Simple Loop in PLSQL

Oracle Shooter
19 May 202021:37

Summary

TLDRThe video script discusses various concepts of loops in programming, using the metaphor of filling a 'balty' (drum) to explain the iteration process. It covers different types of loops like 'for', 'while', and 'continue', and their applications. The script aims to simplify complex loop functionalities, emphasizing the importance of understanding loop control statements for efficient coding practices. It encourages viewers to follow along for more detailed explanations and examples in subsequent videos, promising to deepen their understanding of loops.

Takeaways

  • 🔁 Loops are fundamental in programming and are used to repeat a block of code until a condition is met.
  • 🔄 The 'continue' statement in loops is used to skip the current iteration and continue with the next one.
  • 📍 The 'break' statement is used to exit a loop entirely when a certain condition is satisfied.
  • 🔢 'For' loops are commonly used when the number of iterations is known beforehand.
  • 🔃 'While' loops are used when the number of iterations is not known and depends on a condition being true.
  • 🔝 The concept of 'nested loops' is introduced, where one loop is placed inside another loop.
  • 🔄 'Continue' and 'break' can be used within nested loops to control the flow of both inner and outer loops.
  • 📝 Importance of understanding loop control statements for writing efficient and clean code is emphasized.
  • 🔑 The script discusses practical examples and use-cases of different types of loops to aid understanding.
  • 🛠️ The presenter encourages practicing with examples to solidify the concepts of loops and iteration.
  • 🗣️ The script is educational, aiming to clarify the concepts of loops for the audience, possibly in the context of a programming tutorial.

Q & A

  • What is the main concept discussed in the video script?

    -The main concept discussed in the video script revolves around the use of loops, specifically 'for' and 'while' loops, in programming, and how they are utilized to execute code repeatedly based on certain conditions.

  • What is the purpose of using loops in programming?

    -The purpose of using loops in programming is to perform a set of instructions repeatedly until a specific condition is met, which helps in reducing code redundancy and improving efficiency.

  • What is the difference between 'for' and 'while' loops as mentioned in the script?

    -The script does not explicitly differentiate between 'for' and 'while' loops, but generally, 'for' loops are used when the number of iterations is known beforehand, while 'while' loops continue to execute as long as a certain condition remains true, without a predefined number of iterations.

  • How does the script explain the use of conditions in loops?

    -The script explains the use of conditions in loops by stating that the loop will continue to execute as long as the condition is satisfied. Once the condition is no longer met, the loop exits, and the program continues with the next statement.

  • What is the role of the 'continue' statement in loops as per the script?

    -The 'continue' statement, although not explicitly mentioned, typically skips the rest of the loop's code block for the current iteration and moves the control back to the beginning of the next iteration of the loop.

  • How does the script discuss the importance of understanding loops for programmers?

    -The script emphasizes the importance of understanding loops for programmers by stating that loops are a fundamental concept in programming that allows for efficient and effective coding practices, especially when dealing with repetitive tasks.

  • What is the significance of the 'break' statement in the context of loops mentioned in the script?

    -The 'break' statement, while not directly mentioned, is typically used to exit a loop immediately, regardless of the loop's condition, allowing the program to move on to the next block of code outside the loop.

  • How does the script mention the use of nested loops?

    -The script refers to nested loops by explaining that a loop can be placed inside another loop, which allows for more complex and repetitive operations to be performed based on multiple conditions.

  • What is the role of incrementing a value in a loop as discussed in the script?

    -The role of incrementing a value in a loop, as discussed in the script, is to change the loop's control variable by a certain step each time the loop iterates, which helps in controlling the number of times the loop executes.

  • How does the script explain the concept of loop control statements?

    -The script explains loop control statements by discussing how they can be used to alter the flow of a loop, such as continuing to the next iteration or breaking out of the loop based on specific conditions or logic.

  • What is the script's stance on the importance of loop statements in coding?

    -The script's stance is that loop statements are crucial in coding as they allow for the repetition of code blocks efficiently, and mastering them can significantly improve a programmer's ability to write clean and effective code.

Outlines

00:00

😀 Introduction to Loops and Iteration

The speaker, Manoj Kumar, introduces the concept of loops and iteration in programming, using a relatable example of filling a container with a small amount of material at a time. He explains the importance of loops in automating repetitive tasks and emphasizes the difference between single-time and multi-time execution of code blocks. He discusses the use of conditions in loops to determine when to exit the loop, and the potential confusion that can arise from forgetting the number of iterations. The paragraph also touches on the use of 'continue' and 'break' statements in loops to control the flow of execution.

05:03

😇 Exploring Different Types of Loops

This paragraph delves deeper into the different types of loops, such as 'for' and 'while' loops, and their syntax. The speaker provides examples of how to write simple loops and discusses the importance of conditions within loops to determine when to execute the loop body or exit the loop. He also introduces the concept of nested loops, where one loop is placed inside another, and explains the significance of loop control statements like 'continue' and 'break' in managing loop execution. Additionally, the speaker mentions the use of accumulators and counters in loops to track the number of iterations.

10:03

🤔 Understanding Loop Control Statements

The speaker explains the role of 'continue' and 'break' statements in loops, illustrating how they can be used to skip an iteration or exit the loop entirely based on certain conditions. He provides examples of how these statements can be used within different types of loops, including 'for' and 'while' loops. The paragraph also discusses the importance of loop exit conditions and how they can be set to ensure the loop terminates correctly. The speaker emphasizes the need to understand the flow of control within loops to write efficient and effective code.

15:05

🔁 Demonstrating Nested Loops and Their Execution

In this paragraph, the speaker provides a detailed explanation of nested loops, where one loop is contained within another. He demonstrates how the outer loop and inner loop work together and how the flow of execution moves between them. The speaker uses an example to show how values are incremented and printed within nested loops, highlighting the importance of understanding the scope and impact of each loop. He also discusses the potential for confusion when dealing with multiple loops and the need to carefully manage loop variables and conditions.

20:06

📚 Recap and Encouragement for Further Learning

The speaker concludes the video script by summarizing the key points about loops and iteration. He encourages viewers to practice and apply the concepts learned in the video to enhance their programming skills. The speaker also invites viewers to like the video, share their thoughts in the comments, and subscribe to the channel for more informative content. He expresses hope that the viewers have understood the material and will continue to learn and grow in their programming journey.

Mindmap

Keywords

💡Concept

The term 'concept' in the script refers to the underlying idea or principle that the video aims to explain or demonstrate. It is central to the video's theme, as it sets the stage for the discussion on programming constructs. For example, the script introduces a 'new concept' related to programming loops, indicating the educational focus of the content.

💡Loop

A 'loop' in programming is a sequence of instructions that is continually repeated until a certain condition is reached. It is a fundamental concept in the script, as the video discusses different types of loops such as 'for' and 'while'. The script uses the term to illustrate how to execute a block of code multiple times based on a condition, which is crucial for understanding iteration in programming.

💡Iteration

'Iteration' refers to the process of repeating a set of actions according to a condition or a counter in programming. The script emphasizes the importance of understanding iterations through the use of loops, showing how they are used to perform repeated tasks efficiently within a program.

💡Condition

In the context of programming, a 'condition' is a boolean expression that determines the flow of the program, especially in loops and conditional statements. The script mentions conditions in the context of loop exit criteria, explaining how loops continue to execute as long as the condition is true.

💡Continue

The 'continue' statement in programming is used within loops to skip the current iteration and move on to the next one. Although not explicitly mentioned in the script, the concept is implied when discussing how loops can be controlled to continue or exit based on certain conditions.

💡Break

'Break' is a statement used to exit a loop immediately, regardless of the loop's condition. The script discusses 'break' in the context of loop control, illustrating how it can be used to stop the execution of a loop when a specific condition is met.

💡Nested Loop

A 'nested loop' occurs when a loop is placed inside another loop. The script touches on this concept, explaining how loops can be used within other loops to create more complex iterative behavior in a program.

💡Increment

The term 'increment' in programming refers to increasing a variable's value by a certain fixed amount, typically by one. The script uses the concept of incrementing to demonstrate how loop counters are updated to control the number of iterations.

💡Syntax

'Syntax' in programming refers to the set of rules that dictate how code should be written. The script mentions syntax in the context of writing loops correctly, emphasizing the importance of following the proper structure for different types of loops.

💡Control Structure

A 'control structure' in programming is a feature of the language that allows the programmer to control the order in which statements are executed. The script discusses various control structures, such as loops and conditional statements, to explain how they direct the flow of a program.

Highlights

Introduction to a new concept by Manoj Kumar, continuing the series of PCJ.

Explanation of using 'continue' and 'break' statements in loops for better flow control.

The importance of understanding loop iterations and their impact on code execution.

How to use loops effectively to avoid repetitive code and enhance efficiency.

Differentiating between 'continue' and 'break' based on their functionality in loops.

The role of conditions in loops and how they dictate the flow of execution.

Nested loops and their application in solving complex problems.

Using named loops for better readability and organization of code.

The concept of loop control statements and their significance in programming.

How to write a loop with a 'for' statement and its practical use cases.

The use of 'while' loops for indefinite repetitions based on a condition.

Exploring different types of loops and their appropriate use cases.

The impact of loop statements on program performance and optimization.

Tips for writing efficient loop constructs and avoiding common pitfalls.

Real-world examples of loop utilization in programming.

Discussion on the practical applications of loops in various programming scenarios.

The importance of loop exit strategies and how to implement them effectively.

Conclusion and summary of the key points discussed about loops.

Transcripts

play00:00

कर दो

play00:06

कर दो

play00:09

कि मैं मनोज कुमार फिर से हाजिर हूं आपके

play00:17

सामने एक और नए कंसेप्ट को लेकर जैसे ही

play00:20

कंटिन्यू असली हम पीसीज को की सीरीज को

play00:22

फॉलो कर रहे हैं और आगे बढ़ते जा रहे हैं

play00:24

तो आज बात करने वाले हैं अपनी वीडियो के

play00:26

अंदर हम लुइस लुक्स को सबसे पहले मैं बता

play00:30

दूं लुक्स होते हैं

play00:32

है और ऐसे एग्जांपल से बताता हूं जो सबको

play00:35

इजीली अंडरस्टैंड हो जाएगा अगर एक छोटा सा

play00:37

काम आपको दे दिया जाए कि एक बाल्टी आपको

play00:40

किसी बड़े ड्रम से भर नहीं है तो आप क्या

play00:43

करेंगे कंटीन्यूअसली चमक को यूज करके एक

play00:45

मत डालेंगे दो मुद्दा लेकर प्रति नमक

play00:48

डालेंगे चार मंगा लेंगे और कब तक डालते

play00:50

हैं जब तक डालते हैं जब तक वह पूरी व कि

play00:53

डुबो पूरी तरह सफल नहीं हो जाए तो जो आपने

play00:58

मठ से बार-बार एक बार दो बार तीन बार जो

play01:01

कैंटीन जो इटरेशन किया जो बार-बार रिपीट

play01:04

किया तो उसको भूलते लोग अब बात करते हैं

play01:08

अपने पीसी को से फोल्ड करके दो से जब कभी

play01:11

भी आपको तेल सीक्वल का कोई पैकेज लिखते

play01:13

हैं कोई प्रोसीजर लिखते हैं कि स्टाफ लंका

play01:16

कोड लिखते हैं जबकि अन्य ब्लॉग लिखते हैं

play01:18

तो क्या होता है कि हर एक लाइन फिर लिखा

play01:21

गया कोड आप का सिंगल वन टाइम चलता है ओनली

play01:26

वन टाइम

play01:27

कि कोई भी ऐसे स्टेटमेंट नहीं होता आ मेरे

play01:31

ब्लॉग के अंदर मेरे कोड के अंदर जो मल्टी

play01:34

पर टाइम चले जो कंटिन्यू इसलिए एक इटरेशन

play01:37

में एक लूप में चलता जाए ऐसा कोई

play01:39

स्टेटमेंट है जब हम अपने किसी भी

play01:42

प्रोग्राम्स के अंदर लुक्स को डाल देते

play01:43

हैं लुक्स को लिख देते हैं तो लूम्स वह

play01:46

सेट ऑफ बैंक का कोड होता है जो लूप के

play01:49

अंदर लिखी गई मेरे कोट्स को रिपीटेड विद

play01:52

चलाता रहता है तिल जब तक वह कंडीशन

play01:55

सेटिस्फाइड होती रहती है जब वह कंडीशन

play01:59

सेटिसफाइड नहीं होते तब वह एग्जिट कर जाता

play02:02

है तो वहां से ट्वीट कर जाता है फादर नीचे

play02:05

के जो Reliance का कोड होता है उसको रीड

play02:07

करना स्टार्ट करता है वह एक ही पॉइंट पर

play02:10

कंटिनयसली एक सैम काम को रिपीट करता है

play02:13

टैग जब तक कंडीशन वहां पर फॉल्स वेतन ना

play02:16

करते

play02:17

आप तो बात करते हैं अपनी लुक्स में लूट

play02:20

समेत समझ लिया कितने टाइप के होते हैं

play02:22

दोस्तों लूप सबसे पहले यह सामने जोड़ी

play02:24

दोस्तों एक होता है मेरे सिंपल लोग यह सब

play02:28

बोर्ड पर लिखा हुआ है सिंपल लुक लिखिए

play02:30

भूलें और जहां पर आपको कंडीशन फॉल्स करानी

play02:33

है वह सिंपली इस तरीके से कि एकजुट वैन जब

play02:37

आपको कंडीशन फॉल्स कि रानी अब उसका कोड

play02:40

लिखकर सिंपली अपने उस लुक्स को ऐड कर सकते

play02:42

हो सिंपल हो इनिशियली आपने नहीं बताया कि

play02:45

कितने नंबर ऑफ़ टेंसेस चलेगा आपने कोई

play02:49

कैलकुलेशन अंदर की उसी कैलकुलेशन के यहां

play02:52

पर इंटरनली की उस लुक्स के अंदर ही डिसाइड

play02:55

किया कि कब मोड एक ट्वीट करना है कम मुझे

play02:57

एकजुट करना है इसको बोलते हैं दोस्तों

play02:59

सिर्फ

play03:01

है अगला कौन सा रूपल है अगले लोग कटा हुआ

play03:04

है दोस्तों मिनट वायरल ु ु

play03:06

है जैसा पहले वाले लोग के अंदर हम एकजुट

play03:10

कंडीशन अंदर लिखी थी वैसे ही वाइल उसके

play03:14

अंदर वाइल्ड कंडीशन जो है वह बिल्कुल ही

play03:16

वह कीवर्ड यह पूछ रहा है कि कब एकजुट करना

play03:20

है वह ऑयल तो वहां पर जो प्रिडिक्शन दे

play03:22

दोगे वहां पर एक्जिट कर दिया का यह भी लूप

play03:26

कहिए पार्ट इसके अंदर यह इस सेंटेंस को

play03:29

यूज करके लिखा गया लूप भी मेरा मल्टीप्ल

play03:32

टाइम्स चलता है जब तक कंडीशन मेरी वाली

play03:36

फॉल्स रिटर्न नोट है

play03:38

है अगला कौन सा होता है अगला होता है

play03:40

दोस्तों फॉर लोग यह सबसे ज्यादा मिला यूज

play03:43

होता है फॉलो कई बार आप न्यूमैरिक फॉलो भी

play03:46

बोल सकते हैं रिवीजन कि यहां पर सेंटेंस

play03:50

पर अगर गौर करें तो फैक्ट मेरल ऊपर लिखने

play03:52

होते हैं यहां पर फॉर यू कैन उस फॉर कोई

play03:55

भी वेरिएबल इन करके मैं बताता हूं कि वन

play03:58

से स्टार्ट हो और तह तक जाएं one.com पहले

play04:03

ही बता दिया कि एक से स्टार्ट होकर टाइम

play04:05

तक जाएगा उसके बाद जो यह एक्टिविटी की कोई

play04:09

एक टास्क किया कब एकजुट करें का यूज जब

play04:12

मेरा टाइम पर पहुंच जाएगा और ऑटोमेटिकली

play04:14

स्टॉप यहां पर एक चीज और जो आपको जानना

play04:18

चाहिए कि इधर इसे कीबोर्ड से तो चला है वन

play04:21

स्टैंड तक लेकिन अगर मुझे कुछ और फॉर्मेट

play04:24

इन्हें कुछ और तरीका कोड लिखना है जिसमें

play04:27

आपको इसको रिवर्स चलाना है कूड़ा कैसे

play04:30

लिखना है लेकिन इन के जस्ट बाद में अगर आप

play04:33

विवश कीबोर्ड लिखेंगे जो कि ऑप्शनल है आप

play04:35

लिखेंगे तो यह टाइम से

play04:38

अच्छी तरह चलेगा डायरेक्शन और नहीं

play04:40

लिखेंगे तो यह वन स्टेटस की तरह चलेगा तो

play04:44

यह दिवस आपको जानना चाहिए कि मैं जरूर

play04:46

देंगे और दोस्तों वैसे तो तीन ही तरीके के

play04:49

लूप होते लेकिन मेरे हिसाब से चौथे तरीका

play04:52

लूप भी होता जिसको मैं कर सर फॉलो बोलता

play04:54

है एक कैरियर बेस लुटा मतलब यहां पर भी

play04:57

जैसा फर्स्ट में मुझे यह नहीं पता था

play04:59

कितनी बार चलना है अंदर पता लगा कि कंडीशन

play05:02

कहां फॉलो में हवाई रूप में भी इनिशियली

play05:05

मैंने बता दिया कि कब मुझे ऑफिस करना है

play05:07

फॉर लोकेंदर इनिशियली बता दिया कि भाई

play05:09

वर्ष टैंक के बाद चलना है ऐसे ही कर सिर्फ

play05:12

और लूप में भी क्या होता है कि कसर हम आगे

play05:15

की वीडियो में जरूर देखिए कर सको और डिटेल

play05:18

में पढेंगे कितने फिट होते हैं क्या होते

play05:20

हैं कैसे काम करते हैं बट कसर बेसिकली

play05:24

जिससे एक स्टेटमेंट पर लिखे होते उस

play05:26

सेलेक्ट स्टेटमेंट में जितने नंबर ऑफ

play05:29

रिकार्ड्स आते हैं दोस्तों यह लोग चलता है

play05:32

मेरा उस तरीके से

play05:33

है तो जितने भी लूप शर्म नहीं और डिस्कस

play05:35

कि है इन सारे लोग सा हम इन सब का

play05:38

एग्जांपल करते हैं आपने लेबल चलते हैं

play05:41

अपनी कंसेप्ट को और अच्छे से क्लियर करते

play05:44

हैं ओवरलैप की तरफ चलते हैं तो फ्रेंड्स

play05:46

स्टार्ट करते हैं अपनी लाइफ खोज सकी

play05:47

वीडियो के अंदर अभी हमने लोगों के बारे

play05:49

में डिस्कशन किया तो सबसे पहले अपनी लैब

play05:51

में बिना टाइम वेस्ट कर हम देखेंगे क्या

play05:53

बेसिक लुक्स को सोएं बेसिकली उसकी बात

play05:56

करने से पहले आपको 4G स्टेटमेंट लिखें

play05:59

दोस्तों इन पर भी गौर करना चाहिए क्योंकि

play06:01

यह भी काफी इंपोर्टेंट है एग्जेक्ट

play06:04

स्टेटमेंट एग्जिट वन कंटिन्यू स्टेटमेंट

play06:07

कंटिन्यू वैन दोस्तों मैं आपको बता दूं कि

play06:10

यह दोनों सेंटेंस जो मैंने सेलेक्ट कर यह

play06:12

दोनों एक है और यह दोनों सेंटेंस यह दो ना

play06:15

बट यह दो में वक्रीय होंगे क्योंकि इनके

play06:18

लिखने का जो तरीका है वह एकदम डिफरेंट है

play06:21

तो स्टार्ट करते हैं बेसिक लुट सबसे पहले

play06:24

बात करेंगे बेसिक लोग इस सेंटेंस की दूसरी

play06:26

टिप्स की बात करो तो दोस्तों बेसिकली का

play06:28

सेंटेंस सिंपल होता है लूप लिखते हैं एंड

play06:32

लूप लिखते और

play06:33

इसमें वह सब लिखते हैं जो हमें करवाना है

play06:36

बट यहां पर एक चीज का आपको विशेष ध्यान

play06:38

देना चाहिए जो कि मेरे हिसाब से बिल्कुल

play06:41

मैंडेटरी है कि लूप को अगर जिस तरीके से

play06:43

इसका सेंटेंस है इस तरीके से आप दे देंगे

play06:46

तो आपका लुक इन फेज़ रेंज के लिए अफेयर हो

play06:50

जाएगा जो कभी एंड न्यू का यह जो कि एकदम

play06:53

गलत तरीके का डेवलपमेंट है ऐसा नहीं होना

play06:55

चाहिए दोस्तों इसके अंदर जहां स्टेटमेंट

play06:59

लिखा हुआ है यहां पर आप अपनी कंडिशंस

play07:02

हिसाब से अपनी रिक्वायरमेंट हिसाब से अपना

play07:05

लॉजिक फोल्ड करेंगे और अपने लोगों को किसी

play07:08

भी तरीके से बाय यूजिंग थिस थ्री एंड फोर

play07:11

स्टेटमेंट एकजुट करेंगे एग्जांपल की तरफ

play07:14

बढ़ते एग्जांपल में सबसे पहला जो एग्जाम

play07:16

पर हम देखने वाले वह देखने वाले अपने

play07:19

एग्जिट स्टेटमेंट का जो कि हमारी 49 टॉपिक

play07:22

में से सबसे पहली वाली थी तो एग्जांपल को

play07:26

देखने के लिए बिल्कुल सिंपल लुक के साथ

play07:28

देखने वाले देखिए दोस्तों तो यह मैंने एक

play07:31

छोटा सा यहां पर अनोनिमस कोड लिखा है

play07:33

कोट तो यहां पर हम रन करेंगे और साथ में

play07:36

यह देखेंगे कि किस तरीके का आउटपुट लेकर

play07:38

आता है क्या कि हमने लिखा है वह थोड़ा सा

play07:39

इंट्रस्ट करते हैं जैसा कि मैंने बताया था

play07:41

बेसिकली ओपन लूप लिखते हैं एंड लूप लिखते

play07:44

हैं सिंपल इतना रखे जो हमें कराना होता है

play07:47

वह हम कराते हैं हम सिंपल यहां पर प्रिंट

play07:50

करा रहे एक वैल्यू जिस व्यक्ति ने

play07:52

इनिशियली इंच लोस है क्या कि नंबर टाइप

play07:55

किया और इसको हम इन इसलिए जीरो वैल्यू ऑफ

play07:59

साइन कर भी रहे हैं वह भी डिक्लेअर सेक्शन

play08:01

के अंदर सिंपल बेवसाइट हम यहां पर वैल्यू

play08:04

जो है कितने नंबर आफ टाइम्स मेरा लूप चल

play08:07

रहा है वह यहां पर प्रिंट करें और फ़ैक्स

play08:10

के साथ हम इंक्रीमेंट वैल्यू ऐड करते जा

play08:13

रहे हैं और साथ में यह लॉजिक में लिखने की

play08:16

बात कर रहा था जो इंपॉर्टेंट है अगर आप भी

play08:19

हाइलाइटेड क्लोज में दिखा रहा हूं अगर यह

play08:21

नहीं लिखते हैं तो दोस्तों आपका लूप इन

play08:24

फाइनेंस के लिए अफेयर हो जाएगा जो एकदम

play08:26

गलत तो मैंने यहां पर लिखा है जब एक हफ्ता

play08:29

बार-बार इंक्रीमेंट हो तरह का यह जब एक्स

play08:32

आपका पेन से

play08:33

हों मतलब जैसे ही 11:00 हो वैसे ही वह लूट

play08:36

से एग्जिट करते हैं तो एग्जिट स्टेटमेंट

play08:40

यह है दोस्तों जिसके बाद में यहां पर करो

play08:42

ऐक्सिडेंट इसकी बात कि जो आपका बेसिक लूप

play08:46

है वह एग्जिट तभी होगा जब एकजुट स्टेटमेंट

play08:49

उसमें लिखिए एक बार इसको रन करके देखते

play08:51

हैं क्या होता है मैंने यहां पर सिंपल लूप

play08:54

लिखा है और एक्स की रैली को बाहर

play08:56

इंक्रीमेंट खराब है तो यह दोस्तों मैंने

play08:58

यहां पर लर्न कर दिया देखते हैं आउटपुट

play09:00

में किस तरीके का हमारा आउटपुट आता है

play09:02

सिंपल यहां पर देखिए दोस्तों यहां पर आउट

play09:05

है मेरा इस तरीके का इनसाइड लूप 10 के लिए

play09:09

राघवन की नियुक्ति इनसाइड लूप में तब तक

play09:14

रहा जब तक वैल्यू टैन रही यहां पर यह तब

play09:17

तक रहा जब तक व्यक्ति इसकी टैन रही जैसे

play09:21

ही इंक्रीमेंट वैल्यू 11:00 हुई यहां पर

play09:24

कंडीशन चेक हुई और SIM के लिए रूप से

play09:26

एकजुट कर गया और एकजुट करने के बाद जो

play09:29

मेरे कंट्रोल है दोस्तों वह गया मेरे जस्ट

play09:32

यहां पर जहां पर में

play09:33

वूलन खत्म हो रहा है इसके बाद की

play09:36

स्टेटमेंट संशोधन करने स्टार्ट करते मदर

play09:39

एग्जिट करते सीधे कंट्रोल यहां से मेरा

play09:41

लाइन नंबर 635 आ गया वह Bigg Boss को लांघ

play09:45

कर बाहर ठीक है तो यह मेरा बेसिक गुप्ता

play09:49

जहां पर मैंने किस को देखा दोस्तों एग्जिट

play09:51

का यूज देखा अगली अपने सेगमेंट की तरफ

play09:54

बढ़ते हैं अगला सेगमेंट है कि हम एकजुट को

play09:57

ही यूज करेंगे बट आपकी कंडीशन के साथ वैन

play10:00

स्टेटमेंट के साथ अपने एकजुट कंडीशन को

play10:03

यूज करेंगे देखिए दोस्तों तो बिलकुल से

play10:05

मैंने ऊपर वाला ही कोड यहां पर लिखा है

play10:07

कुछ भी डिफरेंट नहीं है बट जो मैंने

play10:10

कंडीशन लिखिए उसमें थोड़ा सा चेंज यहां तक

play10:13

कोई चेंज है देखिए यह मैंने ऊपर के कंडीशन

play10:16

में भी किया था वह पर के कोण में भी किया

play10:18

था सैंपल वैल्यू थी इंक्रीमेंटेड सी एक

play10:21

वैल्यू ऑफ साइन की थी और वैल्यू

play10:23

इंक्रीमेंट आफ कि मैं यहां कोई इस कंडीशन

play10:26

नहीं लिखिए अब की सिंपली मैंने बताया कि

play10:29

वह एकजुट कर जाएं तब जब मेरी एक्स की

play10:32

ज्वेलरी जो है वह

play10:33

आफ्टर डेथ हो जाए टाइम सिंपल दोस्तों सेम

play10:37

टू सेम जो नीचे हम और मुद्दे शैंपू से उस

play10:40

तरीके का आउटपुट यहां पर प्रिंट हो जाएगा

play10:41

मैं चलाता हूं कोड मैंने चला दिया है

play10:43

देखते हैं क्या वैल्यू के आउटपुट आती है

play10:46

बिल्कुल सेम टू सेम आएगा दोस्तों बस एकजुट

play10:48

को लिखने का मेरे इस तरीके से हम पर चेंज

play10:51

हुआ था ठीक है दोस्तों आगे बढ़ देते बेसिक

play10:54

लूप में एक स्टेप और आगे बढ़ते हैं किसकी

play10:57

बात करते हैं अब बात करते हैं दोस्तों कि

play10:59

कंटिन्यू स्टेटमेंट की जैसा कि आपने

play11:02

एक्जिट पोल और एग्जिट वैन को देखें

play11:04

बिल्कुल उसी तरीके से यहां पर कंटिन्यू पर

play11:07

कंटिन्यू वैन भी आपको दिखाई देगा

play11:10

स्टेटमेंट क्या करता है बिल्कुल उसी तरीके

play11:13

से दोस्तों थोड़ा सा गौर कीजिएगा और

play11:15

कंटिन्यू के सामने क्वेश्चन दोस्तों यह

play11:18

देखिए यहां तक कि में कोई डिफरेंस पहले

play11:21

जैसा एक बेसिक लूप लिखा है लिखा है

play11:25

इंक्रीमेंटल वैल्यू लिखिए साथ में लिखा है

play11:30

कि यहां पर एग्जेक्ट हो कि मेरी

play11:33

कि इसकी वैल्यू फाइव के बराबर हो जाए तब

play11:36

मेरी वैल्यू यहां पर एकजुट हो जाए अब इसको

play11:39

समझने की कोशिश करते हैं कि कंटिन्यू यह

play11:42

देखिए दोस्तों जब मेरा लूप यहां से सबसे

play11:45

पहले में से स्टार्ट होगा लूप का यह ऊपर

play11:49

आने वाली प्रिंट करें इसके लिए यहां पर व

play11:56

वंश का यहां पर कंडीशन चेक चेक करें

play12:00

कंटिन्यू तो दोस्तों यहां पर आपको

play12:03

कंटिन्यू करते हैं जो कंट्रोल था जो मेरा

play12:07

था वह नीचे नहीं बल्कि दोबारा से कहां पर

play12:13

इस लाइन नंबर पर दोबारा फिर दोबारा से

play12:18

चलेगा वैल्यू की प्रिंट करें यहां पर

play12:21

value-2 हो जाएगी और अब दोस्तों फिर से

play12:24

कंटिन्यु फिर से कंट्रोल ऊपर थोड़ी सी के

play12:31

साथ यह मैंने यहां पर है

play12:33

दोस्तों नीचे देखते हैं यह देखिए आउटपुट

play12:36

सिंपली यहां पर आ गया अब मुक्त के साथ को

play12:39

रिलेट करते हैं देखिए दोस्तों पहले जीरो

play12:42

हुआ जीरो के केस में सिंपली प्रिंट करके

play12:45

यहां पर है कंडीशन चेक की कंटिन्यू टेस्ट

play12:48

बात हुई जहां नहीं आया देखी नंबर लाइन

play12:50

उसने प्रिंट नहीं कि चला गया सीधे ऊपर तू

play12:54

के लिए उनके जैसे ही टू क्लियर अंत किया

play12:56

और टू की बात व्यतीत युद्ध जैसे ही वैल्यू

play13:00

यह कंडीशन में रिफ़िल हुई यह करनी समय जब

play13:03

चेक नहीं हुई उसके बाद वह यहां पर आया फिर

play13:07

से दोबारा गया फोर के लिए चलाया फिर से

play13:10

कंडीशन सेटिस्फाइड हुई और फिर पांच के लिए

play13:13

चलाया फिर से कंडीशन सेटिस्फाइड विद और

play13:16

फाइव होने पर उसे एक्टिवेट करके है यही

play13:19

मेरे नीचे आउटपुट ने दिखाना तो कंटिन्यू

play13:21

क्या करता है दोस्तों जिस भी लोकेशन पर हम

play13:24

अपने कंटिन्यू को लिख देते वहां से मेरा

play13:27

ट्रिगर पॉइंट है यह मेरा जो पॉइंट आपका जो

play13:29

कंट्रोल है वह सीधे दोबारा से रिटर्न हो

play13:32

जाता है लूप के

play13:33

पहली वाली लाइन पर वहां से लूप फिर से रन

play13:36

करना स्टार्ट कर देता है विद इंक्रीमेंट

play13:38

वैल्यू ऐसा नहीं है कि कंटिन्यू करने के

play13:41

बाद वह भी सेट हो जाता रिसर्च नहीं होता

play13:42

बल्कि कौन इसे केवल उसके लोकेशन चेंज हो

play13:45

जाती है कि उसे अभी लाइने अगली लाइन कौन

play13:48

सी धड़कन धड़कन यूनिट बाद उसने नीचे रन

play13:50

करना आसान नहीं है कंटिन्यू के बाद उसी

play13:53

यहां पर ज्यादा फिर से इन कोर्ट को इस तरह

play13:54

बंद करते हैं फिर कंटिन्यू जाता है और फिर

play13:57

यहां पर इस तरीके से लगाकर तो दोस्तों

play13:59

कंटिन्यू झाल वह काफी इंपोर्टेंट यह है

play14:02

जिसको अ में जानना चाहिए हमने जान भी है

play14:04

आगे बात करते हैं किसकी कंटिन्यू बहन तो

play14:08

जहां पर बिल्कुल सिंपल है दोस्तों

play14:10

कंटिन्यू सिंपल हम यहां पर कंडीशन लिखी थी

play14:13

मीणा यह जिस तरीके से हमने इसमें लिखी थी

play14:16

जिस तरीके से हमने यहां पर एकजुट में

play14:18

कंडीशन लिखी थी उसके बाद एक्जिट वैन में

play14:21

हमने क्या-क्या एकजुट में सिंपल दोस्तों

play14:23

एक छोटी सी लाइन लिख एक्सिडेंट बिल्कुल

play14:26

उसी तरीके से यहां पर लिखा जाएगा क्या

play14:28

कंटिन्यू वैन तो देखें SIM को डिप ऊपर

play14:32

जैसे कुछ भी यहां

play14:33

डैनी अध्यक्ष एग्स की वैल्यू सिंपल एक लूप

play14:37

क्या करने वाले हैं एक वैल्यू और यहां पर

play14:42

कोई कंडीशन उस तरीके से जैसे हमने पहले ही

play14:46

सिंपल यहां पर कंटिन्यू कब तक कंटिन्यु

play14:48

करना है वह इस तरीके से लिखने का तरीका

play14:51

बदल गया हो अब दोस्तों बारकोड को करके

play14:57

देखते हैं कि इसमें चेंज कर दिया बिल्कुल

play15:01

दोस्तों सेम टू सेम भी लिखने का तरीका

play15:05

थोड़ा सा यह देखिए दोस्तों 0123 के लिए

play15:10

सिंपली कंटिन्यू कर दिया फिर से यहां से

play15:14

और यहां पर स्थिति स्पष्ट नहीं हुई इसके

play15:20

बाद उसने बार सिंपल नीचे ठीक है दोस्तों

play15:26

तो यह इसके बेसिक दोस्तों एक चीज और है जो

play15:31

आपको जो पिन

play15:33

क्विंटल है मैं आपको दिखा देता हूं इस

play15:35

वाले एग्जांपल में दोस्तों दो-तीन चीजें

play15:38

एक साथ पढेंगे हम नेस्टेड लूप पढेंगे सबसे

play15:41

पहले तो एक लूप के अंदर दूसरे रूट से

play15:43

रुखसत इस आलू साथ में एक बहुत इंपोर्टेंट

play15:46

चीज लूट मतलब हम किसी भी अपने लूप को नाम

play15:52

सकते हैं अपनी प्रेग्नेंसी के हिसाब से

play15:54

किसी रूप में किसी न किसी रूप में अगर

play16:00

आपको कंफेशन होता है कि आपने इस चैनल लोटस

play16:04

तो आप अपने लोगों को नामजद अभियुक्त तो

play16:09

कैसे करते हैं दोस्तों दोस्तों यहां पर

play16:14

मैंने दो लिखे संघ के लोग उसको किस तरीके

play16:22

से इस तरीके से सब्सक्राइब जरुर

play16:30

सब्सक्राइब कीजिए वन टू थ्री आपको दे

play16:33

शहद लीजिए आप अपनी रिक्वायरमेंट के अपनी

play16:36

कमी के हिसाब से कुछ भी ले सकते हैं यह

play16:38

मैंने दे दिया लुट क्योंकि बेसिक लुक की

play16:40

बात करें तो लूप ऐसे लिखा जाएगा स्टार्ट

play16:42

ऐसे होगा और एंड भी ऐसे होगा अब जब मैं

play16:46

यहां पर देखिए दोस्तों तो

play16:49

कि यहां पर सबसे पहले तो आपको यह होना

play16:51

चाहिए कि जब मैं पाउडर लुक मिस्टेक से

play16:54

स्टार्ट कर रहा हूं तो मुझे उसे ऐड भी इसी

play16:57

तरीके से देना होगा बिल्कुल अवैध आगे

play17:00

देखिए एक और लूप मैंने डॉक्टर के जस्ट

play17:02

अंदर एक और लूप स्टार्ट कर उसका एंड भी इस

play17:06

तरीके से देना होगा यहां तक मुझे नहीं

play17:08

लगता कि किसी को कोई भी डाउट है अब लोग को

play17:11

फ्रंट करने के लिए मैं बाहर वाले लूप है

play17:14

तो उसके लिए एक इंक्रीमेंट वैल्यू बाहर

play17:16

वाले रुम पर चला दी अंदर वाले लोग के लिए

play17:18

एक इंक्रीमेंट वैल्यू अंदर वाली लोकप्रिय

play17:21

अब कैसे रन और है वह भी समझते देखिए

play17:25

दोस्तों सबसे पहले मैं आपको कोड को रन कर

play17:27

देता हूं सोडा को समझने में थोड़ा सा इजी

play17:30

हो जाए आपको कंफ्यूजन अरे यह मैंने को दान

play17:33

कर दिया आप मेरी एक वैल्यू के लिए इन रॉयल

play17:37

लुक कैसे चलेगा देखिए दोस्तों यह बहुत

play17:39

इंपोर्टेंट लॉजिक आगे आपको कोडिंग में

play17:41

काफी हेल्प करेगा का यह देखिए दोस्तों यह

play17:44

मेरा रूपा क्या सबसे पहले लोग यहां से

play17:47

स्टार्ट हुआ तो आए केवल यूनी

play17:49

90 अंदर आ गया कोई बात नहीं आई की वैल्यू

play17:52

यहां पर होगी जो कि है दोस्तों इसके बाद

play17:55

ठीक है जैसे कि वे यहां पर जीरो है हर बार

play17:59

जब विनर लूप में मैं घुसुक आया तब मैं

play18:02

अपनी जाएगी बिल्कुल रीसेट कर रहा हूं यह

play18:04

आपको समझना चाहिए हमें यह मेरा चैनल ओं

play18:07

बैक जो जे पर चल है यहां पर देखिए वैल्यू

play18:10

में बार-बार इंक्रीमेंटेड करूंगा अंदर उसी

play18:12

के ऊपर रोल प्ले भी करूं किसी पेशेंट फॉर

play18:14

करूंगा तो इंप्रूव की वैल्यू को बार-बार

play18:17

में इनकी स्लाइड कर रहा हूं 0 मतलब जो

play18:21

मेरा चैनल उस चलेगा वह हर बार मेरा जीरो

play18:24

से स्टार्ट होगा और आगे बढ़ेगा ठीक है तो

play18:27

यह जो मेरी यहां पर देखिए जो मैं पांच

play18:30

वैल्यू सेलेक्ट करना है जॉनसन है कि इसमें

play18:32

आगे वाली वैल्यू है मेरे होटल उसकी और

play18:35

उसके आगे जो वैल्यू लिखे यह है मेरी

play18:38

चैनलों की मैंने प्रिंट किया है इस तरीके

play18:40

से सबसे पहले जीवनलाल सेट की है उसके बाद

play18:44

अंदर वाले लोग के अंदर मैंने देखी पहली

play18:47

बार इंक्रीमेंट की और यह

play18:49

अ आई और जे की वैल्यू एक साथ प्रिंट

play18:52

करेंगे दोस्तों इस तरीके से कि जो

play18:54

बाहरवाली लूप में जो बाहर वाले लोग की

play18:57

वैल्यू है वह यहां पर और जो अंदर लुटेरे

play18:59

यहां पर तो आप देखेंगे कि जब बाहर वाले

play19:02

लोग केवल वन थी जब एक बार बाहर वाला लूप

play19:05

चला तो अंदर वाला लुक पांच बार चला 12345

play19:10

सेकंड टाइम चला तो सेकंड टाइम भी देखिए

play19:13

मेरा अंदर लो फिर से पांच वक्त चला जब

play19:16

थर्ड बार चला तो मेरा अंधा कर लो फिर से

play19:19

पाठशाला मतलब एक लूप के अंदर दूसरा रूप हर

play19:24

बार कितनी बार चल है पांचवां यह मैंने

play19:26

लिखा है उसके लिए कि एक्जिट करें वे jul25

play19:32

अंदर वाले रूप से तब बाहर निकले व बजे

play19:38

निकले तब J5 हो तो हर एक इंटरव्यू के लिए

play19:45

दोस्तों तो रूप से

play19:49

वो बहुत ही ज्यादा इंपोर्टेंट है छोटा सा

play19:52

हमने अपनी बेसिक लोगों को समझने की कोशिश

play19:54

की पर आगे हम कई सारी लीव्स और डिटेल में

play19:58

पड़ने वाले सभी दोस्तों आगे के वीडियोस

play20:00

लगातार देखते रहिए का यूरोफर्स्ट में पूरी

play20:03

उम्मीद करता हूं कि आप लोगों ने लुक्स को

play20:06

इजीली अंडरस्टैंड कर लिया होगा अच्छे से

play20:08

समझ लिया होगा कि एक्चुअली लॉक कैसे चलते

play20:11

हैं किस तरीके से मेरे तीनों चारों टाइप

play20:14

के लोग का सेंटेंस होता है कैसे वह व कर

play20:16

दें कैसे अपनी कोठरी में उनका यूटिलाइजेशन

play20:18

हम कर सकते हैं तो दोस्तों एक छोटे से

play20:20

एग्जाम वध आपको पसंद आया वह आपके नॉलेज के

play20:23

डेट ऑफ बिर्थ में से छोटी-मोटी 9 इंच इन

play20:25

हंस कर दी वह तो अपने इस भाई की वीडियो को

play20:28

लाइक कीजिएगा शेर की जगह भाइयों के लिए जो

play20:31

लिप्स को और बेहतर पढ़ना चाहते हैं जो

play20:33

पीछे कुछ सीखना जाते हैं साथ में कमेंट

play20:36

करके अपने रिक्वायरमेंट अपने सजेशन अपने

play20:39

भाई की गलती है जरूर बताइएगा तो दौरान को

play20:41

कलेक्ट कर सके और दोस्तों मेरी इस मुहिम

play20:44

को सपोर्ट करने के लिए मुझे मोटिवेट करने

play20:46

के लिए मुझे आगे बढ़ाने के लिए दोस्तों

play20:49

कि मेरे चैनल को सबस्क्राइब करना नहीं

play20:51

बनना जिससे ही आपके पास मेरी वीडियोस की

play20:55

नोटिफिकेशन दोस्तों टाइम-टाइम पर पर टाइम

play20:57

लिया द पहुंचते 200 इस वीडियो के अंदर

play21:00

देखा गया कोई भी कोड यह मेरी किसी भी

play21:03

वीडियो के अंदर की गई कोई भी है उसका कोड

play21:06

आप इजीलि मेरे ब्लॉग से ले सकते हैं मेरा

play21:09

ब्लॉग यहां पर ब्रिंग भी कर रहा है और

play21:10

डिस्क्रिप्शन में विवाह नहीं दिया हुआ है

play21:12

रुसवाई जाकर इजली कोई भी कोड आप ले सकते

play21:15

हैं यूज कर सकते देख सकते हैं

play21:18

के साथ में आपके बाइक ब्लॉक चैनल पर उस पर

play21:21

जाकर आफ डिफरेंट वीडियोस देख सकते हैं

play21:23

अपने आपको अलग फील करा सकते हैं और

play21:26

दोस्तों लास्ट में एक ही बात कहना चाहूंगा

play21:27

हर वीडियो की तरह कि फिर से मुलाकात होगी

play21:29

नई वीडियो में नए कंसेप्ट के साथ तब तक के

play21:32

लिए दोस्तों थैंक यू सो मच

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Loop ConceptProgrammingCode ExamplesIterationConditionalsNested LoopsContinue StatementExit StrategyIncrement ValueCoding Tutorial
هل تحتاج إلى تلخيص باللغة الإنجليزية؟