Python L35 File Path

Python L35 File Path

6th - 8th Grade

10 Qs

quiz-placeholder

Similar activities

Revision G8

Revision G8

8th Grade

10 Qs

ICT - GRADE 6 - APRIL 2021

ICT - GRADE 6 - APRIL 2021

6th Grade

10 Qs

Python Class 8 Assessment

Python Class 8 Assessment

6th - 8th Grade

10 Qs

CSS (background-position-list)

CSS (background-position-list)

1st Grade - University

10 Qs

Revision quiz

Revision quiz

5th - 6th Grade

15 Qs

Lesson 3

Lesson 3

8th Grade

10 Qs

Designing a Website

Designing a Website

7th - 12th Grade

12 Qs

Linux-2 Quiz 2 -- LAMP

Linux-2 Quiz 2 -- LAMP

1st - 12th Grade

15 Qs

Python L35 File Path

Python L35 File Path

Assessment

Quiz

Computers

6th - 8th Grade

Hard

Created by

Future Teacher

Used 3+ 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?