कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is the output of the Python code: print(list(map(lambda x: x % 3, [3, 4, 5]))) ?
सही उत्तर: क) [0, 1, 2]
The lambda is applied to each element: 3 % 3 = 0, 4 % 3 = 1, 5 % 3 = 2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, def f(**k): return sorted(k). What does print(f(b=1, a=2)) display?
सही उत्तर: ग) ['a', 'b']
**k collects keyword arguments into a dict; sorted() on a dict sorts its keys.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, def f(*a): return len(a). What does print(f(1, [2, 3], 'xy')) display?
सही उत्तर: ख) 3
*a collects the three positional arguments into a tuple; the list and string each count as one argument.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, def f(x, y=2): return x ** y. What does print(f(3), f(2, 3)) display?
सही उत्तर: क) 9 8
f(3) uses the default y = 2 giving 9; f(2, 3) gives 2 ** 3 = 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, 7 // 2.0 evaluates to:
सही उत्तर: क) 3.0
Floor division with a float operand returns a float: floor(3.5) = 3.0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What value does Python give for 2 raised to the power -1, written 2 ** -1?
सही उत्तर: ख) 0.5
A negative exponent gives the reciprocal: 2 ** -1 = 1/2 = 0.5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: x = [1, 2, 3]; y = x[:]; y.append(4); print(len(x)) ?
सही उत्तर: क) 3
x[:] creates a new (shallow) copy, so appending to y does not change x.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = [3, 1, 2]; print(a.sort()) ?
सही उत्तर: क) None
list.sort() sorts in place and returns None, so print shows None.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print(sum(range(1, 11, 2))) ?
सही उत्तर: ग) 25
range(1, 11, 2) gives 1, 3, 5, 7, 9, whose sum is 25.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: s = 'python'; print(s[1:-1]) ?
सही उत्तर: ख) ytho
s[1:-1] runs from index 1 up to but not including the last character.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।