कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Comparing a list with a range object in Python 3: what does print(list(range(3)) == [0, 1, 2], range(3) == [0, 1, 2]) display?
सही उत्तर: ख) True False
list(range(3)) is the list [0, 1, 2], but a range object is not equal to a list, so the second comparison is False.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = [1, 2, 3]; b = a; a += [4]; print(b) ?
सही उत्तर: क) [1, 2, 3, 4]
For lists, += extends the same list object in place, so b, which refers to it, also shows the new element.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = [1, 2, 3]; b = a; a = a + [4]; print(b) ?
सही उत्तर: घ) [1, 2, 3]
a + [4] creates a new list and rebinds a to it; b still refers to the original list [1, 2, 3].
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print(hex(255), oct(8)) ?
सही उत्तर: ग) 0xff 0o10
hex(255) gives '0xff' and oct(8) gives '0o10' (8 in base 8 is 10).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: from functools import reduce; print(reduce(lambda a, b: a * b, [1, 2, 3, 4])) ?
सही उत्तर: ख) 24
reduce applies the function cumulatively: ((1 x 2) x 3) x 4 = 24.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = 'abc'; print(a[::-1] + a[0]) ?
सही उत्तर: क) cbaa
a[::-1] reverses the string to 'cba', and a[0] is 'a', giving 'cbaa'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: d = {'a': 1, 'b': 2}; print(list(d.items())[1]) ?
सही उत्तर: घ) ('b', 2)
items() yields key-value tuples in insertion order; index 1 is ('b', 2).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: s = {1, 2, 3}; s.add(2); s.add(4); print(len(s)) ?
सही उत्तर: ग) 4
Adding 2 again has no effect because sets hold unique elements; adding 4 gives {1, 2, 3, 4}.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print('Nepal'.ljust(7, '*')) ?
सही उत्तर: ख) Nepal**
ljust(7, '*') left-justifies the string in a field of width 7, filling the remaining 2 places on the right with '*'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Using split() with a maximum split count in Python, what does print('a-b-c'.split('-', 1)) display?
सही उत्तर: क) ['a', 'b-c']
The second argument maxsplit = 1 allows only one split, at the first '-', giving ['a', 'b-c'].
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।