XamBaaz
Log in

File Handling in Python — Class 12 MCQs with Answers

Class 12 CBSE Computer Science · Chapter 3

30 practice questions · 30 Medium · Updated

Jump to the 2 solved questions

Practise the most important Class 12 CBSE Computer Science questions from Chapter 3, "File Handling in Python". You get 3 timed quizzes made from 30 NCERT-based MCQs, with answers and explanations. The questions are split into 30 Medium. Warm up on the basics, then move on to the exam-level questions that top scorers in CBSE Board exams get right.

To score well in "File Handling in Python", focus on logic, syntax and computational thinking. Each MCQ here is timed and uses exam-style marking (+4 correct, −1 wrong, 0 skipped). This helps you stay accurate when time is short, just as real papers need. Every question has a short explanation, so a wrong answer becomes a quick lesson. It is the fastest way to fix gaps before a test.

Use this chapter for focused revision. Start with the Easy set to check your basics on File Handling in Python, then move to Medium to practise applying them. Your accuracy, streaks and XP save automatically. This chapter also adds to your overall Class 12 Computer Science mastery score. Try the 2 sample questions below: tap an option to see the answer and a worked explanation. Sign in free to start practising.

File Handling in Python — important questions & MCQs with answers (Class 12 Computer Science)

2 solved questions from this chapter's difficulty levels, each with its answer and explanation. Tap an option to check yourself.

0 of 2 answered

  1. Q1 of 2Medium

    The method used to write a single string to a file is:

    Show answer

    Answer: write()

    Explanation: write() takes a string as its argument and writes it to the file, while writelines() writes a sequence of strings.

  2. Q2 of 2Medium

    For a file containing three lines, read() with no argument returns:

    Show answer

    Answer: The whole file as a single string

    Explanation: read() with no argument returns the entire remaining contents of the file as one string.

Start this chapter free

You have 2 to try above. Sign in with Google (no card needed). You get 1 Easy + 1 Medium quiz on every chapter, free for good (up to 6 quizzes a day) — plus a free Hard quiz when you score 70%+ on a Medium quiz (1 per subject).

This chapter has 30 questions (30 Medium), with timed scoring and instant feedback. The rest unlock with the ₹1,999/year plan.

Start with the questions above. The full quiz opens here after.

File Handling in Python — FAQs

What does Class 12 Computer Science Chapter 3 (File Handling in Python) cover on XamBaaz?+

It has 30 NCERT-based MCQs on "File Handling in Python": 30 Medium. Together they make 3 timed quizzes, and you never get the same set twice. Every question has an instant explanation. They help you prepare for CBSE Board exams.

Are these "File Handling in Python" questions free to practise?+

Yes. Sign in with Google to practise "File Handling in Python" free. Full unlimited access is ₹1,999/year. One year from the day you pay. Class 12 is your last school year, so your class stays as it is. No chapter is charged separately.

How should I revise "File Handling in Python" for the exam?+

Start with the Easy quiz to check your basics, then try Medium to practise applying them. There are 3 timed quizzes on this chapter, so you can come back for a fresh set instead of one you have seen. Read each explanation, retry the questions you miss, and track your accuracy until it stays high.

Are these "File Handling in Python" MCQs available with answers?+

Yes. 2 sample questions are on this page with answers: tap an option, or "Show answer", to see the correct option and a step-by-step explanation. Sign in free with Google to start practising, with instant scoring.

Is there negative marking in the "File Handling in Python" quizzes?+

Yes. The timed quizzes use exam-style marking: +4 for a right answer, −1 for a wrong one and 0 for a skip. MHT-CET and CBSE board papers have no negative marking. Our mocks for those are scored their way.

What are the important questions from File Handling in Python (Class 12 Computer Science)?+

This page shows 2 solved important MCQs with answers and explanations. Sign in to practise all 30 questions on the chapter as timed quizzes.

Is there an online quiz for File Handling in Python?+

Yes — Class 12 Computer Science File Handling in Python has timed online quizzes at Medium levels, with instant scoring and a worked explanation on every question. The first quiz on the chapter is free.

Are there question answers and extra questions for File Handling in Python (Class 12 Computer Science)?+

Yes. This page has 2 solved questions on File Handling in Python, each with the correct answer and a short explanation. Sign in to practise all 30 questions on the chapter as timed quizzes.

More Class 12 Computer Science chapters

Class 12 — other subjects

← All Class 12 Computer Science chapters
🦅 One new exam question every day on Instagram — Follow @xambaaz