
Files & Data Types
Quiz
•
Computers
•
10th Grade
•
Hard
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Trắc nghiệm: Bài 16-Ngôn ngữ lập trình bậc cao và Python
Quiz
•
10th Grade
20 questions
QUIZ BAB 4: SISTEM OPERASI
Quiz
•
8th Grade - University
10 questions
Penilian Harian 2 Editing Video
Quiz
•
9th - 12th Grade
19 questions
QUIZ INFORMATIKA
Quiz
•
1st - 10th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
10 questions
Basic Parts of Speech EPS
Quiz
•
9th - 10th Grade
10 questions
MID Semester 2024
Quiz
•
10th Grade
20 questions
Network topologies
Quiz
•
8th Grade - University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
