Files & Data Types

Files & Data Types

10th Grade

15 Qs

quiz-placeholder

Similar activities

computer security

computer security

KG - 12th Grade

12 Qs

Chapter 7: System life cycle

Chapter 7: System life cycle

9th - 11th Grade

15 Qs

QUIZ BAB 4: SISTEM OPERASI

QUIZ BAB 4: SISTEM OPERASI

8th Grade - University

20 Qs

Threats to Data

Threats to Data

9th - 12th Grade

11 Qs

KELAS 7 1

KELAS 7 1

9th - 12th Grade

20 Qs

Basic Parts of Speech EPS

Basic Parts of Speech EPS

9th - 10th Grade

10 Qs

Network topologies

Network topologies

8th Grade - University

20 Qs

Excel Overview

Excel Overview

9th - 12th Grade

10 Qs

Files & Data Types

Files & Data Types

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Marc Hoy

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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()

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?