File Handling in Python

File Handling in Python

12th Grade

14 Qs

quiz-placeholder

Similar activities

Python File Handling

Python File Handling

12th Grade

15 Qs

file handling

file handling

12th Grade

12 Qs

Basics of Python

Basics of Python

9th - 12th Grade

12 Qs

Διαχείριση Αρχείων στην Python

Διαχείριση Αρχείων στην Python

12th Grade

12 Qs

Binary files in Python

Binary files in Python

12th Grade

13 Qs

KM4 Mock

KM4 Mock

7th - 12th Grade

10 Qs

Mengenal Sistem Operasi Linux

Mengenal Sistem Operasi Linux

9th - 12th Grade

12 Qs

Python Beginner

Python Beginner

12th Grade

10 Qs

File Handling in Python

File Handling in Python

Assessment

Quiz

Computers

12th Grade

Medium

Created by

indirajith G

Used 4+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?