Computer Fundamentals — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye

📚 2941 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
2941 questions
2251
EN + हिं Easy
GB What does len([1,2,3,4,5]) return in Python?
IN पायथन में len([1,2,3,4,5]) क्या लौटाता है?
A
4 4
B
5 5
C
6 6
D
3 3
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) len() returns the number of items in a sequence; [1,2,3,4,5] has 5 elements.
व्याख्या (हिन्दी) लेन() एक क्रम में वस्तुओं की संख्या लौटाता है; [1,2,3,4,5] में 5 तत्व हैं।
2252
EN + हिं Medium
GB Python dictionary key must be?
IN पायथन डिक्शनरी कुंजी होनी चाहिए?
A
String डोरी
B
Integer पूर्णांक
C
Immutable (string, int, tuple) अपरिवर्तनीय (स्ट्रिंग, इंट, टुपल)
D
Any type किसी भी प्रकार का
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Dictionary keys must be hashable (immutable): strings, integers, tuples are valid; lists are not.
व्याख्या (हिन्दी) शब्दकोश कुंजियाँ धोने योग्य (अपरिवर्तनीय) होनी चाहिए: स्ट्रिंग्स, पूर्णांक, टुपल्स मान्य हैं; सूचियाँ नहीं हैं.
2253
EN + हिं Medium
GB Which Python keyword is used to handle exceptions?
IN अपवादों को संभालने के लिए किस पायथन कीवर्ड का उपयोग किया जाता है?
A
catch पकड़ना
B
except के अलावा
C
handle सँभालना
D
error गलती
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Python uses try/except (not try/catch) for exception handling.
व्याख्या (हिन्दी) अपवाद प्रबंधन के लिए पायथन प्रयास/छोड़कर (कोशिश/पकड़ नहीं) का उपयोग करता है।
2254
EN + हिं Easy
GB What is the output of print(type(3.14)) in Python?
IN पायथन में print(type(3.14)) का आउटपुट क्या है?
A
<class 'int'> <class 'int'>
B
<class 'float'> <class 'float'>
C
<class 'double'> <class 'double'>
D
<class 'decimal'> <class 'decimal'>
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 3.14 is a floating-point literal, so type() returns .
व्याख्या (हिन्दी) 3.14 एक फ़्लोटिंग-पॉइंट शाब्दिक है, इसलिए type() रिटर्न देता है।
2255
EN + हिं Medium
GB Python's 'pass' statement?
IN पायथन का 'पास' कथन?
A
Exits program प्रोग्राम से बाहर निकलें
B
Does nothing — placeholder for empty code block कुछ नहीं करता - खाली कोड ब्लॉक के लिए प्लेसहोल्डर
C
Passes to next function अगले फ़ंक्शन में चला जाता है
D
Skips iteration पुनरावृत्ति छोड़ देता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 'pass' is a null operation used as a placeholder where code is syntactically required but no action needed.
व्याख्या (हिन्दी) 'पास' एक शून्य ऑपरेशन है जिसका उपयोग प्लेसहोल्डर के रूप में किया जाता है जहां कोड को वाक्यात्मक रूप से आवश्यक है लेकिन किसी कार्रवाई की आवश्यकता नहीं है।
2256
EN + हिं Medium
GB Which Python function converts integer to string?
IN कौन सा पायथन फ़ंक्शन पूर्णांक को स्ट्रिंग में परिवर्तित करता है?
A
int() int()
B
float() तैरना()
C
str() str()
D
chr() सीएचआर()
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) str() converts its argument to a string representation.
व्याख्या (हिन्दी) str() अपने तर्क को एक स्ट्रिंग प्रतिनिधित्व में परिवर्तित करता है।
2257
EN + हिं Medium
GB Python range(1,10,2) generates?
IN पायथन रेंज(1,10,2) उत्पन्न करता है?
A
[1,3,5,7,9] [1,3,5,7,9]
B
[1,2,3,4,5,6,7,8,9] [1,2,3,4,5,6,7,8,9]
C
[2,4,6,8,10] [2,4,6,8,10]
D
[1,10,2] [1,10,2]
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) range(start=1, stop=10, step=2) generates: 1,3,5,7,9 (starts at 1, steps by 2, stops before 10).
व्याख्या (हिन्दी) रेंज (प्रारंभ = 1, स्टॉप = 10, चरण = 2) उत्पन्न करता है: 1,3,5,7,9 (1 से शुरू होता है, चरण 2 से, 10 से पहले रुकता है)।
2258
EN + हिं Medium
GB Lambda in Python is?
IN पायथन में लैम्ब्डा है?
A
A for loop लूप के लिए ए
B
An anonymous function defined in one line एक अनाम फ़ंक्शन को एक पंक्ति में परिभाषित किया गया है
C
A class एक वर्ग
D
An import statement एक आयात विवरण
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Lambda creates small anonymous functions: lambda x: x*2 is equivalent to def f(x): return x*2.
व्याख्या (हिन्दी) लैम्ब्डा छोटे अज्ञात फ़ंक्शन बनाता है: लैम्ब्डा x: x*2 def f(x): रिटर्न x*2 के बराबर है।
2259
EN + हिं Easy
GB What does *args in Python function mean?
IN पायथन फ़ंक्शन में *args का क्या अर्थ है?
A
Keyword arguments खोजशब्द तर्क
B
Variable number of positional arguments as tuple टपल के रूप में स्थितीय तर्कों की परिवर्तनीय संख्या
C
Array argument सरणी तर्क
D
All required args सभी आवश्यक तर्क
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) *args allows a function to accept any number of positional arguments, collected into a tuple.
व्याख्या (हिन्दी) *args किसी फ़ंक्शन को टपल में एकत्रित किसी भी संख्या में स्थितीय तर्कों को स्वीकार करने की अनुमति देता है।
2260
EN + हिं Medium
GB **kwargs in Python?
IN **पायथन में क्वार्ग्स?
A
Double multiplication दोहरा गुणा
B
Variable number of keyword arguments as dictionary शब्दकोश के रूप में कीवर्ड तर्कों की परिवर्तनीय संख्या
C
Key-value function कुंजी-मूल्य फ़ंक्शन
D
Two argument arrays दो तर्क सारणी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) **kwargs allows a function to accept any number of keyword arguments, collected into a dictionary.
व्याख्या (हिन्दी) **kwargs किसी फ़ंक्शन को शब्दकोश में एकत्रित किसी भी संख्या में कीवर्ड तर्कों को स्वीकार करने की अनुमति देता है।
2261
EN + हिं Medium
GB Python decorator is used to?
IN पायथन डेकोरेटर का उपयोग किया जाता है?
A
Decorate output आउटपुट को सजाएं
B
Wrap a function to modify or extend its behavior without changing its code किसी फ़ंक्शन का कोड बदले बिना उसके व्यवहार को संशोधित या विस्तारित करने के लिए उसे लपेटें
C
Create classes कक्षाएं बनाएं
D
Format strings स्ट्रिंग्स को प्रारूपित करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Decorators wrap functions with additional behavior using @decorator syntax before function definition.
व्याख्या (हिन्दी) डेकोरेटर फ़ंक्शन परिभाषा से पहले @decorator सिंटैक्स का उपयोग करके अतिरिक्त व्यवहार के साथ फ़ंक्शन को लपेटते हैं।
2262
EN + हिं Medium
GB Generator in Python uses which keyword?
IN पायथन में जेनरेटर किस कीवर्ड का उपयोग करता है?
A
return वापस करना
B
yield उपज
C
generate उत्पन्न
D
produce उत्पादन करना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) yield makes a function a generator — it produces values lazily without storing all in memory.
व्याख्या (हिन्दी) यील्ड एक फ़ंक्शन को जनरेटर बनाता है - यह मेमोरी में सभी को संग्रहीत किए बिना आलस्य से मान उत्पन्न करता है।
2263
EN + हिं Medium
GB Python 'with' statement is used for?
IN पायथन 'विथ' स्टेटमेंट का उपयोग किसके लिए किया जाता है?
A
Conditional logic सशर्त तर्क
B
Context management — automatically handles resource cleanup (close files) संदर्भ प्रबंधन - स्वचालित रूप से संसाधन सफ़ाई को संभालता है (फ़ाइलें बंद करें)
C
While loops जबकि लूप्स
D
Function calls फ़ंक्शन कॉल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 'with' statement ensures proper resource management (opening/closing files) via context managers.
व्याख्या (हिन्दी) 'with' कथन संदर्भ प्रबंधकों के माध्यम से उचित संसाधन प्रबंधन (फ़ाइलें खोलना/बंद करना) सुनिश्चित करता है।
2264
EN + हिं Easy
GB What does __init__ method do in Python class?
IN पायथन क्लास में __init__ विधि क्या करती है?
A
Initializes the module मॉड्यूल को प्रारंभ करता है
B
Constructor — initializes a new object instance's attributes कंस्ट्रक्टर - एक नए ऑब्जेक्ट इंस्टेंस की विशेषताओं को आरंभ करता है
C
Deletes objects ऑब्जेक्ट हटाता है
D
Imports modules मॉड्यूल आयात करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) __init__ is the constructor method called automatically when a new class instance is created.
व्याख्या (हिन्दी) __init__ कंस्ट्रक्टर विधि है जिसे एक नया क्लास इंस्टेंस बनाते समय स्वचालित रूप से बुलाया जाता है।
2265
EN + हिं Medium
GB Inheritance in Python is defined as?
IN पायथन में वंशानुक्रम को किस रूप में परिभाषित किया गया है?
A
class Child(Parent): कक्षा बच्चा(अभिभावक):
B
class Child extends Parent: क्लास चाइल्ड माता-पिता का विस्तार करता है:
C
class Child inherits Parent: कक्षा बच्चे को माता-पिता विरासत में मिलते हैं:
D
class Child:Parent: कक्षा बच्चा: अभिभावक:
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Python inheritance syntax: class ChildClass(ParentClass): defines a subclass inheriting from parent.
व्याख्या (हिन्दी) पायथन इनहेरिटेंस सिंटैक्स: क्लास चाइल्डक्लास (पेरेंटक्लास): माता-पिता से विरासत में मिले उपवर्ग को परिभाषित करता है।
2251–2265 of 2941