-
Python में Matrix पर Breadth First Search
दिए गए matrix में, element position analyze करने के लिए चार objects हैं: left, right, bottom, और top। Breadth First Search दिए गए 2-D Matrix के दो elements के बीच shortest distance ढूंढने के अलावा कुछ नहीं है। इस प्रकार, प्रत्येक cell में चार operations perform की जा सकती हैं जिन्हें चार numerals मे
-
Python में Random Pointer के साथ List Copy करें
Linked List एक linear data structure है जिसमें प्रत्येक node के दो blocks होते हैं जैसे कि एक block में node का value या data होता है और दूसरे block में next field का address होता है। मान लीजिए हमारे पास एक linked list है जैसे कि प्रत्येक node में एक random pointer होता है जो list में अन्य nodes को
-
Python में दो Strings का Largest Merge
मान लीजिए हमारे पास दो strings a और b और एक string merge है। Task है string merge को a और b के characters से इस तरह fill करना कि: यदि string a non-empty है, तो string a से first character remove करें और string merge में copy करें। यदि string b non-empty है, तो string b से first character remove करे
-
Python में तीन Numbers को Zero बनाएं
मान लीजिए हमारे पास तीन numbers हैं। Task है इन सभी numbers को 0 बनाने के लिए total optimal steps count करना। उदाहरण के लिए Input-1: a = 4 b = 4 c = 6 Output: 7 व्याख्या: सभी numbers को 0 बनाने के लिए total optimal steps की संख्या है: (4, 4, 6) 1st और 2nd number से 1 remove करने पर = (3, 3, 6) 1st औ
-
Python Program: दिए गए Expression का Expression Tree Construct करें
Expression trees वे होते हैं जिनमें leaf nodes में operate किए जाने वाले values होते हैं, और internal nodes में operator होता है जिस पर leaf node perform किया जाएगा। उदाहरण: 4 + ((7 + 9) * 2) का expression tree ऐसा होगा - Problem हल करने का दृष्टिकोण दिए गए expression के लिए Expression Tree constru
-
Python में regex match() और search() Function का महत्व
regex का उपयोग करके दो प्रकार के operations perform किए जा सकते हैं: (a) search और (b) match। Pattern ढूंढने और pattern के साथ match करने के लिए regex efficiently उपयोग करने के लिए, हम इन दो functions का उपयोग कर सकते हैं। मान लीजिए हमारे पास एक string है। regex match() pattern को केवल string की beg
-
Python Pandas - DataFrame Property: shape का उपयोग कैसे करें
Products.csv file से data read करने और rows और columns की संख्या print करने के लिए Python program लिखें। फिर first ten rows के लिए product column value Car से match होने पर print करें। मान लें, आपके पास products.csv file है और rows और columns की संख्या और first ten rows के लिए product column value C
-
Python Pandas - DataFrame tail() Function का उपयोग कैसे करें
Python code लिखें products.csv file से price column value 30000 से 70000 के बीच ढूंढने के लिए और last three rows से id और product columns print करें। Download products.csv file here. Price column value 30000 से 70000 के बीच और id और product columns last three rows के लिए result: id product 79 80
-
Python में List और Tuple में अंतर
इस पोस्ट में, हम Python में list और tuple के अंतर को समझेंगे। List और tuple Python में उपयोग की जाने वाली दो अलग-अलग प्रकार की data structures हैं। वे दोनों अलग-अलग instances में अलग-अलग प्रकार के data store करने के लिए उपयोग किए जाते हैं। List इसे अक्सर sequence के रूप में refer किया जाता है। इसे स
-
Tkinter से Average Speed Calculator बनाएं
इस लेख में, हम देखेंगे कि एक GUI-based एप्लिकेशन कैसे बनाया जाए जो average speed calculate करेगा। Moving object की average speed निम्न formula का उपयोग करके calculate की जा सकती है: Average Speed = Distance / [Hours + (Minutes/60)] Input value select करने के लिए, हम SpinBox method का उपयोग करेंगे जो
-
Tkinter में Mouse Cursor Change कैसे करें?
Tkinter एक GUI-based Python library है जिसका उपयोग विभिन्न प्रकार के functional और GUI-based applications develop करने के लिए किया जाता है। यह एप्लिकेशन develop करते समय extensibility और विभिन्न features प्रदान करने के लिए बहुत सारे functions और methods प्रदान करता है। इस लेख में, हम देखेंगे कि tkin
-
Tkinter में Date Picker Calendar बनाएं
Tkinter एप्लिकेशन बनाने और develop करने के लिए एक लोकप्रिय Python library है। इसमें विभिन्न methods और functions हैं जिनका उपयोग एप्लिकेशन में multiple features add करने के लिए किया जा सकता है। Tkcalendar tkinter packages में से एक है जिसका उपयोग window में GUI-based calendars बनाने के लिए किया जा स
-
Tkinter का उपयोग करके Dropdown Menu बनाएं
Navigation किसी भी एप्लिकेशन का सबसे महत्वपूर्ण हिस्सा है, क्योंकि यह aesthetic way में user experience को improve करता है। Tkinter का उपयोग करके, हम menus और submenus बहुत efficiently बना सकते हैं। Tkinter में menus बनाने के लिए एक inbuilt function है और इसे दूसरे tkinter widget या window के साथ in
-
Python Tkinter में Frameless Window बनाएं
Tkinter GUI-based applications बनाने के लिए सबसे commonly used Python library है। इसमें widgets add करने और अन्य necessary attributes जैसी features हैं। मान लीजिए हम tkinter का उपयोग करके borderless window बनाना चाहते हैं। Borderless window बनाने के लिए, हम overrideredirect method का उपयोग कर सकते ह
-
Python Tkinter में Transparent Window बनाएं
Python functional और desktop applications develop करने और बनाने के लिए सबसे लोकप्रिय भाषा है। इसमें अलग-अलग modules और functions की एक rich library है जो एप्लिकेशन बनाने और develop करने के लिए extensibility और accessibility प्रदान करती है। Tkinter GUI-based applications बनाने के लिए सबसे commonly us
-
Tkinter का उपयोग करके Window Resize पर Buttons Dynamically Resize करें
Python में GUI-based applications बनाने और develop करने के लिए कई rich libraries हैं। Tkinter GUI-based applications बनाने के लिए सबसे commonly used Python libraries में से एक है। इसमें widgets add करने और एप्लिकेशन बनाने के लिए आवश्यक अन्य necessary attributes जैसी कई features हैं। Button एक widget
-
Python Tkinter Application का Functional Testing का अच्छा उदाहरण
मान लीजिए हमारे पास एक GUI-based Python tkinter application है जो user से text input लेता है और इसे new text file में save करके validate करता है। File में वही text input होता है जो user ने type किया है। हम file से user input check और validate कर सकते हैं। Functional Testing में, हम primarily backend
-
Tkinter में Simple Message Box कैसे Create करें?
Tkinter एप्लिकेशन बनाने और develop करने के लिए एक लोकप्रिय Python library है। इसमें विभिन्न methods और functions हैं जिनका उपयोग एप्लिकेशन में multiple features add करने के लिए किया जा सकता है। Tkinter का उपयोग करके, हम dialogue boxes और अन्य widgets बना सकते हैं। इस लेख में, हम देखेंगे कि कैसे एक s
-
Tkinter Window Close कैसे करें?
Tkinter का उपयोग करके एप्लिकेशन बनाना आसान है लेकिन कभी-कभी, title bar पर button के बिना window या frame को close करना मुश्किल हो जाता है। ऐसे cases में, हम window close करने के लिए .destroy() method का उपयोग कर सकते हैं। चूंकि tkinter attributes एक-दूसरे से independent हैं, हम button का उपयोग करके
-
Tkinter का उपयोग करके Automatically Updating GUI कैसे बनाएं?
Tkinter का उपयोग करके, हम GUI बना सकते हैं जिसे auto-updation के लिए configure किया जा सकता है। इस उद्देश्य के लिए, हम GUI-based clocks बनाएंगे जो time बदलने पर automatically refresh हो जाएंगे। हम clock को day और TimeZone के साथ display करेंगे। पहले, हम notebook में tkinter library import करेंगे, फि