Python Basic files
Quiz
•
Computers
•
10th - 12th Grade
•
Practice Problem
•
Medium
James Abela
Used 218+ times
FREE Resource
Enhance your content in a minute
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
Already have an account?
Similar Resources on Wayground
10 questions
Microsoft Publisher
Quiz
•
7th - 10th Grade
10 questions
conditional and iterative statements
Quiz
•
11th Grade
15 questions
ôn tập chỉnh ảnh và làm phim
Quiz
•
11th Grade
10 questions
Working around Adobe Photoshop
Quiz
•
12th Grade
10 questions
Komputer dan Jaringan Dasar Semester 2 - Implementasi dan Analisis Jaringan
Quiz
•
10th Grade
10 questions
8525 AQA GCSE CS 3.7.1 Introduction to Relational Data
Quiz
•
11th Grade
10 questions
TIN 10 - LẦN 1 - STVB 1
Quiz
•
10th Grade
10 questions
Administrasi Sistem Jaringan
Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
