How do you open a file for reading in Python?
EvaluativeQuiz

Quiz
•
Other
•
6th - 8th Grade
•
Medium
Ben Marwen
Used 4+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
open('filename.txt', 'r')
open('filename.txt', 'w')
open('filename.txt', 'a')
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you read the contents of a file in Python?
file.read()
file.write()
file.append()
3.
MULTIPLE SELECT QUESTION
1 min • 1 pt
How do you open a file for writing in Python?
open('filename.txt', 'r')
open('filename.txt', 'w')
open('filename.txt', 'a')
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you write to a file in Python?
file.read()
file.write()
file.writeline()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you close a file in Python?
file.close()
file.open()
file.exit()
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the command used to show a message on the console in Python?
print()
input()
read()
write()
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is NOT a data type in Python?
Integer
String
Boolean
Double
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
ICT skills

Quiz
•
8th - 10th Grade
15 questions
Python Basics Quiz

Quiz
•
6th - 10th Grade
10 questions
snakes

Quiz
•
3rd Grade - University
14 questions
Intro to Python Programming Quiz 9D

Quiz
•
1st Grade - University
15 questions
HTML MUTIN

Quiz
•
7th - 9th Grade
20 questions
COMPUTER SHORTCUTS COMMANDS

Quiz
•
3rd - 7th Grade
15 questions
Qt Design

Quiz
•
6th - 8th Grade
20 questions
Pengenalan & Shape (Objek)

Quiz
•
7th Grade
Popular Resources on Quizizz
20 questions
math review

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
19 questions
Math Review

Quiz
•
3rd Grade
45 questions
7th Grade Math EOG Review

Quiz
•
7th Grade
Discover more resources for Other
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
45 questions
7th Grade Math EOG Review

Quiz
•
7th Grade
20 questions
Cross Sections of 3D Shapes

Quiz
•
7th Grade
17 questions
guess the logo

Quiz
•
8th Grade
31 questions
6th Grade Math EOG Review

Quiz
•
6th Grade
20 questions
Math Review

Quiz
•
7th Grade
20 questions
Guess The Cartoon!

Quiz
•
7th Grade