UNIT 5-Files and exception Quiz

UNIT 5-Files and exception Quiz

1st Grade

10 Qs

quiz-placeholder

Similar activities

Python Text Files Quiz

Python Text Files Quiz

1st Grade

10 Qs

Python file

Python file

1st - 10th Grade

10 Qs

Linux-1-Week 3

Linux-1-Week 3

1st - 5th Grade

14 Qs

Perintah Dasar Linux 1

Perintah Dasar Linux 1

1st Grade

15 Qs

Pembuatan Program Mikrokontroler

Pembuatan Program Mikrokontroler

1st - 10th Grade

13 Qs

Parts of a Microsoft Word Window Vocabulary

Parts of a Microsoft Word Window Vocabulary

1st - 3rd Grade

10 Qs

Python-Partie1

Python-Partie1

1st Grade

10 Qs

Python - Работа со строками и файлами

Python - Работа со строками и файлами

1st - 4th Grade

11 Qs

UNIT 5-Files and exception Quiz

UNIT 5-Files and exception Quiz

Assessment

Quiz

Computers

1st Grade

Hard

Created by

DHASAMALIKA S

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the process of reading data from a file called?

file read

data output

input output

file input

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the process of writing data to a file called?

data typing

file writing

code compiling

file reading

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the different file operations that can be performed in Python?

copying, pasting, moving

printing, scanning, emailing

opening, reading, writing, closing, deleting, and renaming files

searching, sorting, filtering

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you open a file in Python for reading?

open('file.txt', 'w')

open('file.txt', 'a')

open('file.txt', 'x')

open('file.txt', 'r')

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you open a file in Python for writing?

open('filename.txt', 'a')

open('filename.txt', 'x')

open('filename.txt', 'r')

open('filename.txt', 'w')

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you read input from a file in Python?

Using the open() function and write() method

Using the close() function and readlines() method

Using the start() function and readline() method

Using the open() function and read() method

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you write output to a file in Python?

Using the 'read' method with the 'a' mode

Using the 'open' function with the 'w' mode and the 'write' method

Using the 'close' method with the 'r' mode

Using the 'append' method with the 'w' mode

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?