File Handling "A1" 1 / 50 r+ और w+ में फर्क? कोई नहीं r+ append करता r+ truncate करता w+ truncate करता है, r+ नहीं 2 / 50 r mode में write करने पर? io.UnsupportedOperation error data truncate write हो जाता append हो जाता 3 / 50 File का end check करने का तरीका? file.last EOF flag none read() == "" 4 / 50 Which reads fixed number of characters? readlines() readall() readline() read(n) 5 / 50 file.write() अगर string न हो तो? TypeError Warning ignore convert कर देगा 6 / 50 Python में folder create करने के लिए? file.mkdir mk.folder() os.mkdir() os.folder() 7 / 50 कौन सा method binary data write करता है? write() write() bytes में writebin() writeline() 8 / 50 open(“my.txt”, “wb”) में wb का मतलब? write + text write + append write + truncate write + binary 9 / 50 JSON लिखने के लिए file mode? a w x r 10 / 50 file.seek(0) pointer को कहाँ ले जाता है? end middle random start 11 / 50 Text mode default encoding? ASCII UTF-16 ANSI UTF-8 12 / 50 with open() का फायदा? auto indent auto formatting auto closing auto saving 13 / 50 Which method removes a file? file.remove() remove.file() os.remove() delete.file 14 / 50 w+ mode file… truncate + read/write दोनों करता append + read करता only read करता नहीं खोलता 15 / 50 r+ mode error कब देगा? file बड़ी हो file मौजूद न हो write ज्यादा हो कभी नहीं 16 / 50 write() return क्या करता है? True/False content none number of characters written 17 / 50 Which mode allows writing only at end? r w r+ a 18 / 50 image पढ़ने के लिए कौन सा mode? rb ab w r 19 / 50 binary mode में file खोलने के लिए suffix क्या होगा? .bin b=1 'b' -b 20 / 50 tell() function क्या करता है? encoding बताता है current pointer position बताता है errors बताता है file name बताता है 21 / 50 File pointer को move करने के लिए? move() skip() jump() seek() 22 / 50 Which method reads all lines into list? readline() read() readlines() get() 23 / 50 readline() क्या return करता है? dictionary single line including n list सारे lines 24 / 50 a mode file pointer कहाँ होता है? beginning middle कहीं भी end 25 / 50 w mode file का data? read करता है कुछ नहीं करता truncate करता है (सारा data मिटा देता है) append करता है 26 / 50 Which mode allows both reading and writing? r w a r+ 27 / 50 file.close() क्यों जरूरी है? speed बढ़ाने के लिए resources free करने के लिए कोई फर्क नहीं पड़ता readability बढ़ाने के लिए 28 / 50 read() function क्या return करता है? list dict int string 29 / 50 कौन सा mode नई file बनाता है और existing file होने पर error देता है? x r+ a w 30 / 50 Python में file open करने का default mode क्या है? x r w a 31 / 50 Text mode default encoding? ASCII UTF-16 ANSI UTF-8 32 / 50 with open() का फायदा? auto indent auto formatting auto closing auto saving 33 / 50 Which method removes a file? file.remove() remove.file() os.remove() delete.file 34 / 50 Which method removes a file? os.remove() file.remove() delete.file remove.file() 35 / 50 w+ mode file… नहीं खोलता only read करता append + read करता truncate + read/write दोनों करता 36 / 50 r+ mode error कब देगा? file मौजूद न हो कभी नहीं write ज्यादा हो file बड़ी हो 37 / 50 write() return क्या करता है? True/False content none number of characters written 38 / 50 Which mode allows writing only at end? w a r r+ 39 / 50 image पढ़ने के लिए कौन सा mode? ab rb w r 40 / 50 binary mode में file खोलने के लिए suffix क्या होगा? .bin b=1 . 'b' -b 41 / 50 tell() function क्या करता है? file name बताता है encoding बताता है errors बताता है current pointer position बताता है 42 / 50 File pointer को move करने के लिए? jump() seek() skip() move() 43 / 50 readline() क्या return करता है? list dictionary single line including n सारे lines 44 / 50 a mode file pointer कहाँ होता है? beginning middle कहीं भी end 45 / 50 w mode file का data? read करता है कुछ नहीं करता truncate करता है (सारा data मिटा देता है) append करता है 46 / 50 Which mode allows both reading and writing? r+ w a r 47 / 50 file.close() क्यों जरूरी है? speed बढ़ाने के लिए readability बढ़ाने के लिए कोई फर्क नहीं पड़ता resources free करने के लिए 48 / 50 read() function क्या return करता है? dict string int list 49 / 50 कौन सा mode नई file बनाता है और existing file होने पर error देता है? a r+ x w 50 / 50 Python में file open करने का default mode क्या है? r x a w Your score isThe average score is 0% 0% Restart quiz