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

80 videos

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 में सीरीज़ को कैसे प्रिंट करेंगे?
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

shortcuts and tricks

,

study material

,

Viva Questions

,

pdf

,

Semester Notes

,

Exam

,

Free

,

Important questions

,

Objective type Questions

,

past year papers

,

video lectures

,

mock tests for examination

,

ppt

,

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

,

Extra Questions

,

Previous Year Questions with Solutions

,

MCQs

,

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

,

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

,

Sample Paper

,

Summary

,

practice quizzes

;