File Processing
seek() method file object की current position को return करता है ?
seek() method returns the current position of the file object?
फाइल को पाइथन में ओपन करने के लिए लैंग्वेज फंक्शन का प्रयोग किया जाता है।
Language function is used to open the file in Python.
यदि हम फ़ाइल खोलते समय फ़ाइल मोड निर्दिष्ट नहीं करते हैं, तो फ़ाइल मोड में खुलेगी
If we do not specify the file mode while opening the file, the file will open in
निम्नलिखित में से किस फ़ंक्शन का उपयोग फ़ाइल में स्ट्रिंग्स की सूची/list of string लिखने के लिए किया जाता है?
Which of the following functions is used to write a list of strings to a file?
________एक डेटा फ़ाइल है।
________is a data file.
Correct Answer: C) Both Binary File and Text file
श्रृंखला डेटा प्रकार ______________ धारण कर सकता है।
Series data type can hold ______________.
बाइनरी मोड में डेटा लिखने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
Which function is used to write data in binary mode ?
शिव पायथॉन प्रोग्राम का उपयोग करके अपने ग्राहक का डेटा संग्रहीत करना चाहता है। डेटा संग्रहीत करने का सर्वोत्तम तरीका सुझाएं?
Shiv wants to store the data of his customer using the python program. Suggest the best way to store the data?
CSV फ़ाइलों तक पहुँचा जा सकता है
The CSV files can be accessed by
निम्नलिखित में से कौन सा कथन बाइनरी फ़ाइलों के लिए सही है?
Which of the following statement is correct for binary files?
निम्नलिखित में से फ़ाइलों का कौन सा प्रारूप पायथन प्रोग्राम के माध्यम से प्रोग्रामेटिक रूप से बनाया जा सकता है?
Which of the following format of files can be created programmatically through python program?
राम ने एक निश्चित मोड में एक फाइल खोली। फाइल खोलने के बाद वह मोड भूल गया। उस मोड के बारे में दिलचस्प तथ्य हैं "यदि फ़ाइल मौजूद नहीं है, तो एक नई फ़ाइल बनाई जाएगी" और "उस मोड में फ़ाइल खोलने के बाद फ़ाइल का हैंडल फ़ाइल के अंत में होगा" उसे सही की पहचान करने में मदद करें तरीका।
Ram opened a file in a certain mode. After opening the file, he forgot the mode. The interesting facts about that mode are " If the file doesn't exist, then a new file will be created" and "After opening file in that mode the file handle will be at the end of the file" Help him to identify the correct mode.
एक फ़ाइल c:\scores.txt को पढ़ने के लिए खोलने के लिए, हम _____________ का उपयोग करते हैं
To open a file c:\scores.txt for reading, we use _____________
फाइल ऑब्जेक्ट इनफाइल से स्ट्रिंग के रूप में फाइल की पूरी बची हुई सामग्री को पढ़ने के लिए हम __________ का प्रयोग करते हैं।
To read the entire remaining contents of the file as a string from a file object infile, we use ____________
रीडलाइन्स () मेथड रिटर्न करती है __________
The readlines() method returns ____________
ओपन () फ़ंक्शन एक फ़ाइल ऑब्जेक्ट लौटाता है जिसे ______________ कहा जाता है
open( ) function returns a file object called ______________
पायथन मॉड्यूल __________ फ़ाइल एक्सटेंशन वाली एक फ़ाइल है जिसमें वैध पायथन कोड होता है।
A Python module is a file with the __________ file extension that contains valid Python code.
किसी पैकेज की सुविधाओं तक पहुँचने के लिए किस कीवर्ड का उपयोग किया जाता है?
Which keyword is used for accessing the features of a package?
sys.stdout.write(“ABC”) जो मॉड्यूल है
sys.stdout.write(“ABC”) who is module
इनमें से कौन सी परिभाषा मॉड्यूल का सही वर्णन करती है?
Which of these definitions correctly describes a module ?
पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है?
Which statement is correct to import all modules from the package ?
पायथन के लिए निम्नलिखित में से कौन सा पर्यावरण चर पायथन दुभाषिया को बताता है कि प्रोग्राम में आयातित मॉड्यूल फ़ाइलों का पता कहाँ लगाना है?
Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program ?
निम्नलिखित फ़ाइल प्रबंधन कार्यों को उचित क्रम में व्यवस्थित करें:
Arrange the following file handling operations in proper order:
A) Close the file
B) Perform operations on file
C) Opening the file रीडलाइन() विधि क्या लौटाती है?
What does readlines() method return ?
निम्नलिखित में से कौन सा फ़ाइल खोलने का सही तरीका नहीं है?
Which of the following is not a correct mode to open a file?
किसी फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:
The syntax used to rename a file :
यदि हम किसी फ़ाइल को राइट मोड में खोलते हैं और फ़ाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?
If we open a file in write mode and file does not exists, which of the error will generate ?
फ़ाइल ऑब्जेक्ट इनफ़ाइल से फ़ाइल की शेष पंक्तियों को पढ़ने का कार्य कौन सा है?
Which is the function to read the remaining lines of the file from a file object infile ?
निम्नलिखित में से कौन सा अमान्य मोड है?
Which of the following is an invalid mode ?
कथन 3 के लिए उत्तर चुनें.
Choose the answer for statement 3.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4 रवि ने ओपन() फ़ंक्शन का उपयोग करके पायथन में एक फ़ाइल खोली लेकिन मोड निर्दिष्ट करना भूल गया। फ़ाइल किस मोड में खुलेगी?
Ravi opened a file in python using open( ) function but forgot to specify the mode. In which mode the file will open ?
कौन सा कथन फ़ाइल पॉइंटर को वर्तमान स्थिति से 10 बाइट्स पीछे ले जाएगा?
Which statement will move file pointer 10 bytes backward from current position ?
कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट „f‟ है)?
Which statement will return one line from a file (file object is „f?) ?
यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फ़ाइल बनाता है?
Which mode creates a new file if the file does not exist ?
पायथन में कौन सा फ़ंक्शन फ़ाइल खोलता है?
Which function opens file in python ?
निम्नलिखित में से कौन सी फाइल किसी टेक्स्ट एडिटर में खोली जा सकती है?
Which of the following file can be opened in any text editor ?
फ़ाइल में निम्नलिखित में से कौन सा मूल I/O कनेक्शन है?
Which of the following is the basic I/O connections in file ?
seek() का सिंटैक्स है:
The syntax of seek() is:
file_object.seek(offset [, reference_point])
What does the reference_point indicate? इनमें से कौन सी फ़ाइल की विशेषता नहीं है?
Which one is not the attribute of a file?
कौन सा फ़ंक्शन दो तर्क लेता है?
Which of the function takes two arguments ?
f.read(5) एक फ़ाइल (फ़ाइल ऑब्जेक्ट 'f') से __________ पढ़ेगा।
f.read(5) will read __________ from a file (file object ‘f’).
निम्नलिखित में से कौन फ़ाइल की संपूर्ण सामग्री (फ़ाइल ऑब्जेक्ट 'f') को पढ़ेगा?
Which of the following will read entire content of file (file object ‘f’) ?
निम्नलिखित में से किसमें डेटा स्थायी रूप से संग्रहीत किया जाता है?
In which of the following, data is stored permanently ?
__________ फ़ंक्शन फ़ाइल पॉइंटर की वर्तमान स्थिति लौटाता है।
__________ function returns the current position of file pointer.
यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फ़ाइल बनाता है?
Which mode creates a new file if the file does not exist ?
निम्नलिखित कथन में 'f' क्या है?
What is ‘f’ in the following statement ?
f=open(“Data.txt”, “r”) एक _____________ जानकारी को ASCII या यूनिकोड वर्णों की एक धारा के रूप में संग्रहीत करता है अर्थात मानव पठनीय।
A _____________ stores information in the form of a stream of ASCII or unicode characters i.e. human readable.
कौन सा कथन फ़ाइल पॉइंटर को shuru स्थिति से 10 बाइट्स aage ले जाएगा?
Which statement will move file pointer 10 bytes forward from begnining position ?