Computer Science · Exception Handling
एक आईटी व्यवस्थापक total_users को active_users से विभाजित करता है। यदि active_users 0 के बराबर है, तो प्रोग्राम क्रैश हो जाता है। कौन सा तंत्र इस विशिष्ट रनटाइम त्रुटि को सुचारू रूप से संभाल सकता है?
- 1active_users को None का मान निर्दिष्ट करना
- 2विभाजन ऑपरेशन्स से पूरी तरह बचना
- 3त्रुटि को लॉग करने के लिए प्रिंट स्टेटमेंट का उपयोग करना
- 4ZeroDivisionError को पकड़ने के लिए try-except ब्लॉक का उपयोग करना✓
सही उत्तर देखें
ZeroDivisionError को पकड़ने के लिए try-except ब्लॉक का उपयोग करना
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Exception Handling?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Exception Handling