Search Header Logo

Python L35 File Path

Authored by Future Teacher

Computers

6th - 8th Grade

Used 6+ times

Python L35 File Path
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

Media Image

What does this line do?

Writes a new file called NameList.txt

Deletes a file

Opens an existing file for reading

Opens a folder named Class6A

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does number % 4 mean in the code?

Divide the number by 4 completely

Return the remainder when number is divided by 4

Multiply the number by 4

Check if the number is greater than 4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a relative file path?

C:/Users/Ali/Documents/Class6A/student_names.txt

/Users/Li/Documents/Class6A/student_names.txt

./Class6A/student_names.txt

Class6A:C:/student_names.txt

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What file mode should you use to add names to an existing file without erasing the current content?

'w'

'r'

'a'

'x'

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Absolute file paths always start from the root of your computer.

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Using 'a' mode in open() deletes the file first.

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What’s the difference between a relative file path and an absolute file path?

A relative file path is relative to the current directory, whereas an absolute file path is a complete path from the root.
An absolute file path is always shorter than a relative file path.
A relative file path is the same as an absolute file path.

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?