Which of the following error is returned by the given code ?
f = open("test.txt","w") f.write(345)
Syntax Error
Type Error
String Error
Run Time Error
f.readlines()
f.readline()
f.read()
f.line()
5 characters
5 words
5 lines
None of the above
write mode
read mode
append mode
Both (A) And (B)
f.reads()
f.read(all)
f.read( *)
Curly Braces
Round Brackets
Indentation
Semicolon
Quick response code
Same format in which the data is held in memory
ASCII format
Unicode format
try
Brackets
Catch
what is 'f' in the following statement?
f=open("Data.txt","r")
file name
file handle
Mode of file
file handling
remove((), file_name))
remove (new_file_name, current_file_name,)
remove (file_name)
All of the above
a
f
w
t
raw_input
input
eval
accept
closed
softspace
rename
None of the above.
It is used for object serialization
It is used for object deserialization
All of the mentioned
None of the mentioned
f = open('data.txt'); f.read()
f = open('data.txt','r'); f.read(n)
myfile = open('data.txt'); f.readline()
f= open('data.txt'); f.readlines()
r
+
b
f = open("data.txt", "a")
f = Open("data.txt", "ab")
f= new("data.txt", "a")
open("data.txt", "a")
f.seek(-10, 0)
f.seek(10,0)
f.seek(-10, 1)
end
beginning
anywhere in between the file
End of File
End of Line
End of Statement
End of program