Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- Which of the following is a common text file format used in data science?
a. CSV
b. XLSX
c. ZIP
d. PDF
Answer: a. CSVgeeksforgeeks+1 - What is the primary characteristic of a text file?
a. It stores data in binary format
b. It stores data in human-readable format
c. It can only store numbers
d. It cannot be opened by text editors
Answer: b. It stores data in human-readable formattestbook+1 - Which Python function is used to read the entire contents of a text file as a string?
a. read(n)
b. read()
c. readline()
d. readlines()
Answer: b. read()scribd+1 - Which file mode opens a text file for reading only?
a. ‘r’
b. ‘w’
c. ‘a’
d. ‘r+’
Answer: a. ‘r’techtipnow+1 - Which of the following is NOT a text file format?
a. TXT
b. CSV
c. JSON
d. GIF
Answer: d. GIFtestbook+1 - Which Python function reads one line from a text file?
a. read()
b. readline()
c. readlines()
d. read(n)
Answer: b. readline()studiestoday+1 - What is the default mode for opening a file in Python?
a. ‘a’
b. ‘r’
c. ‘w’
d. ‘x’
Answer: b. ‘r’scribd - Which of the following is a plain-text file type used for data records?
a. DOC
b. XML
c. XLS
d. GIF
Answer: b. XMLinfraexam - Which Python function reads all lines from a text file and returns them as a list?
a. read()
b. readline()
c. readlines()
d. read(n)
Answer: c. readlines()scribd+1 - Which file extension is typically used for plain text files?
a. .csv
b. .txt
c. .xlsx
d. .pdf
Answer: b. .txttestbook+1 - Which of the following is a text file format that stores tabular data?
a. TXT
b. CSV
c. ZIP
d. PDF
Answer: b. CSVgeeksforgeeks+1 - Which Python statement opens a file named “data.txt” for reading?
a. f = open(“data.txt”, “w”)
b. f = open(“data.txt”, “r”)
c. f = open(“data.txt”, “a”)
d. f = open(“data.txt”, “x”)
Answer: b. f = open(“data.txt”, “r”)sanfoundry+1 - What happens when you open a text file in ‘w’ mode?
a. The file is opened for reading
b. The file is opened for writing, and existing content is erased
c. The file is opened for appending
d. The file is opened for both reading and writing
Answer: b. The file is opened for writing, and existing content is erasedtechtipnow+1 - Which of the following is a rich text file format?
a. TXT
b. CSV
c. RTF
d. JSON
Answer: c. RTFtestbook - Which Python function is used to write a string to a text file?
a. write()
b. writelines()
c. readline()
d. read()
Answer: a. write()scribd+1 - Which of the following is a structured text file format?
a. TXT
b. CSV
c. JSON
d. ZIP
Answer: c. JSONinfraexam+1 - Which file mode opens a file for both reading and writing?
a. ‘r’
b. ‘w’
c. ‘a’
d. ‘r+’
Answer: d. ‘r+’studiestoday+1 - Which of the following is a plain-text file format for storing data records?
a. DOC
b. CSV
c. XLS
d. PDF
Answer: b. CSVtestbook+1 - Which Python function closes a file after operations?
a. close()
b. exit()
c. end()
d. finish()
Answer: a. close()studiestoday+1 - Which of the following is a plain-text file format used for web pages?
a. TXT
b. CSV
c. HTML
d. PDF
Answer: c. HTMLgeeksforgeeks+1 - Which Python function reads a specified number of characters from a file?
a. read(n)
b. readline()
c. readlines()
d. write(n)
Answer: a. read(n)scribd+1 - Which file extension is used for comma-separated values?
a. .txt
b. .csv
c. .xlsx
d. .pdf
Answer: b. .csvtestbook+1 - Which of the following is NOT a text file format?
a. TXT
b. CSV
c. JSON
d. MP3
Answer: d. MP3testbook+1 - Which Python function is used to append data to a text file?
a. write()
b. writelines()
c. append()
d. add()
Answer: a. write()techtipnow+1 - Which of the following is a plain-text file format for structured data?
a. TXT
b. CSV
c. JSON
d. ZIP
Answer: c. JSONinfraexam+1 - Which file mode opens a file for appending?
a. ‘r’
b. ‘w’
c. ‘a’
d. ‘r+’
Answer: c. ‘a’techtipnow+1 - Which Python function reads all lines from a file and returns them as a list of strings?
a. read()
b. readline()
c. readlines()
d. read(n)
Answer: c. readlines()studiestoday+1 - Which of the following is a plain-text file format for storing tabular data?
a. TXT
b. CSV
c. XLSX
d. PDF
Answer: b. CSVgeeksforgeeks+1 - Which Python function is used to open a file?
a. open()
b. file()
c. read()
d. write()
Answer: a. open()sanfoundry+1 - Which of the following is a plain-text file format for storing data in a structured way?
a. TXT
b. CSV
c. JSON
d. ZIP
Answer: c. JSONinfraexam+1 - Which file extension is used for plain text files?
a. .txt
b. .csv
c. .xlsx
d. .pdf
Answer: a. .txttestbook+1 - Which Python function is used to write multiple lines to a text file?
a. write()
b. writelines()
c. readline()
d. read()
Answer: b. writelines()scribd+1 - Which of the following is a plain-text file format for storing data records?
a. DOC
b. CSV
c. XLS
d. PDF
Answer: b. CSVtestbook+1 - Which file mode opens a file for reading and writing?
a. ‘r’
b. ‘w’
c. ‘a’
d. ‘r+’
Answer: d. ‘r+’techtipnow+1 - Which Python function is used to read one line from a file?
a. read()
b. readline()
c. readlines()
d. read(n)
Answer: b. readline()studiestoday+1 - Which of the following is a plain-text file format for storing structured data?
a. TXT
b. CSV
c. JSON
d. ZIP
Answer: c. JSONgeeksforgeeks+1 - Which file extension is used for comma-separated values?
a. .txt
b. .csv
c. .xlsx
d. .pdf
Answer: b. .csvtestbook+1 - Which Python function is used to close a file?
a. close()
b. exit()
c. end()
d. finish()
Answer: a. close()scribd+1 - Which of the following is a plain-text file format for storing tabular data?
a. TXT
b. CSV
c. XLSX
d. PDF
Answer: b. CSVgeeksforgeeks+1 - Which Python function is used to open a file for reading?
a. open(“file.txt”, “w”)
b. open(“file.txt”, “r”)
c. open(“file.txt”, “a”)
d. open(“file.txt”, “x”)
Answer: b. open(“file.txt”, “r”)sanfoundry+1 - Which of the following is a plain-text file format for storing structured data?
a. TXT
b. CSV
c. JSON
d. ZIP
Answer: c. JSONinfraexam+1 - Which file extension is used for plain text files?
a. .txt
b. .csv
c. .xlsx
d. .pdf
Answer: a. .txttestbook+1 - Which Python function is used to write a string to a file?
a. write()
b. writelines()
c. readline()
d. read()
Answer: a. write()techtipnow+1 - Which of the following is a plain-text file format for storing data records?
a. DOC
b. CSV
c. XLS
d. PDF
Answer: b. CSVtestbook+1 - Which file mode opens a file for appending?
a. ‘r’
b. ‘w’
c. ‘a’
d. ‘r+’
Answer: c. ‘a’scribd+1 - Which Python function reads all lines from a file and returns them as a list?
a. read()
b. readline()
c. readlines()
d. read(n)
Answer: c. readlines()studiestoday+1 - Which of the following is a plain-text file format for storing tabular data?
a. TXT
b. CSV
c. XLSX
d. PDF
Answer: b. CSVgeeksforgeeks+1 - Which Python function is used to open a file for writing?
a. open(“file.txt”, “w”)
b. open(“file.txt”, “r”)
c. open(“file.txt”, “a”)
d. open(“file.txt”, “x”)
Answer: a. open(“file.txt”, “w”)sanfoundry+1 - Which of the following is a plain-text file format for storing structured data?
a. TXT
b. CSV
c. JSON
d. ZIP
Answer: c. JSONinfraexam+1 - Which file extension is used for plain text files?
a. .txt
b. .csv
c. .xlsx
d. .pdf
Answer: a. .txttestbook+1
- https://www.geeksforgeeks.org/python/commonly-used-file-formats-in-data-science/
- https://testbook.com/question-answer/in-computers-which-of-the-following-file-formats–6484b9ea4c75b4d952327f5c
- https://testbook.com/objective-questions/mcq-on-file-handling-in-python–60014772d624dd545f6b1147
- https://www.scribd.com/document/720394030/100-Text-File-MCQ-Question-Bank-for-Class-12-CBSE-Python
- https://www.studiestoday.com/mcq-computer-science-cbse-class-12-computer-science-text-file-mcqs-492218.html
- https://techtipnow.in/file-handling-python-mcq/
- https://testbook.com/question-answer/select-the-option-that-contains-exclusively-the-te–5edf77f0f60d5d77624df899
- https://www.scribd.com/document/477524354/Chapter5-1TextFileHandling-Set1
- https://infraexam.com/what-are-two-plain-text-file-types-that-are-compatible-with-numerous-applications-and-use-a-standard-method-of-representing-data-records-choose-two/
- https://www.sanfoundry.com/python-mcqs-files-1/
- https://csiplearninghub.com/file-handling-in-python-class-12-mcq/
- https://www.knowledgeboat.com/learn/sumita-arora-python-computer-science-class-12-cbse/solutions/BppzEv/file-handling
- https://www.geeksforgeeks.org/quizzes/python-file-handling-quiz/
- https://www.scribd.com/document/658044915/File-Handling-Mcq-s
- https://www.cs2study.com/wp-content/uploads/2021/03/Text-File-exam-based-questions.pdf
- https://www.youtube.com/watch?v=2ZIX9Yms3k4
- https://www.scribd.com/document/793228771/Text-File-Practice-Questions
- https://www.teachoo.com/21954/4560/Types-of-Files/category/Concepts/