
File Handling in Python

Quiz
•
Computers
•
12th Grade
•
Medium
indirajith G
Used 4+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is file handling in Python?
Process of working with files in Python
Method of creating files in Python
Process of deleting files in Python
Technique of renaming files in Python
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to open a file for reading in Python?
load
read
start
open
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default mode of opening a file in Python?
a
r
w
x
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which mode is used to open a file for writing in Python?
x
r
w
a
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which mode is used to open a file for appending in Python?
a
x
w
r
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to read the contents of a file in Python?
open
close
write
read
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? file = open('data.txt', 'r') print(file.read()) file.close()
The file 'data.txt' does not exist.
The contents of the 'data.txt' file will be printed.
An error will occur because the file is not opened in read mode.
The code will print the file object instead of its contents.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
ASESMEN SUMATIF FILE DAN FOLDER

Quiz
•
7th Grade - University
19 questions
Crash Course Computer Science #20 - Files & File Systems

Quiz
•
9th - 12th Grade
15 questions
File Types and Formats Quiz

Quiz
•
8th Grade - University
19 questions
CFU 3.3 - File Extensions

Quiz
•
9th - 12th Grade
13 questions
Linux File Paths & Navigation

Quiz
•
12th Grade
15 questions
MS Excel - Managing Workbooks and Worksheets

Quiz
•
12th Grade
18 questions
7. Linux_chmod_2

Quiz
•
11th Grade - University
16 questions
Python programming

Quiz
•
6th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade