Question
a.
outfile = open(“c:\\scores.txt”, “a”)
b.
outfile = open(“c:\\scores.txt”, “rw”)
c.
outfile = open(file = “c:\scores.txt”, “w”)
d.
outfile = open(file = “c:\\scores.txt”, “w”)
Posted under Python
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. To open a file c:\scores.txt for appending data, we use
Similar Questions
Discover Related MCQs
Q. To read two characters from a file object infile, we use
View solution
Q. To read the entire remaining contents of the file as a string from a file object infile, we use
View solution
Q. To read the next line of the file from a file object infile, we use
View solution
Q. To read the remaining lines of the file from a file object infile, we use
View solution
Q. The readlines() method returns
View solution
Q. Which are the two built-in functions to read a line of text from standard input, which by default comes from the keyboard?
View solution
Q. Which one of the following is not attributes of file
View solution
Q. What is the use of tell() method in python?
View solution
Q. What is the current syntax of rename() a file?
View solution
Q. What is the current syntax of remove() a file?
View solution
Q. What is the use of seek() method in files?
View solution
Q. What is the use of truncate() method in file?
View solution
Q. Which is/are the basic I/O connections in file?
View solution
Q. Which of the following mode will refer to binary data?
View solution
Q. What is the pickling?
View solution
Q. What is unpickling?
View solution
Q. What is the correct syntax of open() function?
View solution
Q. Correct syntax of file.writelines() is?
View solution
Q. Correct syntax of file.readlines() is?
View solution
Q. In file handling, what does this terms means “r, a”?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Python? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!