Python file handling

Python file handling

8th - 11th Grade

10 Qs

quiz-placeholder

Similar activities

FILE HANDLING - Plenary

FILE HANDLING - Plenary

10th Grade

10 Qs

Word Processing- Microsoft Word

Word Processing- Microsoft Word

10th Grade

10 Qs

File Management: File Types

File Management: File Types

8th - 9th Grade

10 Qs

Chapter 4 PowerPoint Vocab

Chapter 4 PowerPoint Vocab

9th - 12th Grade

11 Qs

Multimedia

Multimedia

8th - 9th Grade

15 Qs

Gmail Quiz

Gmail Quiz

9th - 10th Grade

15 Qs

AP CSP MCQ Review Session 2 Quiz

AP CSP MCQ Review Session 2 Quiz

10th Grade

11 Qs

2.6 - Compression

2.6 - Compression

9th - 10th Grade

10 Qs

Python file handling

Python file handling

Assessment

Quiz

Computers

8th - 11th Grade

Medium

Created by

Kevin Johnson

Used 203+ times

FREE Resource

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

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?