कम्प्युटर / सूचना प्रविधि कम्प्युटर अधिकृत (सातौँ तह) – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अधिकृत (सातौँ तह)
Computer Officer – 7th Level · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In Python, after def f(a, L=[]): L.append(a); return L and a first call f(1), what does print(f(2)) display?
सही उत्तर: क) [1, 2]
The default list is created once when the function is defined, so it keeps the 1 from the first call.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by: a = [1, 2, 3]; b = a; b.append(4); print(a) in Python?
सही उत्तर: ख) [1, 2, 3, 4]
b = a makes both names refer to the same list object, so appending through b also changes a.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print(0.1 + 0.2 == 0.3) in Python?
सही उत्तर: क) False
0.1 and 0.2 cannot be stored exactly in binary floating point, so their sum is 0.30000000000000004.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print('Hello'.find('z')) in Python?
सही उत्तर: क) -1
str.find() returns -1 when the substring is not found (index() would raise ValueError).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does chr(66) return in Python?
सही उत्तर: ग) 'B'
chr() converts a Unicode code point to its character; 66 is 'B'. ord() does the reverse.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does bin(10) return in Python?
सही उत्तर: ख) '0b1010'
bin() returns a string with the prefix 0b followed by the binary digits.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the value of int('101', 2) in Python?
सही उत्तर: घ) 5
The second argument is the base, so '101' is read as binary: 4 + 0 + 1 = 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does divmod(17, 5) return in Python?
सही उत्तर: ख) (3, 2)
divmod(a, b) returns (a // b, a % b) = (3, 2).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, the expression -7 % 3 evaluates to:
सही उत्तर: ख) 2
Python's % result takes the sign of the divisor: -7 = 3 x (-3) + 2, so the remainder is 2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The Python programming language was created by:
सही उत्तर: ग) Guido van Rossum
Guido van Rossum released Python in 1991; Ritchie created C, Gosling Java and Stroustrup C++.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।