Important Notice:
File Processing in Python
1 / 64
To open a file c:\scores.txt for writing, we use ____________लिखने के लिए c:\scores.txt फ़ाइल खोलने के लिए, हम ____________ का उपयोग करते हैं
2 / 64
What is unpickling?अनपिकलिंग क्या है?
3 / 64
the …….method returns our current position (in number of bytes).…….विधि हमारी वर्तमान स्थिति (बाइट्स की संख्या में) लौटाती है।
4 / 64
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?import syssys.stdout.write(' Hello\n')sys.stdout.write('Python\n')
5 / 64
What will be the output of the following Python code? (If entered name is sanfoundry)निम्नलिखित पायथन कोड का आउटपुट क्या होगा? (यदि नाम sanfoundry दर्ज किया गया है)import sysprint 'Enter your name: ',name = ''while True: c = sys.stdin.read(1) if c == '\n': break name = name + c
print 'Your name is:', name
6 / 64
Is it possible to create a text file in python?क्या पायथन में टेक्स्ट फ़ाइल बनाना संभव है?
7 / 64
How do you get the current position within the file?आप फ़ाइल में वर्तमान स्थिति कैसे प्राप्त करेंगे?
8 / 64
What is the use of “a” in file handling?फ़ाइल हैंडलिंग में “a” का क्या उपयोग है?
9 / 64
Which of the following mode will refer to binary data?निम्नलिखित में से कौन सा मोड बाइनरी डेटा को संदर्भित करेगा?
10 / 64
How do you get the name of a file from a file object (fp)?आप फ़ाइल ऑब्जेक्ट (fp) से फ़ाइल का नाम कैसे प्राप्त करते हैं?
11 / 64
To open a file c:\scores.txt for reading, we use _____________पढ़ने के लिए फ़ाइल c:\scores.txt खोलने के लिए, हम _____________ का उपयोग करते हैं
12 / 64
Which is/are the basic I/O connections in file?फ़ाइल में मूल I/O कनेक्शन कौन सा है/हैं?
13 / 64
How do you delete a file?आप किसी फ़ाइल को कैसे हटाते हैं?
14 / 64
which one of the following is not attributes of file?निम्नलिखित में से कौन-सा एक फ़ाइल की विशेषता नहीं है?
15 / 64
To read the next line of the file from a file object infile, we use ____________फ़ाइल ऑब्जेक्ट इनफ़ाइल से फ़ाइल की अगली पंक्ति पढ़ने के लिए, हम ____________ का उपयोग करते हैं
16 / 64
Which function is used to write all the characters?सभी कैरेक्टर्स को लिखने के लिए किस फंक्शन का उपयोग किया जाता है?
17 / 64
method is used to display entire contents of the fileफ़ाइल की संपूर्ण सामग्री प्रदर्शित करने के लिए विधि का उपयोग किया जाता है
18 / 64
what is the current syntax of remove() a file?किसी फ़ाइल को remove() करने का वर्तमान सिंटैक्स क्या है?
19 / 64
Which function is used to read single line from file?फ़ाइल से सिंगल लाइन पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
20 / 64
Which of the following is not a valid attribute of a file object (fp)?निम्नलिखित में से कौन सा फ़ाइल ऑब्जेक्ट (fp) की वैध विशेषता नहीं है?
21 / 64
How do you close a file object (fp)?आप फ़ाइल ऑब्जेक्ट (fp) को कैसे बंद करते हैं?
22 / 64
which of the following is correct to identify the right way to close a fileकिसी फ़ाइल को बंद करने का सही तरीका पहचानने के लिए निम्न में से कौन सा सही है
23 / 64
if argument is 0, thenयदि argument 0 है, तो
24 / 64
which of the following mode will refer to binary data?निम्नलिखित में से कौन सा मोड बाइनरी डेटा को संदर्भित करेगा?
25 / 64
To read two characters from a file object infile, we use ____________ फ़ाइल ऑब्जेक्ट से दो अक्षर पढ़ने के लिए, हम ____________ का उपयोग करते हैं
26 / 64
f.seek(0) is used tof.seek(0) का प्रयोग किया जाता है
27 / 64
correct syntax of file.writelines() is?file.writelines() का सही सिंटैक्स क्या है?
28 / 64
Which function is used to read all the characters?सभी अक्षरों को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
29 / 64
Which of the following is not a valid mode to open a file?निम्नलिखित में से कौन सा फ़ाइल खोलने का वैध तरीका नहीं है?
30 / 64
What is the current syntax of remove() a file?किसी फ़ाइल को remove() करने का वर्तमान सिंटैक्स क्या है?
31 / 64
which function is used to read single line from file?फ़ाइल से सिंगल लाइन पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
32 / 64
What is the use of tell() method in python?पायथन में tell() विधि का उपयोग क्या है?
33 / 64
What will be the output of the following Python code? निम्नलिखित पायथन कोड का आउटपुट क्या होगा?f = Nonefor i in range (5): with open("data.txt", "w") as f: if i > 2: breakprint(f.closed)
34 / 64
What happens if no arguments are passed to the seek function?यदि सीक फ़ंक्शन को कोई argument नहीं दिया जाता है तो क्या होगा?
35 / 64
What is the difference between r+ and w+ modes?r+ और w+ मोड के बीच क्या अंतर है?
36 / 64
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?str = input("Enter your input: ");print "Received input is : ", str
37 / 64
How do you rename a file?आप किसी फ़ाइल का नाम कैसे बदलते हैं?
38 / 64
What is the pickling?pickling क्या है?
39 / 64
Which one of the following is not attributes of file?निम्नलिखित में से कौन सी फ़ाइल की विशेषता नहीं है?
40 / 64
What is the use of truncate() method in file?फ़ाइल में truncate() विधि का उपयोग क्या है?
41 / 64
The readlines() method returns ____________readlines() विधि ____________ लौटाती है
42 / 64
Which are the two built-in functions to read a line of text from standard input, which by default comes from the keyboard? मानक इनपुट से पाठ की एक पंक्ति को पढ़ने के लिए दो अंतर्निहित फ़ंक्शन कौन से हैं, जो डिफ़ॉल्ट रूप से कीबोर्ड से आते हैं?
43 / 64
the most basic task involved in file manipulation are:फ़ाइल मैनिपुलेशन में शामिल सबसे बुनियादी कार्य हैं:
44 / 64
What is the use of “w” in file handling?फ़ाइल हैंडलिंग में "w" का क्या उपयोग है?
45 / 64
What is the use of seek() method in files?फ़ाइलों में seek() विधि का उपयोग क्या है?
46 / 64
What is the correct syntax of open() function?open() फ़ंक्शन का सही सिंटैक्स क्या है?
47 / 64
to open a file c:/akitsolution.txt for reading, we usec:/akitsolution.txt फ़ाइल को पढ़ने के लिए खोलने के लिए, हम उपयोग करते हैं
48 / 64
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?fo = open("foo.txt", "rw+")print "Name of the file: ", fo.name
# Assuming file has following 5 lines# This is 1st line# This is 2nd line# This is 3rd line# This is 4th line # This is 5th line
for index in range(5): line = fo.next() print "Line No %d - %s" % (index, line)
# Close opened filefo.close()
49 / 64
To read the entire remaining contents of the file as a string from a file object infile, we use ____________फ़ाइल ऑब्जेक्ट इनफ़ाइल से फ़ाइल की संपूर्ण शेष सामग्री को एक स्ट्रिंग के रूप में पढ़ने के लिए, हम ____________ का उपयोग करते हैं
50 / 64
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?str = raw_input("Enter your input: ");print "Received input is : ", str
51 / 64
Correct syntax of file.writelines() is?File.writelines() का सही सिंटैक्स क्या है?
52 / 64
To read the remaining lines of the file from a file object infile, we use ____________ फ़ाइल ऑब्जेक्ट इनफ़ाइल से फ़ाइल की शेष पंक्तियों को पढ़ने के लिए, हम ____________ का उपयोग करते हैं
53 / 64
To open a file c:\scores.txt for appending data, we use ____________डेटा जोड़ने के लिए c:\scores.txt फ़ाइल खोलने के लिए, हम ____________ का उपयोग करते हैं
54 / 64
Which function is used to write a list of string in a file?किसी फ़ाइल में स्ट्रिंग की सूची लिखने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
55 / 64
What is the current syntax of rename() a file?किसी फ़ाइल का नाम बदलने (rename()) का वर्तमान सिंटैक्स क्या है?
56 / 64
Which of the following are the modes of both writing and reading in binary format in file?निम्नलिखित में से कौन-से फ़ाइल में बाइनरी प्रारूप में लिखने और पढ़ने के तरीके हैं?
57 / 64
Which of the following statements are true?निम्नलिखित में से कौन से कथन सत्य हैं?
58 / 64
In file handling, what does this terms means “r, a”?फ़ाइल हैंडलिंग में, इस शब्द " r, a " का क्या अर्थ है?
59 / 64
How do you change the file position to an offset value from the start?आप फ़ाइल की स्थिति को प्रारंभ से ही ऑफसेट मान में कैसे बदलते हैं?
60 / 64
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?fo = open("foo.txt", "wb")print "Name of the file: ", fo.namefo.flush()fo.close()
61 / 64
what is the value stored in sys.argv[0]?sys.argv[0] में संग्रहीत मान क्या है?
62 / 64
which of the following mode argument is used to truncate?निम्नलिखित में से कौन सा मोड तर्क ट्रंकेट करने के लिए उपयोग किया जाता है?
63 / 64
Which function is used to close a file in python?पायथन में फ़ाइल को बंद करने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
64 / 64
Correct syntax of file.readlines() is?File.readlines() का सही सिंटैक्स क्या है?
Your score is
The average score is 54%
Restart quiz