File Handling in Python Quiz

File Handling in Python Quiz

12th Grade

•

50 Qs

quiz-placeholder

Similar activities

Microsoft Excels: Formulas and Functions

Microsoft Excels: Formulas and Functions

12th Grade - University

•

45 Qs

Aplikasi Pengolah Angka (Spreadsheet)

Aplikasi Pengolah Angka (Spreadsheet)

9th - 12th Grade

•

50 Qs

TLJ WIRELESS EDITION TKJ4

TLJ WIRELESS EDITION TKJ4

12th Grade

•

50 Qs

Pemrograman Web

Pemrograman Web

12th Grade

•

50 Qs

Latihan ASTS Genap Kelas IX

Latihan ASTS Genap Kelas IX

9th Grade - University

•

50 Qs

Davinci Resolve 17 Fusion 101

Davinci Resolve 17 Fusion 101

11th Grade - Professional Development

•

45 Qs

Soal HTML & CSS

Soal HTML & CSS

9th - 12th Grade

•

48 Qs

Web Design - Final Exam Review

Web Design - Final Exam Review

9th - 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'

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?