Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
Which method reads the next line in a file?
What does the write() method return?
How do you write binary data to a file?
Which statement is correct for reading a file line by line?
What will happen if you open an existing file in 'w' mode?
What does the tell() function return?
Which method moves the file pointer to a specific location?
Which exception is raised for file-related errors?
Which of the following modes will create a file if it doesn’t exist?
How do you check if a file is closed?