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

Quiz
•
Computers
•
10th - 12th Grade
•
Medium
James Abela
Used 216+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
To read the file
To append to the file
To write to the file
2.
MULTIPLE CHOICE QUESTION
1 min • 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
1 min • 1 pt
How do you close the file?
MyFile = close()
MyFile.close
close = MyFile()
MyFile.close()
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Why is it best to open a file with with in Python?
It automatically closes the file
Easier to read the code
Better for binary files
Closers to the pseudocode
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is the best type of loop to write a file in?
While loop
for loop
repeat loop
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What command can you use to separate parts of a line?
separate()
split()
divide()
cut()
Create a free account and access millions of resources
Similar Resources on Quizizz
14 questions
Rad s datotekama u C++

Quiz
•
12th Grade
12 questions
Paper 2 Revision - IGCSE Computer Science

Quiz
•
9th - 12th Grade
12 questions
KRIPTOGRAFI

Quiz
•
12th Grade
15 questions
Visual C# Quiz - Chapter 5: Loops, Files, and Random Numbers

Quiz
•
12th Grade
10 questions
ASJ 12 TKJ - PERINTAH DASAR LINUX

Quiz
•
12th Grade
10 questions
Programming - Basic File Handling Operations

Quiz
•
3rd - 11th Grade
14 questions
FILE HANDLING

Quiz
•
12th Grade
14 questions
T-Level DPDD: File Handling Quiz

Quiz
•
11th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University