Class 11 Computer Science Chapter 6 File Handling Quiz 48 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the difference between 'read()' and 'readlines()' methods?
2. Load function of pickle module is used to
3. What method is used to read all lines from a text file?
4. What is a binary file in Python?
5. Which function is used to read all lines from a text file into a list?
6. The contents of a csv file "sample.csv" are shown below:sno, name, age1, Amit, 122, Harsh, 133, Vivek, 21
7. What is the standard input stream in Python?
8. What is the first index of an array?
9. What is the advantage of using CSV files?
10. Which operator is used in python to import all modules from package
11. Which method is used to close a file in Python?
12. Which of the following function do you use to write data in the binary file?
13. Which method is used to delete a file in Python?
14. Which one of the following methods is responsible for sending the query to the database?
15. How do you delete a file in Python?
16. Rashil is working on a project that involves analyzing sales data stored in a CSV file. Which Python module should he primarily use for handling these CSV files?
17. How do you properly close a file after performing operations on it in Python?
18. 6 What is the last action that must be performed while working with the files?
19. How can you check if a file exists before trying to open it?
20. Existing data is kept intact when append is use to write to a file
21. (1) which do we use to output information to a file opened under w/a mode? (2) what data type does it accept as an argument?
22. Which of the following is method for testing whether the specified element is a file or a directory?
23. The ..... statement means to place the file pointer at 30 bytes behind(backward direction) from end of file.
24. Which file extension is used for a plain text file?
25. To iterate through an array in a file, I would use