File Handling in Python

File Handling in Python

12th Grade

14 Qs

quiz-placeholder

Similar activities

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

Bài làm việc Access, cấu trúc bảng

Bài làm việc Access, cấu trúc bảng

9th - 12th Grade

10 Qs

Hệ Điều Hành Của Máy Tính

Hệ Điều Hành Của Máy Tính

10th Grade - University

10 Qs

User Interface Design - Topic 1

User Interface Design - Topic 1

12th Grade

15 Qs

3rd week g9 summative

3rd week g9 summative

7th - 12th Grade

15 Qs

Penilaian Harian-1, Pemrograman Berorientasi Objek (PBO)

Penilaian Harian-1, Pemrograman Berorientasi Objek (PBO)

12th Grade

10 Qs

Recap

Recap

12th Grade

10 Qs

Mengenal Jendela dan Ikon Microsoft Excel

Mengenal Jendela dan Ikon Microsoft Excel

7th Grade - University

15 Qs

File Handling in Python

File Handling in Python

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

indirajith G

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is file handling in Python?

Process of working with files in Python

Method of creating files in Python

Process of deleting files in Python

Technique of renaming files in Python

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to open a file for reading in Python?

load

read

start

open

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default mode of opening a file in Python?

a

r

w

x

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which mode is used to open a file for writing in Python?

x

r

w

a

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which mode is used to open a file for appending in Python?

a

x

w

r

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to read the contents of a file in Python?

open

close

write

read

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? file = open('data.txt', 'r') print(file.read()) file.close()

The file 'data.txt' does not exist.

The contents of the 'data.txt' file will be printed.

An error will occur because the file is not opened in read mode.

The code will print the file object instead of its contents.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?