
Python files and exceptions
Authored by turgut kalfaoglu
Computers
11th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output-
f=open('abc.txt','a')
text="xyz"
f.write(text)
f.close()
Writing into the file without erasing old content
Writing into the file by erasing old content
reading from the file without erasing old content
reading from the file by erasing old content
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Mode in the following program to open file for writing in a mode where new data will be added at the end of old data
file =open("poem.txt","__")
r
w
a
r+
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct statement to close a file stream named myfile:
myfile.terminate()
myfile.end()
myfile.close()
myfile.remove()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function read single line at a time?
read()
read(n)
readline()
readlines()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where files are store permanently?
RAM
Hard Disk
Cache memory
None of these
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Appending to a file means adding extra data into the file.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q.2 Which of the following statements are not true regarding the opening modes of a file?
When you open a file for reading, if the file does not exist, an error occurs.
When you open a file for writing, if the file does not exist, an error occurs
When you open a file for writing, if the file does not exist, a new file is created.
When you open a file for writing, if the file exists, the existing file is overwritten with the new file.
Access all questions and much more by creating a free account
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
20 questions
System and network support and management
Quiz
•
11th Grade - Professi...
17 questions
Email Lớp 6
Quiz
•
6th Grade - University
17 questions
1.8a Environmental Issues
Quiz
•
10th - 11th Grade
15 questions
Javascript Quiz 2
Quiz
•
11th Grade
20 questions
Computer parts
Quiz
•
1st - 12th Grade
14 questions
LA7.C7: Turtle Graphics
Quiz
•
9th Grade - University
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
15 questions
J808 LO1 and LO2 planning project keywords / terms
Quiz
•
9th - 11th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
10 questions
Dr. King's Speech and Its Impact
Interactive video
•
7th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Los mandatos y las recetas
Lesson
•
11th Grade
7 questions
Anti-Bullying ARS 15-341
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
15 questions
TSI Math Practice Questions
Quiz
•
8th - 12th Grade