Python Basic files
Quiz
•
Computers
•
10th - 12th Grade
•
Medium
James Abela
Used 217+ times
FREE Resource
10 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
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
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
Parcial-Dibujo
Quiz
•
12th Grade
9 questions
Internet Protocols
Quiz
•
10th - 11th Grade
15 questions
Dasar Desain Grafis
Quiz
•
12th Grade - University
10 questions
Review I-PM Ujikom Multimedia
Quiz
•
12th Grade
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
12 questions
FTP
Quiz
•
1st - 10th Grade
14 questions
Archivos Digitales
Quiz
•
9th Grade - University
15 questions
tik kelas 7
Quiz
•
1st Grade - University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
