1) Which method is used to read file line by line a) read() b) readlines() c) readline() d) line() 2) Select the correct method to write a list of lines to a file a) write(list) b) writelines(list) c) writelist(list) 3) Select all true statements when a file is opened using the with statement a) The with statement simplifies exception handling b) The file is automatically closed after leaving the block, and all the resources that are tied up with the file are released. c) File reading and writing are faster using the with statement. 4) Select the correct mode to open a file for appending as well as reading a) a+ b) ar c) rw d) ar+ 5) Select the correct output of the following code :fp.seek(5, 1) a) Move file pointer five characters ahead from the current position. b) Move file pointer five characters ahead from the beginning of a file. c) Move file pointer five characters behind from the current position. d) Move file pointer five characters behind ahead from the end of a file.
0%
python quiz
Delen
Delen
Delen
door
Heyarjun51
Inhoud Bewerken
Afdrukken
Embedden
Meer
Toewijzingen
Scorebord
Meer weergeven
Minder weergeven
Dit scoreboard is momenteel privé. Klik op
Delen
om het publiek te maken.
Dit scoreboard is uitgeschakeld door de eigenaar.
Dit scoreboard is uitgeschakeld omdat uw opties anders zijn dan die van de eigenaar.
Opties Herstellen
Quiz
is een open template. Het genereert geen scores voor een scoreboard.
Inloggen vereist
Visuele stijl
Lettertypen
Abonnement vereist
Opties
Template wisselen
Alles weergeven
Er zullen meer templates verschijnen terwijl je de activiteit gebruikt.
Open resultaten
Kopieer link
QR-code
Verwijderen
Automatisch opgeslagen activiteit "
" herstellen?