File Handling & IO

File Handling & IO

7th Grade

22 Qs

quiz-placeholder

Similar activities

แบบทดสอบ การเขียนโปรแกรมเบื้องต้น

แบบทดสอบ การเขียนโปรแกรมเบื้องต้น

6th - 7th Grade

20 Qs

RobotC Review

RobotC Review

7th - 8th Grade

25 Qs

Control Panel Quiz

Control Panel Quiz

5th Grade - Professional Development

20 Qs

What about technology? - Codeweek 2022

What about technology? - Codeweek 2022

5th - 11th Grade

20 Qs

Midterm Exam Review

Midterm Exam Review

5th Grade - University

20 Qs

 Sistem Operasi macOS

Sistem Operasi macOS

7th Grade

19 Qs

98-366 Lesson 5 TCP/IP in the Command Line

98-366 Lesson 5 TCP/IP in the Command Line

KG - University

17 Qs

ict

ict

6th - 8th Grade

19 Qs

File Handling & IO

File Handling & IO

Assessment

Quiz

Computers

7th Grade

Medium

Created by

MrsT Voci

Used 1+ times

FREE Resource

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does file handling in Python allow you to do?

Access and modify files on your computer

Create new programming languages

Design websites

Play video games

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a text file?

A file that contains only formatted information

A file with images and videos

A file used exclusively for Python programming

A file that has only information in it without any formatting

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the first step to read a file in Python?

Print the file

Delete the file

Open the file

Rename the file

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which mode do you use to open a file for reading in Python?

w

a

r

wb

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'read()' function do?

Deletes the contents of a file

Reads all the text in a file

Writes text to a file

Closes the file

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you read only part of a file?

Deleting parts of the file first

Opening the file in 'write' mode

By specifying the number of characters in the 'read()' function

Using the 'write()' function

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'readline()' function do?

Reads one line from the file

Writes a new line in the file

Deletes a line from the file

Reads the entire file at once

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?