Back-End Programming Exam  >  Back-End Programming Videos  >  Python Tutorial in Hindi  >  Python tutorial in Hindi 22 : Print series ; factorial ; A.P series using while loop

Python tutorial in Hindi 22 : Print series ; factorial ; A.P series using while loop Video Lecture | Python Tutorial in Hindi - Back-End Programming

FAQs on Python tutorial in Hindi 22 : Print series ; factorial ; A.P series using while loop Video Lecture - Python Tutorial in Hindi - Back-End Programming

1. क्या आप बता सकते हैं while लूप का उपयोग करके Python में सीरीज़ को कैसे प्रिंट करेंगे?
उत्तर: हाँ, हम while लूप का उपयोग करके Python में सीरीज़ को प्रिंट कर सकते हैं। यहां कुछ उदाहरण हैं: उदाहरण 1: 1 से 10 तक की सीरीज़ प्रिंट करें ``` i = 1 while i <= 10: print(i) i += 1 ``` उदाहरण 2: 10 से 1 तक की सीरीज़ प्रिंट करें ``` i = 10 while i >= 1: print(i) i -= 1 ``` उदाहरण 3: 1 से 10 तक के सभी नगण्य संख्याओं की सीरीज़ प्रिंट करें ``` i = 1 while i <= 10: if i % 2 == 0: print(i) i += 1 ```
2. कैसे Python में फैक्टोरियल को प्रिंट किया जाता है?
उत्तर: Python में फैक्टोरियल को प्रिंट करने के लिए हम while लूप का उपयोग कर सकते हैं। यहां कुछ उदाहरण हैं: उदाहरण 1: 5 का फैक्टोरियल प्रिंट करें ``` n = 5 fact = 1 while n > 0: fact *= n n -= 1 print("Factorial of 5 is:", fact) ``` उदाहरण 2: उपयोगकर्ता द्वारा दिए गए नंबर का फैक्टोरियल प्रिंट करें ``` n = int(input("Enter a number: ")) fact = 1 while n > 0: fact *= n n -= 1 print("Factorial is:", fact) ```
3. कैसे Python में ए.पी. (Arithmetic Progression) सीरीज़ को प्रिंट किया जाता है?
उत्तर: Python में ए.पी. (Arithmetic Progression) सीरीज़ को प्रिंट करने के लिए हम while लूप का उपयोग कर सकते हैं। यहां कुछ उदाहरण हैं: उदाहरण 1: पहले 5 टर्म्स की ए.पी. सीरीज़ प्रिंट करें ``` a = 2 # पहला टर्म d = 3 # अंतर n = 5 # टर्म्स की संख्या i = 0 # इंडेक्स while i < n: term = a + i * d print(term) i += 1 ``` उदाहरण 2: उपयोगकर्ता द्वारा दिए गए पहले टर्म, अंतर, और टर्म्स की संख्या के आधार पर ए.पी. सीरीज़ प्रिंट करें ``` a = int(input("Enter the first term: ")) d = int(input("Enter the common difference: ")) n = int(input("Enter the number of terms: ")) i = 0 while i < n: term = a + i * d print(term) i += 1 ```
4. क्या आप बता सकते हैं व्हाइल लूप का उपयोग करके सीरीज़ प्रिंट करने के लिए Python में क्या फायदे हैं?
उत्तर: व्हाइल लूप का उपयोग करके सीरीज़ प्रिंट करने के लिए Python में कुछ फायदे हैं: 1. व्हाइल लूप से सीरीज़ प्रिंट करना बहुत सरल होता है, क्योंकि हमें एक न्यूमेरिक वैरिएबल की मदद से टर्म को बढ़ाते जा सकते हैं या घटा सकते हैं। 2. व्हाइल लूप सीरीज़ को किसी भी आवश्यक शर्त के अनुसार प्रिंट कर सकता है, जैसे कि सीरीज़ को सिर्फ नगण्य संख्याओं पर प्रिंट करना या केवल प्रतीकात्मक संख्याओं पर प्रिंट करना। 3. व्हाइल लूप का उपयोग करके हम एक सीरीज़ के प्रत्येक टर्म को प्रिंट करने के लिए बहुत कम कोड का उपयोग कर सकते हैं। 4. व्हाइल लूप का उपयोग करके हम विभिन्न प्रकार के सीरीज़ को प्रिंट कर सकते हैं, जैसे कि ए.पी. सीरीज़, फैक्टोरियल आदि।
Related Searches

video lectures

,

Extra Questions

,

Exam

,

shortcuts and tricks

,

past year papers

,

Previous Year Questions with Solutions

,

Sample Paper

,

MCQs

,

Viva Questions

,

pdf

,

practice quizzes

,

Objective type Questions

,

Semester Notes

,

study material

,

Python tutorial in Hindi 22 : Print series ; factorial ; A.P series using while loop Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

Free

,

ppt

,

Python tutorial in Hindi 22 : Print series ; factorial ; A.P series using while loop Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

mock tests for examination

,

Python tutorial in Hindi 22 : Print series ; factorial ; A.P series using while loop Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

Summary

,

Important questions

;