Files & Data Types

Files & Data Types

10th Grade

15 Qs

quiz-placeholder

Similar activities

BTEC DIT C3 LAA - Using cloud and traditional systems

BTEC DIT C3 LAA - Using cloud and traditional systems

10th - 11th Grade

10 Qs

Licencias de Software

Licencias de Software

9th - 10th Grade

10 Qs

SOFTWARE 7I

SOFTWARE 7I

7th Grade - University

20 Qs

Quiz 8 (01.09.2021)

Quiz 8 (01.09.2021)

1st - 12th Grade

10 Qs

Quiz Kelas 4

Quiz Kelas 4

10th Grade

10 Qs

Year 10 Data Transmission

Year 10 Data Transmission

9th - 12th Grade

13 Qs

Word 2016 Lesson 1

Word 2016 Lesson 1

9th - 12th Grade

10 Qs

POWERPOINT QUIZZ

POWERPOINT QUIZZ

10th - 12th Grade

20 Qs

Files & Data Types

Files & Data Types

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Marc Hoy

Used 5+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

This command will open MyFile = open("MyText.txt")

To read the file

To append to the file

To write to the file

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

If I want to add to the end of a text file, I should:

MyCipher = open("MyCipher.txt", "w")

MyCipher = open("MyCipher.txt", "a")

MyCipher = open("MyCipher.txt", "w+")

MyCipher = open("MyCipher.txt", "s")

3.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of these will generate an error?

MyCipher.write("writing")

MyCipher..write(writing)

MyCipher.write("writing",writing)

MyCipher.readline()

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you close the file?

MyFile = close()

MyFile.close

close = MyFile()

MyFile.close()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Select the statement to open a file named MYDATA.dat in read binary mode. Let the file object name be myfile.

myfile=open("MYDATA.dat","rb")

myfile=open("MYDATA.dat","r+")

myfile=open("MYDATA.dat","r")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mode in the following program to open file for writing in a mode where new data will be added at the end of old data

file =open("poem.txt","__")

r

w

a

r+

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct statement to close a file stream named myfile:

myfile.terminate()

myfile.end()

myfile.close()

myfile.remove()

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?