T-Level DPDD: File Handling Quiz

T-Level DPDD: File Handling Quiz

11th Grade

14 Qs

quiz-placeholder

Similar activities

Records and Files

Records and Files

8th - 11th Grade

15 Qs

Python file handling

Python file handling

8th - 11th Grade

10 Qs

SLR05.3 Open or Closed?

SLR05.3 Open or Closed?

9th Grade - University

16 Qs

Writing files in python

Writing files in python

9th - 12th Grade

13 Qs

Python Text Files

Python Text Files

10th - 11th Grade

14 Qs

Linux-2 Quiz 2 -- LAMP

Linux-2 Quiz 2 -- LAMP

1st - 12th Grade

15 Qs

String Manipulation (Python)

String Manipulation (Python)

9th - 12th Grade

17 Qs

Reading & writing to a text file (Python)

Reading & writing to a text file (Python)

9th - 12th Grade

14 Qs

T-Level DPDD: File Handling Quiz

T-Level DPDD: File Handling Quiz

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Sara Burton

Used 2+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a mode for opening files in Python?

Append

Create

Delete

Read

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Python notation for opening a file in text mode?

"t"

"r"

"w"

"b"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

"a"

"x"

"r"

"w"

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the "r" mode in Python do?

Opens a file for appending

Opens a file for writing

Opens a file for reading

Creates a new file

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the function used to open a file in Python?

read()

write()

open()

create()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the "a" mode in Python do?

Opens a file for reading

Opens a file for writing

Opens a file for appending

Creates a new file

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to open a file named "practicefile.txt" for reading in Python?

h = open("practicefile.txt", "w")

h = open("practicefile.txt", "r")

h = open("practicefile.txt", "a")

h = open("practicefile.txt", "x")

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?