कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In Python, what does math.floor(-2.5) return?
सही उत्तर: क) -3
floor returns the greatest integer less than or equal to the number; for -2.5 that is -3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which exception does Python raise when evaluating 5 / 0?
सही उत्तर: ख) ZeroDivisionError
Dividing any number by zero in Python raises ZeroDivisionError.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, writing @log on the line just before def f(): means that:
सही उत्तर: घ) f is replaced by the result of log(f), so log acts as a decorator wrapping f
Decorator syntax is shorthand for f = log(f), letting log add behaviour around f.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In a nested Python function, which keyword lets the inner function rebind a variable belonging to the enclosing (outer) function?
सही उत्तर: क) nonlocal
nonlocal refers to the nearest enclosing function scope; global refers to module-level names.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, what does all([]) return for an empty list?
सही उत्तर: ग) True
all() returns True unless some element is false; an empty iterable has no false element, so the result is True.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, which function makes a fully independent copy of a nested list, including copies of the inner lists?
सही उत्तर: ग) copy.deepcopy()
list.copy(), copy.copy() and a[:] are shallow copies that share inner objects; deepcopy() copies recursively.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
For a = [10, 20, 30, 20] in Python, what is a after a.remove(20)?
सही उत्तर: क) [10, 30, 20]
list.remove(x) deletes only the first occurrence of the value x.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the value of int(-3.9) in Python?
सही उत्तर: ख) -3
int() truncates towards zero, so -3.9 becomes -3 (math.floor would give -4).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print(20 % 3 ** 2) in Python?
सही उत्तर: घ) 2
** has higher precedence than %, so this is 20 % 9 = 2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print([0, 1, 2, 3, 4, 5][::2]) in Python?
सही उत्तर: घ) [0, 2, 4]
A step of 2 with default start and stop takes every second element starting from index 0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।