Search Header Logo

UNIT 5-Files and exception Quiz

Authored by DHASAMALIKA S

Computers

1st Grade

Used 1+ times

UNIT 5-Files and exception Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

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?