File Handling in Python Quiz

File Handling in Python Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Python File Handling

Python File Handling

12th Grade

15 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Prog. no Des. de Sist. - Poliformismo?

Prog. no Des. de Sist. - Poliformismo?

12th Grade

10 Qs

Python Basic files

Python Basic files

10th - 12th Grade

10 Qs

Recap

Recap

12th Grade

10 Qs

File Handling

File Handling

12th Grade

10 Qs

Computer Science Quiz

Computer Science Quiz

9th - 12th Grade

10 Qs

Gateway Level 3 Python Quiz 3

Gateway Level 3 Python Quiz 3

9th - 12th Grade

15 Qs

File Handling in Python Quiz

File Handling in Python Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Learning VG

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the need for data files in Python?

To store data in RAM

To permanently store data for future use

To erase data when the program is over

To handle small amount of data

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of file stores data in binary format?

JSON file

CSV file

Text file

Binary file

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the file extension for CSV files?

.data

.txt

.csv

.bin

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to open a file in Python?

append()

write()

read()

open()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Binary

Append

Write

Read

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to write a sequence of strings to a file in Python?

readlines()

read()

writelines()

write()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the method used to read a specific number of bytes from a file in Python?

read(n)

readlines()

readline()

readall()

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?