A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Timestamp | Email Address | Score | Full Name | To open a file c:\test.txt for reading, we should give the statement: | To open a file c:\test.txt for writing, we should use the statement: | To open a file c:\test.txt for appending data, we can give the statement: | Which of the following statements is/are true? | To read two characters from a file object fobj, the command should be: | To read the entire contents of the file as a string from a file object fobj, the command should be: | What will be the output of the following snippet? f = None for i in range(5): with open("data.txt", "w") as f: if i > 2: break print(f.closed) | To read the next line of the file from a file object fobj, we use: | The readlines() method returns: | Which is/are the basic I/O (input-output) stream(s) in file? | ||||||
2 | 8/30/2025 7:55:28 | krativerma09238@gmail.com | 8 / 10 | Krati Verma | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read(2) | fobj.readline() | None | fobj.readline() | A list of strings | All of these | ||||||
3 | 8/30/2025 7:56:21 | kp63933@gmail.com | 9 / 10 | Krishna Pal | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read(2) | fobj.read() | Error | fobj.readline() | A list of strings | All of these | ||||||
4 | 8/30/2025 7:56:33 | anon39944@gmail.com | 8 / 10 | Aditya Pratap Singh | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read(2) | fobj.read() | Error | fobj.readline() | A list of strings | Standard Input | ||||||
5 | 8/30/2025 7:57:13 | sharmila22pal@gmail.com | 5 / 10 | Anushka Pal | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read(2) | fobj.readlines() | None | fobj.readlines() | A list of single characters | All of these | ||||||
6 | 8/30/2025 7:57:39 | gaurikashyap462@gamil.com | 4 / 10 | isha verma | file1= open("c:\ test.txt", "r") | fobj = open("c:\test.txt", "w") | fobj = open("c:\\test.txt", "a") | When we open a file for writing, if the file does not exist, a new file is created. | fobj.read(2) | fobj.readline() | TRUE | fobj.readline() | A list of single characters | Standard Errors | ||||||
7 | 8/30/2025 7:59:16 | sakshamkat28@gmail.com | 5 / 10 | saksham katiyar | file1= open("c:\ test.txt", "r") | fobj = open("c:\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read() | fobj.readlines() | None | fobj.readline() | A list of strings | All of these | ||||||
8 | 8/30/2025 7:59:52 | gaurikashyap462@gmail.com | 5 / 10 | gauri kashyap | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | When we open a file for writing, if the file does not exist, a new file is created. | fobj.read(2) | fobj.read() | Error | fobj.read() | String | Standard Input | ||||||
9 | 8/30/2025 8:00:10 | riddimatiwari20@gmail.com | 6 / 10 | riddima t | file1 = open(file = "c:\ test.txt", "r") | fobj = open(file = "c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | When we open a file for writing, if the file does not exist, a new file is created. | fobj.read(2) | fobj.read() | None | fobj.readline() | A list of strings | All of these | ||||||
10 | 8/30/2025 8:02:04 | gaurikashyap462@gmail.com | 5 / 10 | gauri kashyap | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | When we open a file for writing, if the file does not exist, a new file is created. | fobj.read(2) | fobj.readline() | FALSE | fobj.readline() | String | Standard Input | ||||||
11 | 8/30/2025 8:02:15 | samaparveen17290@gmail.com | 5 / 10 | Ayan | file1= open("c:\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read(2) | fobj.readlines() | FALSE | fobj.read() | String | All of these | ||||||
12 | 8/30/2025 8:03:05 | parthmishra@gmail.com | 5 / 10 | Parth Mishra | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.read(2) | fobj.readline() | None | fobj.readline() | A list of single characters | Standard Errors | ||||||
13 | 8/30/2025 8:03:49 | abhijeetsengar8888@gmail.com | 6 / 10 | Abhijeet Singh Sengar | file1 = open("c:\\ test.txt", "r") | fobj = open("c:\\test.txt", "w") | fobj = open("c:\\test.txt", "a") | All of these. | fobj.readline() | fobj.readlines() | None | fobj.read(2) | A list of strings | All of these | ||||||
14 | ||||||||||||||||||||
15 | ||||||||||||||||||||
16 | ||||||||||||||||||||
17 | ||||||||||||||||||||
18 | ||||||||||||||||||||
19 | ||||||||||||||||||||
20 | ||||||||||||||||||||
21 | ||||||||||||||||||||
22 | ||||||||||||||||||||
23 | ||||||||||||||||||||
24 | ||||||||||||||||||||
25 | ||||||||||||||||||||
26 | ||||||||||||||||||||
27 | ||||||||||||||||||||
28 | ||||||||||||||||||||
29 | ||||||||||||||||||||
30 | ||||||||||||||||||||
31 | ||||||||||||||||||||
32 | ||||||||||||||||||||
33 | ||||||||||||||||||||
34 | ||||||||||||||||||||
35 | ||||||||||||||||||||
36 | ||||||||||||||||||||
37 | ||||||||||||||||||||
38 | ||||||||||||||||||||
39 | ||||||||||||||||||||
40 | ||||||||||||||||||||
41 | ||||||||||||||||||||
42 | ||||||||||||||||||||
43 | ||||||||||||||||||||
44 | ||||||||||||||||||||
45 | ||||||||||||||||||||
46 | ||||||||||||||||||||
47 | ||||||||||||||||||||
48 | ||||||||||||||||||||
49 | ||||||||||||||||||||
50 | ||||||||||||||||||||
51 | ||||||||||||||||||||
52 | ||||||||||||||||||||
53 | ||||||||||||||||||||
54 | ||||||||||||||||||||
55 | ||||||||||||||||||||
56 | ||||||||||||||||||||
57 | ||||||||||||||||||||
58 | ||||||||||||||||||||
59 | ||||||||||||||||||||
60 | ||||||||||||||||||||
61 | ||||||||||||||||||||
62 | ||||||||||||||||||||
63 | ||||||||||||||||||||
64 | ||||||||||||||||||||
65 | ||||||||||||||||||||
66 | ||||||||||||||||||||
67 | ||||||||||||||||||||
68 | ||||||||||||||||||||
69 | ||||||||||||||||||||
70 | ||||||||||||||||||||
71 | ||||||||||||||||||||
72 | ||||||||||||||||||||
73 | ||||||||||||||||||||
74 | ||||||||||||||||||||
75 | ||||||||||||||||||||
76 | ||||||||||||||||||||
77 | ||||||||||||||||||||
78 | ||||||||||||||||||||
79 | ||||||||||||||||||||
80 | ||||||||||||||||||||
81 | ||||||||||||||||||||
82 | ||||||||||||||||||||
83 | ||||||||||||||||||||
84 | ||||||||||||||||||||
85 | ||||||||||||||||||||
86 | ||||||||||||||||||||
87 | ||||||||||||||||||||
88 | ||||||||||||||||||||
89 | ||||||||||||||||||||
90 | ||||||||||||||||||||
91 | ||||||||||||||||||||
92 | ||||||||||||||||||||
93 | ||||||||||||||||||||
94 | ||||||||||||||||||||
95 | ||||||||||||||||||||
96 | ||||||||||||||||||||
97 | ||||||||||||||||||||
98 | ||||||||||||||||||||
99 | ||||||||||||||||||||
100 |