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 Wayground
20 questions
Audacity

Quiz
•
7th - 8th Grade
20 questions
tik kelas 8 spendula

Quiz
•
8th Grade
20 questions
Season 5 #Spaic Python Weekly Quiz

Quiz
•
KG - Professional Dev...
17 questions
Spreadsheet Basics

Quiz
•
6th - 8th Grade
10 questions
Tin học 12 bài 3

Quiz
•
1st - 12th Grade
10 questions
Kitchen Tools and Equipment

Quiz
•
7th - 10th Grade
20 questions
Google Tools Skills

Quiz
•
6th Grade
15 questions
FMT web developing session 4 HTML5 + CSS3

Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade