1) What is the primary purpose of file handling in Python? a) To create new files b) To manipulate text data c) To organize folders d) To interact with external files and data 2) What is the purpose of the with statement (context manager) when working with files in Python? a) It defines a new function b) It is used for commenting code c) It ensures that the file is properly closed after use d) It allows you to write to a file 3) Which method is used to read a single line from a text file in Python? a) read() b) readlines() c) readline() d) readline(2) 4) What exception might occur when you attempt to open a file that doesn't exist in Python? a) FileNotFoundError b) ValueError c) PermissionError d) TypeError 5) the file object. What is the default value of reference_point? a) 0 b) 1 c) 2 d) 3 6) Which of the following statement is incorrect in the context of binary files? a) Information is stored in the same format as in memory b) No character translation takes place c) Every line ends with a new line character d) pickle module is used for reading and writing 7) of the following option can be used to read all the remaining lines? a) myfile.read() b) myfile.read(n) c) myfile.readline() d) myfile.readlines() 8) Which of the following character acts as default delimiter in a csv file? a) : b) ; c) , d) - 9) Which of the following functions changes the position of file pointer a) flush() b) tell() c) seek() d) offset() 10) The correct syntax of seek() is: a) file_object.seek(offset [, reference_point]) b) seek(offset [, reference_point]) c) seek(offset, file_object) d) seek.file_object(offset)
0%
File Handling in Python
공유
공유
공유
만든이
Dilumariya
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?