File Handling in Python Quiz

File Handling in Python Quiz

12th Grade

•

50 Qs

quiz-placeholder

Similar activities

ULANGAN HARIAN TEKNIK PENGOLAHAN AUDIO DAN VIDEO

ULANGAN HARIAN TEKNIK PENGOLAHAN AUDIO DAN VIDEO

1st - 12th Grade

•

50 Qs

Intro to Computing Midterms

Intro to Computing Midterms

12th Grade

•

50 Qs

UH ORIENTASI DASAR TEKNIK JARINGAN KOMPUTER DAN TELEKOMUNIKASI

UH ORIENTASI DASAR TEKNIK JARINGAN KOMPUTER DAN TELEKOMUNIKASI

10th Grade - University

•

50 Qs

Latihan ASAS GASAL 2425

Latihan ASAS GASAL 2425

9th - 12th Grade

•

52 Qs

WARNA DAN TIPOGRAFI DESAIN GRAFIS

WARNA DAN TIPOGRAFI DESAIN GRAFIS

1st Grade - University

•

50 Qs

Adobe Photoshop

Adobe Photoshop

10th Grade - Professional Development

•

50 Qs

Sec-D  Javascript-1

Sec-D Javascript-1

12th Grade - University

•

52 Qs

quizz scratch

quizz scratch

12th Grade

•

50 Qs

File Handling in Python Quiz

File Handling in Python Quiz

Assessment

Quiz

•

Computers

•

12th Grade

•

Practice Problem

•

Easy

Created by

Shabnam pusa

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to open a file in Python?

fileopen()

open()

fopen()

readfile()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default mode in which a file is opened using open()?

write

append

read

exclusive

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will file.read() return?

A list of lines

The entire file content as a string

One character

Nothing

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method reads only a single line from the file?

read()

readline()

readlines()

line()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to read all lines in a file as a list?

read()

readline()

readlines()

all()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does file.write("Hello") do?

Reads Hello from file

Writes Hello to file

Appends Hello

Deletes Hello

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which mode is used to write to a file (overwriting if exists)?

'r'

'a'

'w'

'rw'

Create a free account and access millions of resources

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?