Python file handling

Python file handling

8th - 11th Grade

10 Qs

quiz-placeholder

Similar activities

HTML (3CS)

HTML (3CS)

10th - 11th Grade

10 Qs

Data Validation

Data Validation

KG - Professional Development

11 Qs

การตัดต่อวีดิโอเบื้องต้น

การตัดต่อวีดิโอเบื้องต้น

8th Grade

10 Qs

Cascading Style Sheets

Cascading Style Sheets

8th - 12th Grade

11 Qs

Nhập môn HTML

Nhập môn HTML

6th - 9th Grade

13 Qs

11° Evaluación bimestral de informática

11° Evaluación bimestral de informática

11th Grade

15 Qs

HTML TABLE BASIC

HTML TABLE BASIC

10th Grade

10 Qs

Databases

Databases

11th Grade

15 Qs

Python file handling

Python file handling

Assessment

Quiz

Computers

8th - 11th Grade

Practice Problem

Medium

Created by

Kevin Johnson

Used 224+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the last action that must be performed on a file?

Close
Save
End
Write

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the data type of data read to and from a file?

String

Integer

Real

Boolean

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Reading from a file often involves using...

A loop

A condition

Comments

A print() statement

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Appending to a file means adding extra data into the file.

True
False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this code do?

opens a text file, reads the contents and prints to the screen

opens a text file and writes the variable 'record' to the file

opens a text file and prints 'record' to the screen

opens a text file and prints it out

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What escape character is used to make a new line?

\t

\r

\n

\newline

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the correct Python code to get the number of items in a list named 'scores'

len(scores)

length(scores)

scores.len()

10

Access all questions and much more by creating a free account

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?