- AFile = open(file_name[, access_mode][, buffering])
- ✓File object = open(file_name [, access_mode][,buffering])
- CFile object = open(file_name)
- DNone of the above
Answer: B.
View full solution →89 questions across 6 question groups — pick any mix to generate a Computer Science paper with step-by-step answer keys.
M.C.Q
19 Q→021 Marks Each
20 Q→032 Marks Each
16 Q→043 Marks Each
17 Q→055 Marks Each
6 Q→064 Marks Each
11 Q→One sample from each question group in this chapter. Select any group above to see the full set with answer keys.
Answer: B.
View full solution →Answer: D.
View full solution →Answer: C.
View full solution →Answer: B.
View full solution →Answer: B.
View full solution →(i) What type (Text/Binary) of file is Mydata?
(ii) Fill the Blank 1 with statement to write “ABC” in the file “Mydata”.
(a) Which line in the above code check for capital letter?
(b) Which line in the above code read the file “story. txt”?
(c) Which line in the above code does not affect the execution of program?
(d) Which line is the above code coverts capital letter to small letter?
(e) Which line is the above code opens the file in write mode?
(f) Which line is the above code saves the data?
(g) Which line(s) is/are the part of selection statement.
(h) Which line(s) is/are used to close story1.txt?
(a)Line 1 : Name the module he should import.
(b)Line 2 : To create an object to enable to write in the csv file.
(c)Line 3 : To store the data in list
(d)Line 4 : To write a record.
(e)Line 5 : To close the file.
(a)
(a) # Line 1 : To open file POEM.txt in read mode
(b) # Line 2 : To check first character of every line is ‘W’ or ‘w’.
(c) # Line 3 : To increase the value of count by 1.
(d) # Line 4 : To call the function count_poem.
Pick question groups from the list above, set marks and difficulty, and export a branded PDF with step-by-step answer keys. First 3 chapters free — no signup.