Solved - O Level Python Paper July 2024
कोड की कौन सी पंक्ति 'grapes' की key और 15 के value के साथ fruits dictionary में एक आइटम को सही ढंग से जोड़ती है?
Which line of code correctly adds an item to the fruits dictionary with a key of ‘grapes’ and a value of 15?
fruits = {'apples': 1, 'bananas': 4, 'pears': 17, 'oranges': 14}
[A] fruits['grapes']
[B] fruits['grapes'] = 15
[C] insert 'grapes' in fruits
[D] fruits[15] = 'grapes'
Correct Answer : fruits['grapes'] = 15
नीचे दिए गए कोड का आउटपुट क्या है?
What is the output of below code?
print(3-2*2*3+99/11)
[A] 0.0
[B] 3
[C] 9
[D] -3
Correct Answer : 0.0
क्या पायथन कोड संकलित या व्याख्यायित है?
Is python code compiled or interpreted?
[A] Python is only interpreted.
[B] Both compiled and interpreted.
[C] Neither compiled or interpreted
[D] Python code is oy compiled
Correct Answer : Both compiled and interpreted.
एल्गोरिथम का वह भाग जिसे निश्चित संख्या में बार-बार दोहराया जाता है, को इस प्रकार वर्गीकृत किया गया है
Part of algorithm which is repeated for fixed number of times is classified as
[A] Iteration
[B] Function
[C] Conditional
[D] Generate Options
Correct Answer : Iteration
फ़ंक्शन pow(x,y,z) का मूल्यांकन इस प्रकार किया जाता है:
The function pow(x,y,z) is evaluated as:
[A] (x**y)**z
[B] (x**y) / z
[C] (x**y) % z
[D] (x**y)*z
Correct Answer : (x**y) % z
________एक डेटा फ़ाइल है।
________is a data file.
[A] Binary File
[B] Text file
[C] Both Binary File and Text file
[D] None of the mentioned
Correct Answer : Both Binary File and Text file
________ फ़ंक्शन अपने तर्क को एक संशोधित आकार के साथ लौटाता है, जबकि ________ विधि सरणी को ही संशोधित करती है।
The ________ function returns its argument with a modified shape, whereas the ________ method modifies the array itself.
[A] reshape, resize
[B] resize, reshape
[C] reshape2, resize
[D] all of the mentioned
Correct Answer : reshape, resize
श्रृंखला डेटा प्रकार ______________ धारण कर सकता है।
Series data type can hold ______________.
[A] Dimensional data
[B] 2 dimensional data
[C] 3 dimensional data
[D] None of the above
Correct Answer : Dimensional data
कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट 'f‟ है)?
Which statement will return one line from a file (file object is 'f‟) ?
[A] f.readlines()
[B] f.readline()
[C] f.read()
[D] f.line()
Correct Answer : f.readline()
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
import sys
sys.stdout.write('Welcome\n')
sys.stdout.write('All\n')
[A] Welcome All
[B] welcome All
[C] Compilation Error
[D] Runtime Error
Correct Answer : Welcome All
बाइनरी फ़ाइल डेटा को पढ़ने के लिए ___________ फ़ंक्शन का उपयोग किया जाता है।
To read binary files data ___________ function is used.
[A] read()
[B] readdata()
[C] dump()
[D] load()
Correct Answer : load()
पायथन का _____ मोड टाइप किए गए स्टेटमेंट का तुरंत परिणाम देता है।
The _____ mode of Python gives instant result of typed statement.
[A] Interactive mode
[B] Script mode
[C] Combination of interactive and script modes
[D] All of these
Correct Answer : Interactive mode
निर्देश द्वारा प्रदर्शित आउटपुट क्या होगा print(String[-3]), यदि String="Programming and Problem Solving through Python"?
What will be the output displayed by the instruction, print(String[-3]), if String="Programming and Problem Solving through Python"?
[A] t
[B] h
[C] and
[D] Solving
Correct Answer : h
निम्नलिखित स्यूडोकोड का आउटपुट क्या होगा, जहां ^ XOR ऑपरेशन का प्रतिनिधित्व करता है?
What will be the output of the following pseudocode, where ^ represent XOR operation?
Integer a, b, c
Set b=5,a=1
c=a^b
print c
[A] 4
[B] 5
[C] 3
[D] 7
Correct Answer : 4
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?
>>>t1 = (1, 2, 4, 3)
>>>t2 = (1, 2, 3, 4)
>>>t1 < t2
[A] True
[B] False
[C] Error
[D] None
Correct Answer : False
प्रोग्रामिंग भाषाओं के रूप में दर्शाया गया एक एल्गोरिदम है
An algorithm represented in the form of programming languages is
[A] Flowchart
[B] Pseudo code
[C] Program
[D] None of the above
Correct Answer : Program
यदि list1=[10,20,30], तो ऑपरेशन list1*2 _____ लौटाता है।
if list1=[10,20,30], then operation list1*2 returns _____.
[A] [10,20,30,10,20,30]
[B] [20,40,60]
[C] [10,20,30,20,40,60]
[D] None
Correct Answer : [10,20,30,10,20,30]
निम्नलिखित में से कौन सा भाव 0.5 नहीं देगा?
Which of the following expressions will not yield 0.5?
[A] 1 // 2
[B] 1/2
[C] None
[D] 2/4
Correct Answer : 1 // 2
एक स्ट्रिंग x=”hello” दी गई है तो x.count('l') का आउटपुट क्या है?
Given a string x=”hello” What is the output of x.count(‘l’) ?
[A] 2
[B] 1
[C] 0
[D] none
Correct Answer : 2
पायथन नामक निर्माण का उपयोग करके रनटाइम पर अज्ञात कार्यों के निर्माण का समर्थन करता है
Python supports the creation of anonymous functions at runtime, using a construct called
[A] pi
[B] anonymous
[C] lambda
[D] None of the mentioned
Correct Answer : lambda
list1 में तत्व (5) जोड़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
Which function is used to add an element (5) in the list1 ?
[A] list1.sum(5)
[B] list1.add(5)
[C] list1.append(5)
[D] list1.addelement(5)
Correct Answer : list1.append(5)
निम्नलिखित में से कौन dictionary में कुंजी "tiger" के लिए कुंजी-मूल्य जोड़ी को हटा देगा?
Which of the following will delete the key-value pair for the key "tiger" in the dictionary?
dic = {"lion":"wild", "tiger":"wild", "cat":"domestic", "dog":"domestic"}
[A] del dic["tiger"]
[B] dic["tiger"].delete()
[C] delete(dic["tiger"])
[D] del(dic["tiger"])
Correct Answer : del dic["tiger"]
पायथन एरे पर कौन सा कार्य किया जा सकता है?
What task can be performed on python array?
[A] Indexing
[B] Slicing
[C] Sum
[D] all of the above
Correct Answer : all of the above
full() फ़ंक्शन को पास होने के लिए न्यूनतम 2 तर्कों की आवश्यकता होती है।
full() function requires 2 arguments minimum to pass in it.
[A] True
[B] False
[C] Null
[D] None of the above
Correct Answer : True
फोरट्रान का अर्थ है:
FORTRAN stands for:
[A] For Editing
[B] For Translation
[C] Formula Translator
[D] Formal Translator
Correct Answer : Formula Translator
निम्नलिखित में से कौन सा पायथन में एक कीवर्ड नहीं है?
Which of the following is not a keyword in Python ?
[A] eval
[B] assert
[C] nonlocal
[D] pass
Correct Answer : eval
पायथन में एक फ़ंक्शन या विधि घोषित करने के लिए कौन सा कीवर्ड उपयोग किया जाता है?
Which keyword is used to declare a function or method in Python?
[A] def
[B] del
[C] return
[D] assert
Correct Answer : def
ufuncs में प्रयुक्त बफ़र का आकार निर्धारित करता है
sets the size of the buffer used in ufuncs
[A] setsize(size)
[B] bufsize(size)
[C] setbufsize(size)
[D] size(size)
Correct Answer : setbufsize(size)
2+2**3/2 के मूल्यांकन का परिणाम क्या है?
What is the result of evaluating 2 + 2 ** 3 / 2?
[A] 4
[B] 6
[C] 4.0
[D] 0
Correct Answer : 6
डेटा किस प्रकार का है:
What type of data is :
arr = [(1, 1), (2, 2), (3, 3)]
[A] List of tuples
[B] Tuples of lists
[C] Array of tuples
[D] Invalid type
Correct Answer : List of tuples
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
print(sum(1,2,3))
[A] Error
[B] 6
[C] 1
[D] 3
Correct Answer : Error
फ़ाइल खोलने के विवरण में निम्नलिखित में से कौन सा मोड फ़ाइल मौजूद नहीं होने पर त्रुटि उत्पन्न करता है या उत्पन्न करता है?
Which of the following mode in file opening statement results or generates an error if the file does not exist?
[A] a+
[B] r+
[C] w+
[D] None of the above
Correct Answer : r+
कैरेक्टर के प्रत्येक बाइट को _______ में उसके ASCII मान के रूप में संग्रहीत किया जाता है
Each byte of character is stored as its ASCII value in _______
[A] Hexadecimal
[B] Binary
[C] Decimal
[D] Octal
Correct Answer : Hexadecimal
निम्नलिखित में से कौन प्रोग्रामिंग कोड को लाइन दर लाइन निष्पादित करता है?
Which of the following executes the programming code line by line?
[A] Compiler
[B] Interpreter
[C] Executer
[D] Translator
Correct Answer : Interpreter
निम्नलिखित में से कौन सा फ़ाइल खोलने का सही तरीका नहीं है?
Which of the following is not a correct mode to open a file?
[A] ab
[B] rw
[C] a+
[D] r+
Correct Answer : ab
नेमस्पेस का क्रम क्या है जिसमें पायथन एक पहचानकर्ता की तलाश करता है?
What is the order of namespaces in which Python looks for an identifier?
[A] Python first searches the built-in namespace, then the global namespace and finally the local namespace
[B] Python first searches the built-in namespace, then the local namespace and finally the global namespace
[C] Python first searches the local namespace, then the global namespace and finally the built-in namespace
[D] Python first searches the global namespace, then the local namespace and finally the built-in namespace
Correct Answer : Python first searches the local namespace, then the global namespace and finally the built-in namespace
पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है?
Which statement is correct to import all modules from the package?
[A] from package import all
[B] from package import *
[C] from package include all
[D] from package include *
Correct Answer : from package import *
आप किसी फ़ाइल ऑब्जेक्ट (एफपी) को कैसे बंद करते हैं?
How do you close a file object (fp)?
[A] close(fp)
[B] fclose(fp)
[C] fp.close()
[D] fp.__close__()
Correct Answer : fp.close()
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
a = {1: "A", 2: "B", 3: "C"}
b = {4: "D", 5: "E"}
a.update(b)
print(a)
[A] {1: 'A', 2: 'B', 3: 'C'}
[B] {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
[C] Error
[D] {4: 'D', 5: 'E'}
Correct Answer : {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
यदि str='Information' तो आउटपुट क्या होगा: print (str[2:8])
If str="Information " then what will be the output: print (str[2:8])
[A] "formati"
[B] "for"
[C] "formati"
[D] "format"
Correct Answer : "format"
सभी अक्षरों को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
Which function is used to read all the characters?
[A] readall()
[B] read()
[C] readcharacters()
[D] readchar()
Correct Answer : read()
निम्नलिखित में से कौन सा विकल्प सही है?
Which of the following options is correct?
[A] The default mode in text file is r
[B] The default mode in text file is r+
[C] The default mode in text file is w
[D] The default mode in text file is rw
Correct Answer : The default mode in text file is r
जब हम किसी फ़ाइल को read मोड में खोलने का प्रयास करते हैं जो मौजूद नहीं है तो निम्नलिखित में से कौन सी त्रुटि वापस आती है?
Which of the following error is returned when we try to open a file in read mode which does not exist ?
[A] File Found Error
[B] File Not Exist Error
[C] File Not Found Error
[D] None of the above
Correct Answer : File Not Found Error
यदि seek फ़ंक्शन में कोई arguments पारित नहीं किया जाता है तो क्या होगा?
What happens if no arguments are passed to the seek function?
[A] file position is set to the start of file
[B] file position is set to the end of file
[C] file position remains unchanged
[D] error
Correct Answer : error
पायथन की तकनीकी ताकत क्या है/हैं?
What is/are technical strength of python ?
[A] Portable
[B] Interpreted
[C] Embeddable
[D] All of these
Correct Answer : All of these
निम्नलिखित पायथन अभिव्यक्ति का मूल्य क्या होगा?
What will be the value of the following Python expression?
4+2**5//10
[A] 3
[B] 7
[C] 77
[D] 0
Correct Answer : 7
किसी समस्या को चरण दर चरण हल करने के तरीके को __________ कहा जाता है।
The way for solving a problem step by step is known as __________.
[A] Design
[B] Planning
[C] Algorithm
[D] Execution
Correct Answer : Algorithm
फ़ाइल ऑब्जेक्ट इनफ़ाइल से फ़ाइल की संपूर्ण शेष सामग्री को एक स्ट्रिंग के रूप में पढ़ने के लिए, हम ____________ का उपयोग करते हैं
To read the entire remaining contents of the file as a string from a file object infile, we use ____________
[A] infile.read(2)
[B] infile.read()
[C] infile.readline()
[D] infile.readlines()
Correct Answer : infile.read()
निम्नलिखित में से कौन सा पायथन टपल है?
Which of the following is a Python tuple?
[A] [1, 2, 3]
[B] (1, 2, 3)
[C] {1, 2, 3}
[D] {}
Correct Answer : (1, 2, 3)
जब हम फ़ाइल को एपेंड मोड में खोलते हैं तो फ़ाइल पॉइंटर फ़ाइल के _________ पर होता है।
When we open file in append mode the file pointer is at the _________ of the file.
[A] anywhere in between the file
[B] end
[C] beginning
[D] second line of the file
Correct Answer : end
seek() में, मान _______________ वर्तमान फ़ाइल स्थिति पर संदर्भ बिंदु निर्धारित करता है।
In seek(), value _______________ sets the reference point at the current file position.
[A] 0
[B] 1
[C] 2
[D] 3
Correct Answer : 1
पायथन मानक लाइब्रेरी में कौन सा मॉड्यूल कमांड लाइन से प्राप्त विकल्पों को पार्स करता है?
Which module in the python standard library parses options received from the command line?
[A] getopt
[B] os
[C] getarg
[D] main
Correct Answer : getopt
पिप का मतलब पाइथॉन क्या है?
What does pip stand for python?
[A] Pip Installs Python
[B] Pip Installs Packages
[C] Preferred Installer Program
[D] All of the mentioned
Correct Answer : Preferred Installer Program
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
i = 2
while True:
if i%3 == 0:
break
print(i,end=" " )
i += 2
[A] 2 4 6 8 10 ..
[B] 2 4
[C] 2 3
[D] error
Correct Answer : 2 4
फ़ंक्शन कॉल में उपयोग किए गए पहचानकर्ताओं की सूची को कहा जाता है
The list of identifiers used in a function call is called
[A] actual parameter(s)
[B] formal parameter(s)
[C] value parameter(s)
[D] type parameter(s)
Correct Answer : actual parameter(s)
अभिव्यक्ति का मूल्यांकन करें (9//4*3-6*3//4)
Evaluate the expression (9//4*3-6*3//4)
[A] 4
[B] 3
[C] 5
[D] 2
Correct Answer : 2
फ़्लोचार्ट का प्राथमिक उद्देश्य क्या है?
What is the primary purpose of a flowchart?
[A] To write computer programs
[B] To provide a visual representation of an algorithm
[C] To create graphical designs
[D] To manage computer hardware
Correct Answer : To provide a visual representation of an algorithm
एक विस्तृत फ्लोचार्ट को कहा जाता है
A detailed flow chart is called as______?
[A] stack
[B] macro
[C] micro
[D] union
Correct Answer : micro
एक प्रोग्राम जो उच्च स्तरीय भाषा प्रोग्राम निष्पादित कर सकता है।
A program that can execute high-level language programs.
[A] Compiler
[B] Interpreter
[C] Sensor
[D] Circuitry
Correct Answer : Compiler
निम्नलिखित कथन में 'f' क्या है?
What is ‘f’ in the following statement ?
f=open(“Data.txt”, “r”)
[A] File Name
[B] File Handle (file object/file pointer)
[C] Mode of file
[D] File Handling
Correct Answer : File Handle (file object/file pointer)
पुनरावृत्ति एक की पुनरावृत्ति है
Iteration is the repetition of a
[A] Statement
[B] Block of statements
[C] Operator
[D] Both a and b
Correct Answer : Both a and b
__________ वर्तमान लूप पुनरावृत्ति को तुरंत समाप्त कर देता है।
_________ immediately terminates the current loop iteration.
[A] break
[B] pass
[C] continue
[D] None of these
Correct Answer : break
निम्नलिखित में से कौन सा वर्ण CSV फ़ाइल में डिफ़ॉल्ट सीमांकक के रूप में कार्य करता है?
Which of the following characters act as default delimiter in a CSV file?
[A] (colon) :
[B] (hyphen) –
[C] (comma),
[D] (vertical line) |
Correct Answer : (comma),
निम्नलिखित में से कौन सा मॉड्यूलर प्रोग्रामिंग का लाभ नहीं है?
Which of the following is not a benefit of modular programming?
[A] It increases program readability
[B] It increases programmer productivity
[C] It allows for the creation of a library of common programming task
[D] It allows one programmer to do the job of many in same time
Correct Answer : It allows one programmer to do the job of many in same time
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following?
import numpy as np
a = np.array([1,5,4,7,8])
a = a + 1
print(a[1])
[A] 4
[B] 5
[C] 6
[D] 7
Correct Answer : 6
इस बाइनरी नंबर का मूल्य क्या है? 101001
what is value of this binary no. 101001
[A] 40
[B] 41
[C] 42
[D] 43
Correct Answer : 41
फ़्लोचार्ट प्रतिनिधित्व में, निम्नलिखित में से कौन सा प्रतीक इनपुट/आउटपुट को इंगित करता है?
In flowchart representation, which of the following symbols indicates input/output?
[A] Oval
[B] Parallelogram
[C] Diamond
[D] Rectangle
Correct Answer : Parallelogram
सीएसवी का पूर्ण रूप है
The full form of CSV is
[A] Comma Separated Values
[B] Comma Separated Value
[C] Comma Separated Variables
[D] Comma Separate Values
Correct Answer : Comma Separated Value
फ़ंक्शन ब्लॉक _______________ से शुरू होते हैं।
Function blocks begin with the _______________ .
[A] fun
[B] define
[C] def
[D] open
Correct Answer : def
आउटपुट: SMTWTFS [-3:-1]
Output: SMTWTFS [-3:-1]
[A] TW
[B] FS
[C] WT
[D] TF
Correct Answer : TF
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
x=123
for i in x:
print(i)
[A] 1 2 3
[B] 123
[C] Error
[D] None of these
Correct Answer : Error
छद्म कोड को इस नाम से भी जाना जाता है:
Pseudo code is also known as:
[A] Hardware design language
[B] Program design language / False Code
[C] Software design language
[D] Algorithms
Correct Answer : Program design language / False Code
>>> फ्लोट('12.6') का आउटपुट क्या है
What is the output of >>> float('12.6')
[A] 12.6
[B] '12.6'
[C] 12
[D] syntax error
Correct Answer : 12.6
readlines () मेथड रिटर्न करती है __________
The readlines() method returns ____________
[A] str
[B] a list of lines
[C] a list of single characters
[D] a list of integers
Correct Answer : a list of lines
नीचे दिए गए कोड स्निपेट में var का डेटाटाइप क्या होगा?
What will be the datatype of the var in the below code snippet?
var = 10
print(type(var))
var = "Hello"
print(type(var))
[A] str and int
[B] int and int
[C] str and str
[D] int and str
Correct Answer : int and str
पायथन '/' ऑपरेटर हमेशा ऑपरेटर का परिणाम देगा
Python '/' operator will always yield the result of operator
[A] integer
[B] floating point
[C] complex
[D] all of these
Correct Answer : floating point
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
from math import factorial
print(math.factorial(5))
[A] 120
[B] Nothing is printed
[C] Error, method factorial doesn’t exist in math module
[D] Error, the statement should be : print(factorial(5))
Correct Answer : Error, the statement should be : print(factorial(5))
इनमें से कौन सी फ़ाइल की विशेषता नहीं है?
Which one is not the attribute of a file?
[A] softspace
[B] mode
[C] closed
[D] rename
Correct Answer : rename
सूची, टुपल और रेंज डेटा प्रकारों के ___ हैं।
list, tuple, and range are the ___ of Data Types.
[A] Sequence Types
[B] Binary Types
[C] Boolean Types
[D] None of the mentioned above
Correct Answer : Sequence Types
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?
def maximum(x, y):
if x > y:
return x
elif x == y:
return 'The numbers are equal'
else:
return y
print(maximum(2, 3))
[A] 2
[B] 3
[C] The numbers are equal
[D] None of the mentioned
Correct Answer : 3
for एक _________ नियंत्रित लूप है।
for is an _________ controlled loop.
[A] Entry or top tested
[B] Simple
[C] Exit
[D] Middle
Correct Answer : Entry or top tested
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?
if (9 < 0) and (0 < -9):
print("hello")
elif (9 > 0) or False:
print("good")
else:
print("bad")
[A] error
[B] hello
[C] good
[D] bad
Correct Answer : good
tell() विधि का क्या महत्व है?
What is the significance of the tell() method?
[A] tells the path of the file.
[B] tells the current position of the file pointer within the file.
[C] tells the end position within the file.
[D] checks the existence of a file at the desired location.
Correct Answer : tells the current position of the file pointer within the file.
किसी सूची का उल्टा 'L' ज्ञात करने के लिए किसका प्रयोग किया जाता है?
Which one is used to find the reverse of any list 'L?.
[A] reverse(L)
[B] reversed(L)
[C] list(reversed(L))
[D] list(reverse(L))
Correct Answer : list(reversed(L))
पायथन में टुपल में किसी निर्दिष्ट तत्व के सूचकांक को खोजने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?
Which of the following methods is used to find the index of a specified element in a tuple in Python?
[A] index()
[B] find()
[C] search()
[D] locate()
Correct Answer : index()
गलत कथन को इंगित करें:
Point out the incorrect statement:
[A] Both Series and ndarrays can be passed as arguments to Numpy functions.
[B] The major difference between Series and ndarray is that the data is arranged based on label in Series, when Series is operated on.
[C] A DataFrame is similar to a fixed-size dict because you can use the index labels to get and set values.
[D] None of the above.
Correct Answer : A DataFrame is similar to a fixed-size dict because you can use the index labels to get and set values.
पायथन स्क्रिप्ट को निष्पादन योग्य प्रोग्राम में बदलने के लिए किस मॉड्यूल का उपयोग किया जा सकता है?
Which module can be used to convert a Python script into an executable program?
[A] os
[B] py2exe
[C] sys
[D] math
Correct Answer : py2exe
निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
What will be the output of the following Python function?
complex(1+2j)
[A] Error
[B] 1
[C] 2j
[D] 1+2j
Correct Answer : 1+2j
किस ऑपरेटर को सर्वोच्च प्राथमिकता प्राप्त है?
Which operator has highest precedence?
[A] ()
[B] %
[C] |
[D] **
Correct Answer : ()
निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
What will be the output of the following Python code?
sys.stdout.write(' Hello\n')
sys.stdout.write('Python\n')
[A] Compilation Error
[B] Runtime Error
[C] Hello
[D] Hello Python
Correct Answer : Hello Python
आप किसी फ़ाइल का नाम कैसे बदलते हैं?
How do you rename a file?
[A] fp.name = 'new_name.txt'
[B] os.rename(existing_name, new_name)
[C] os.rename(fp, new_name)
[D] os.set_name(existing_name, new_name)
Correct Answer : os.rename(existing_name, new_name)
इनमें से कौन सा फर्श विभाजन है?
Which one of these is floor division?
[A] /
[B] //
[C] %
[D] None of the mentioned
Correct Answer : //
एल्गोरिथम और फ़्लोचार्ट का उपयोग ______ के लिए किया जाता है।
Algorithm and Flowchart used for ______.
[A] Better Programming
[B] Easy testing and debugging
[C] Efficient coding
[D] All of the above.
Correct Answer : All of the above.
आउटपुट क्या होगा:
What will be the output:
print(7//2)
print(7/2)
[A] 3 and 3.5
[B] 3.5 and 3
[C] 7 and 2
[D] 3 and 2
Correct Answer : 3 and 3.5
आउटपुट क्या होगा: 3*2/+15//7%2
What wil be the output: 3*2/+15//7%2
[A] 1.0
[B] 0.0
[C] 1
[D] 2
Correct Answer : 1.0
यदि x = Math.ldexp(0.5, 1) है तो x का मान क्या है?
What is the value of x if x = math.ldexp(0.5, 1)?
[A] 1
[B] 2.0
[C] 0.5
[D] none of the mentioned
Correct Answer : none of the mentioned
आउटपुट निर्धारित करें:
Determine the output:
for i in range(20, 30, 10) :
j=i/2
print(j)
[A] 10 15
[B] 10.0 15.0
[C] 10.0
[D] None of these
Correct Answer : 10.0
इस अभिव्यक्ति का आउटपुट क्या है, 3*1**3?
What is the output of this expression, 3*1**3?
[A] 27
[B] 9
[C] 3
[D] 1
Correct Answer : 3
किसी पहचानकर्ता की अधिकतम संभव लंबाई क्या है?
What is the maximum possible length of an identifier?
[A] 16
[B] 32
[C] 64
[D] None of These
Correct Answer : None of These
निम्नलिखित में से कौन सा डेटा प्रकार पायथन में समर्थित नहीं है?
Which of the following data types is not supported in python?
[A] Number
[B] String
[C] List
[D] Slice
Correct Answer : Slice