Python L35 File Path

Python L35 File Path

6th - 8th Grade

10 Qs

quiz-placeholder

Similar activities

Comp Viruses

Comp Viruses

6th - 9th Grade

10 Qs

Perangkat Lunak (Software) dan Fiturnya

Perangkat Lunak (Software) dan Fiturnya

8th Grade

10 Qs

File Extensions

File Extensions

5th - 9th Grade

10 Qs

File Formats Quiz

File Formats Quiz

8th Grade

15 Qs

Creating Webpages

Creating Webpages

6th - 8th Grade

12 Qs

Bash Review

Bash Review

7th - 8th Grade

12 Qs

Year 8 Unit 2 CMD, Command line

Year 8 Unit 2 CMD, Command line

7th - 12th Grade

14 Qs

File Management Vocabulary

File Management Vocabulary

8th Grade

13 Qs

Python L35 File Path

Python L35 File Path

Assessment

Quiz

Computers

6th - 8th Grade

Hard

Created by

Future Teacher

Used 5+ times

FREE Resource

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/NameList.txt

/Users/Li/Documents/Class6A/NameList.txt

./Class6A/NameList.txt

Class6A:C:/NameList.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.

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?